drm_sarea.h revision 1450
98N/A/*
98N/A * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
98N/A */
98N/A
98N/A/*
98N/A * Copyright (c) 2012 Intel Corporation. All rights reserved.
98N/A */
98N/A
98N/A/*
98N/A * \file drm_sarea.h
98N/A * \brief SAREA definitions
98N/A *
98N/A * \author Michel D�zer <michel@daenzer.net>
98N/A */
98N/A
98N/A/*
98N/A * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
98N/A * All Rights Reserved.
98N/A *
98N/A * Permission is hereby granted, free of charge, to any person obtaining a
98N/A * copy of this software and associated documentation files (the "Software"),
98N/A * to deal in the Software without restriction, including without limitation
98N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
98N/A * and/or sell copies of the Software, and to permit persons to whom the
98N/A * Software is furnished to do so, subject to the following conditions:
98N/A *
98N/A * The above copyright notice and this permission notice (including the next
98N/A * paragraph) shall be included in all copies or substantial portions of the
98N/A * Software.
98N/A *
98N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
235N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
98N/A * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
98N/A * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
235N/A * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
156N/A * OTHER DEALINGS IN THE SOFTWARE.
156N/A */
156N/A
156N/A#ifndef _DRM_SAREA_H_
98N/A#define _DRM_SAREA_H_
98N/A
98N/A#include "drm.h"
98N/A
235N/A/* SAREA area needs to be at least a page */
235N/A#if defined(__alpha__)
98N/A#define SAREA_MAX 0x2000U
98N/A#elif defined(__ia64__)
98N/A#define SAREA_MAX 0x10000U /* 64kB */
156N/A#else
98N/A/* Intel 830M driver needs at least 8k SAREA */
98N/A#define SAREA_MAX 0x2000UL
235N/A#endif
235N/A
98N/A/** Maximum number of drawables in the SAREA */
98N/A#define SAREA_MAX_DRAWABLES 256
98N/A
98N/A#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
98N/A
98N/A/** SAREA drawable */
98N/Astruct drm_sarea_drawable {
98N/A unsigned int stamp;
98N/A unsigned int flags;
98N/A};
98N/A
98N/A/** SAREA frame */
98N/Astruct drm_sarea_frame {
98N/A unsigned int x;
98N/A unsigned int y;
98N/A unsigned int width;
235N/A unsigned int height;
98N/A unsigned int fullscreen;
98N/A};
235N/A
235N/A/** SAREA */
235N/Astruct drm_sarea {
235N/A /** first thing is always the DRM locking structure */
235N/A struct drm_hw_lock lock;
235N/A /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
98N/A struct drm_hw_lock drawable_lock;
98N/A struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
98N/A struct drm_sarea_frame frame; /**< frame */
98N/A drm_context_t dummy_context;
98N/A};
235N/A
98N/Atypedef struct drm_sarea_drawable drm_sarea_drawable_t;
98N/Atypedef struct drm_sarea_frame drm_sarea_frame_t;
98N/Atypedef struct drm_sarea drm_sarea_t;
98N/A#endif /* _DRM_SAREA_H_ */
98N/A