From 29598e5253ff5c085ccf63580fd24b84db848424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 22 Aug 2006 16:40:07 +0200 Subject: 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. --- libdrm/xf86drm.c | 16 ++++++++++++++++ libdrm/xf86drm.h | 3 +++ 2 files changed, 19 insertions(+) (limited to 'libdrm') diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index c9f1b2db..d4f80b4e 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -1397,6 +1397,22 @@ int drmDestroyDrawable(int fd, drm_drawable_t handle) return 0; } +int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, + drm_drawable_info_type_t type, unsigned int num, + void *data) +{ + drm_update_draw_t update; + + update.handle = handle; + update.type = type; + update.num = num; + update.data = (unsigned long long)(unsigned long)data; + + if (ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update)) return -errno; + + return 0; +} + /** * Acquire the AGP device. * diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index 48a18f29..9e71eb65 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -544,6 +544,9 @@ extern int drmSwitchToContext(int fd, drm_context_t context); extern int drmDestroyContext(int fd, drm_context_t handle); extern int drmCreateDrawable(int fd, drm_drawable_t * handle); extern int drmDestroyDrawable(int fd, drm_drawable_t handle); +extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, + drm_drawable_info_type_t type, + unsigned int num, void *data); extern int drmCtlInstHandler(int fd, int irq); extern int drmCtlUninstHandler(int fd); -- cgit v1.2.3 From 84b38b63f05e04ade8b1ddfb770047fd86de0d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 31 Aug 2006 18:32:08 +0200 Subject: Add definition of DRM_VBLANK_SECONDARY. --- libdrm/xf86drm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libdrm') diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index 9e71eb65..cda570de 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -252,6 +252,7 @@ typedef struct _drmTextureRegion { typedef enum { DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ DRM_VBLANK_SIGNAL = 0x40000000 /* Send signal instead of blocking */ } drmVBlankSeqType; -- cgit v1.2.3 From 89e323e4900af84cc33219ad24eb0b435a039d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 1 Sep 2006 11:27:14 +0200 Subject: Core vsync: Add flag DRM_VBLANK_NEXTONMISS. When this flag is set and the target sequence is missed, wait for the next vertical blank instead of returning immediately. --- libdrm/xf86drm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libdrm') diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index cda570de..2ad70807 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -252,6 +252,7 @@ typedef struct _drmTextureRegion { typedef enum { DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ DRM_VBLANK_SIGNAL = 0x40000000 /* Send signal instead of blocking */ } drmVBlankSeqType; -- cgit v1.2.3 From f3deef730d52c94ce21ada7e4ceb63aa28a8601b Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Mon, 2 Oct 2006 05:46:42 +0300 Subject: Bug 6242: [mach64] Use private DMA buffers, part #3. Add DRM_PCI_BUFFER_RO flag for mapping PCI DMA buffer read-only. An additional flag is needed, since PCI DMA buffers do not have an associated map. --- libdrm/xf86drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libdrm') diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index 2ad70807..d58baa76 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -149,7 +149,8 @@ typedef enum { DRM_PAGE_ALIGN = 0x01, DRM_AGP_BUFFER = 0x02, DRM_SG_BUFFER = 0x04, - DRM_FB_BUFFER = 0x08 + DRM_FB_BUFFER = 0x08, + DRM_PCI_BUFFER_RO = 0x10 } drmBufDescFlags; typedef enum { -- cgit v1.2.3