Back to index

libdrm  2.4.37
drm_sarea.h
Go to the documentation of this file.
00001 
00008 /*
00009  * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
00010  * All Rights Reserved.
00011  *
00012  * Permission is hereby granted, free of charge, to any person obtaining a
00013  * copy of this software and associated documentation files (the "Software"),
00014  * to deal in the Software without restriction, including without limitation
00015  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00016  * and/or sell copies of the Software, and to permit persons to whom the
00017  * Software is furnished to do so, subject to the following conditions:
00018  *
00019  * The above copyright notice and this permission notice (including the next
00020  * paragraph) shall be included in all copies or substantial portions of the
00021  * Software.
00022  *
00023  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00024  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00025  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00026  * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00027  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00028  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00029  * OTHER DEALINGS IN THE SOFTWARE.
00030  */
00031 
00032 #ifndef _DRM_SAREA_H_
00033 #define _DRM_SAREA_H_
00034 
00035 #include "drm.h"
00036 
00037 /* SAREA area needs to be at least a page */
00038 #if defined(__alpha__)
00039 #define SAREA_MAX                       0x2000U
00040 #elif defined(__ia64__)
00041 #define SAREA_MAX                       0x10000U /* 64kB */
00042 #else
00043 /* Intel 830M driver needs at least 8k SAREA */
00044 #define SAREA_MAX                       0x2000U
00045 #endif
00046 
00048 #define SAREA_MAX_DRAWABLES        256
00049 
00050 #define SAREA_DRAWABLE_CLAIMED_ENTRY    0x80000000
00051 
00053 struct drm_sarea_drawable {
00054        unsigned int stamp;
00055        unsigned int flags;
00056 };
00057 
00059 struct drm_sarea_frame {
00060        unsigned int x;
00061        unsigned int y;
00062        unsigned int width;
00063        unsigned int height;
00064        unsigned int fullscreen;
00065 };
00066 
00068 struct drm_sarea {
00070        struct drm_hw_lock lock;
00072        struct drm_hw_lock drawable_lock;
00073        struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES];  
00074        struct drm_sarea_frame frame;      
00075        drm_context_t dummy_context;
00076 };
00077 
00078 typedef struct drm_sarea_drawable drm_sarea_drawable_t;
00079 typedef struct drm_sarea_frame drm_sarea_frame_t;
00080 typedef struct drm_sarea drm_sarea_t;
00081 
00082 #endif                      /* _DRM_SAREA_H_ */