/**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#if defined(__cplusplus)37extern "C" {38#endif3940/* SAREA area needs to be at least a page */41#if defined(__alpha__)42#define SAREA_MAX 0x2000U43#elif defined(__mips__)44#define SAREA_MAX 0x4000U45#elif defined(__ia64__)46#define SAREA_MAX 0x10000U /* 64kB */47#else48/* Intel 830M driver needs at least 8k SAREA */49#define SAREA_MAX 0x2000U50#endif5152/** Maximum number of drawables in the SAREA */53#define SAREA_MAX_DRAWABLES 2565455#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x800000005657/** SAREA drawable */58struct drm_sarea_drawable {59unsigned int stamp;60unsigned int flags;61};6263/** SAREA frame */64struct drm_sarea_frame {65unsigned int x;66unsigned int y;67unsigned int width;68unsigned int height;69unsigned int fullscreen;70};7172/** SAREA */73struct drm_sarea {74/** first thing is always the DRM locking structure */75struct drm_hw_lock lock;76/** \todo Use readers/writer lock for drm_sarea::drawable_lock */77struct drm_hw_lock drawable_lock;78struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */79struct drm_sarea_frame frame; /**< frame */80drm_context_t dummy_context;81};8283#ifndef __KERNEL__84typedef struct drm_sarea_drawable drm_sarea_drawable_t;85typedef struct drm_sarea_frame drm_sarea_frame_t;86typedef struct drm_sarea drm_sarea_t;87#endif8889#if defined(__cplusplus)90}91#endif9293#endif /* _DRM_SAREA_H_ */949596