diff options
author | =?utf-8?q?Michel_D=C3=A4nzer?= <michel@tungstengraphics.com> | 2006-10-24 09:04:19 -0400 |
---|---|---|
committer | airlied <airlied@linux.ie> | 2006-12-06 23:53:28 -0500 |
commit | bea5679f9cb97b7e41786c8500df56665cd21e56 (patch) | |
tree | 8259fc9d75730be3db028892f0da991dec54e37e /drivers/char/drm/drm.h | |
parent | 68815bad7239989d92f315c10d9ef65a11945a75 (diff) |
drm: Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.
Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.
hook up drm ioctl update draw
export drm_get_drawable_info symbol
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm.h')
-rw-r--r-- | drivers/char/drm/drm.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h index 077d0b1914ab..07a699029c3e 100644 --- a/drivers/char/drm/drm.h +++ b/drivers/char/drm/drm.h | |||
@@ -117,6 +117,14 @@ typedef struct drm_clip_rect { | |||
117 | } drm_clip_rect_t; | 117 | } drm_clip_rect_t; |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * Drawable information. | ||
121 | */ | ||
122 | typedef struct drm_drawable_info { | ||
123 | unsigned int num_rects; | ||
124 | drm_clip_rect_t *rects; | ||
125 | } drm_drawable_info_t; | ||
126 | |||
127 | /** | ||
120 | * Texture region, | 128 | * Texture region, |
121 | */ | 129 | */ |
122 | typedef struct drm_tex_region { | 130 | typedef struct drm_tex_region { |
@@ -444,6 +452,20 @@ typedef struct drm_draw { | |||
444 | } drm_draw_t; | 452 | } drm_draw_t; |
445 | 453 | ||
446 | /** | 454 | /** |
455 | * DRM_IOCTL_UPDATE_DRAW ioctl argument type. | ||
456 | */ | ||
457 | typedef enum { | ||
458 | DRM_DRAWABLE_CLIPRECTS, | ||
459 | } drm_drawable_info_type_t; | ||
460 | |||
461 | typedef struct drm_update_draw { | ||
462 | drm_drawable_t handle; | ||
463 | unsigned int type; | ||
464 | unsigned int num; | ||
465 | unsigned long long data; | ||
466 | } drm_update_draw_t; | ||
467 | |||
468 | /** | ||
447 | * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. | 469 | * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. |
448 | */ | 470 | */ |
449 | typedef struct drm_auth { | 471 | typedef struct drm_auth { |
@@ -625,6 +647,8 @@ typedef struct drm_set_version { | |||
625 | 647 | ||
626 | #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t) | 648 | #define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t) |
627 | 649 | ||
650 | #define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, drm_update_draw_t) | ||
651 | |||
628 | /** | 652 | /** |
629 | * Device specific ioctls should only be in their respective headers | 653 | * Device specific ioctls should only be in their respective headers |
630 | * The device specific ioctl range is from 0x40 to 0x79. | 654 | * The device specific ioctl range is from 0x40 to 0x79. |