Deleted Added
full compact
drm_sarea.h (152909) drm_sarea.h (182080)
1/**
2 * \file drm_sarea.h
3 * \brief SAREA definitions
4 *
5 * \author Michel D���zer <michel@daenzer.net>
6 */
7
8/*-

--- 16 unchanged lines hidden (view full) ---

25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
30 */
31
32#include <sys/cdefs.h>
1/**
2 * \file drm_sarea.h
3 * \brief SAREA definitions
4 *
5 * \author Michel D���zer <michel@daenzer.net>
6 */
7
8/*-

--- 16 unchanged lines hidden (view full) ---

25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/drm/drm_sarea.h 152909 2005-11-28 23:13:57Z anholt $");
33__FBSDID("$FreeBSD: head/sys/dev/drm/drm_sarea.h 182080 2008-08-23 20:59:12Z rnoland $");
34
35#ifndef _DRM_SAREA_H_
36#define _DRM_SAREA_H_
37
38#include "dev/drm/drm.h"
39
40/* SAREA area needs to be at least a page */
41#if defined(__alpha__)
42#define SAREA_MAX 0x2000
43#elif defined(__ia64__)
44#define SAREA_MAX 0x10000 /* 64kB */
45#else
46/* Intel 830M driver needs at least 8k SAREA */
34
35#ifndef _DRM_SAREA_H_
36#define _DRM_SAREA_H_
37
38#include "dev/drm/drm.h"
39
40/* SAREA area needs to be at least a page */
41#if defined(__alpha__)
42#define SAREA_MAX 0x2000
43#elif defined(__ia64__)
44#define SAREA_MAX 0x10000 /* 64kB */
45#else
46/* Intel 830M driver needs at least 8k SAREA */
47#define SAREA_MAX 0x2000
47#define SAREA_MAX 0x2000UL
48#endif
49
50/** Maximum number of drawables in the SAREA */
48#endif
49
50/** Maximum number of drawables in the SAREA */
51#define SAREA_MAX_DRAWABLES 256
51#define SAREA_MAX_DRAWABLES 256
52
53#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
54
55/** SAREA drawable */
52
53#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
54
55/** SAREA drawable */
56typedef struct drm_sarea_drawable {
56struct drm_sarea_drawable {
57 unsigned int stamp;
58 unsigned int flags;
57 unsigned int stamp;
58 unsigned int flags;
59} drm_sarea_drawable_t;
59};
60
61/** SAREA frame */
60
61/** SAREA frame */
62typedef struct drm_sarea_frame {
62struct drm_sarea_frame {
63 unsigned int x;
64 unsigned int y;
65 unsigned int width;
66 unsigned int height;
67 unsigned int fullscreen;
63 unsigned int x;
64 unsigned int y;
65 unsigned int width;
66 unsigned int height;
67 unsigned int fullscreen;
68} drm_sarea_frame_t;
68};
69
70/** SAREA */
69
70/** SAREA */
71typedef struct drm_sarea {
71struct drm_sarea {
72 /** first thing is always the DRM locking structure */
72 /** first thing is always the DRM locking structure */
73 drm_hw_lock_t lock;
73 struct drm_hw_lock lock;
74 /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
74 /** \todo Use readers/writer lock for drm_sarea::drawable_lock */
75 drm_hw_lock_t drawable_lock;
76 drm_sarea_drawable_t drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
77 drm_sarea_frame_t frame; /**< frame */
75 struct drm_hw_lock drawable_lock;
76 struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; /**< drawables */
77 struct drm_sarea_frame frame; /**< frame */
78 drm_context_t dummy_context;
78 drm_context_t dummy_context;
79} drm_sarea_t;
79};
80
80
81#ifndef __KERNEL__
82typedef struct drm_sarea_drawable drm_sarea_drawable_t;
83typedef struct drm_sarea_frame drm_sarea_frame_t;
84typedef struct drm_sarea drm_sarea_t;
85#endif
86
81#endif /* _DRM_SAREA_H_ */
87#endif /* _DRM_SAREA_H_ */