/**1* \file drm_sarea.h2* \brief SAREA definitions3*4* \author Michel Dänzer <[email protected]>5*/67/*8* Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.9* All Rights Reserved.10*11* Permission is hereby granted, free of charge, to any person obtaining a12* copy of this software and associated documentation files (the "Software"),13* to deal in the Software without restriction, including without limitation14* the rights to use, copy, modify, merge, publish, distribute, sublicense,15* and/or sell copies of the Software, and to permit persons to whom the16* Software is furnished to do so, subject to the following conditions:17*18* The above copyright notice and this permission notice (including the next19* paragraph) shall be included in all copies or substantial portions of the20* Software.21*22* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR23* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,24* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL25* TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR26* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,27* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR28* OTHER DEALINGS IN THE SOFTWARE.29*/3031#ifndef _DRM_SAREA_H_32#define _DRM_SAREA_H_3334#include "drm.h"3536/* SAREA area needs to be at least a page */37#if defined(__alpha__)38#define SAREA_MAX 0x2000U39#elif defined(__ia64__)40#define SAREA_MAX 0x10000U /* 64kB */41#else42/* Intel 830M driver needs at least 8k SAREA */43#define SAREA_MAX 0x2000U44#endif4546/** Maximum number of drawables in the SAREA */47#define SAREA_MAX_DRAWABLES 2564849#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x800000005051/** SAREA drawable */52struct drm_sarea_drawable {53unsigned int stamp;54unsigned int flags;55};5657/** SAREA frame */58struct drm_sarea_frame {59unsigned int x;60unsigned int y;61unsigned int width;62unsigned int height;63unsigned int fullscreen;64};6566/** SAREA */67struct drm_sarea {68/** first thing is always the DRM locking structure */69struct drm_hw_lock lock;70/** \todo Use readers/writer lock for drm_sarea::drawable_lock */71struct drm_hw_lock drawable_lock;72struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */73struct drm_sarea_frame frame; /**< frame */74drm_context_t dummy_context;75};7677#ifndef __KERNEL__78typedef struct drm_sarea_drawable drm_sarea_drawable_t;79typedef struct drm_sarea_frame drm_sarea_frame_t;80typedef struct drm_sarea drm_sarea_t;81#endif8283#endif /* _DRM_SAREA_H_ */848586