From aff0a2548561ecbe3411b57cd31f46cbb1b4f6b8 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 13 Dec 2004 13:53:12 +0000 Subject: VIA drm updates: 1. Improved security check of AGP texture adresses. 2. Hopefully last fix of ring-buffer jump oddities. 3. Added ioctl to check available space and command regulator lag in ring-buffer. This is needed for 3D application responsiveness. --- shared/via_drm.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'shared/via_drm.h') diff --git a/shared/via_drm.h b/shared/via_drm.h index ee703c79..2327bec5 100644 --- a/shared/via_drm.h +++ b/shared/via_drm.h @@ -70,6 +70,8 @@ #define DRM_IOCTL_VIA_CMDBUFFER DRM_IOW(0x48, drm_via_cmdbuffer_t) #define DRM_IOCTL_VIA_FLUSH DRM_IO(0x49) #define DRM_IOCTL_VIA_PCICMD DRM_IOW(0x4A, drm_via_cmdbuffer_t) +#define DRM_IOCTL_VIA_CMDBUF_SIZE DRM_IOWR(0x4B, drm_via_cmdbuf_size_t) + /* Indices into buf.Setup where various bits of state are mirrored per * context and per buffer. These can be fired at the card as a unit, @@ -189,7 +191,14 @@ typedef struct _drm_via_flush_sys { int discard; /* client is finished with the buffer? */ } drm_via_flush_sys_t; - +typedef struct _drm_via_cmdbuf_size { + enum { + VIA_CMDBUF_SPACE = 0x01, + VIA_CMDBUF_LAG = 0x02 + } func; + int wait; + uint32_t size; +} drm_via_cmdbuf_size_t; #ifdef __KERNEL__ @@ -203,6 +212,7 @@ int via_dma_init(DRM_IOCTL_ARGS); int via_cmdbuffer(DRM_IOCTL_ARGS); int via_flush_ioctl(DRM_IOCTL_ARGS); int via_pci_cmdbuffer(DRM_IOCTL_ARGS); +int via_cmdbuf_size(DRM_IOCTL_ARGS); #endif #endif /* _VIA_DRM_H_ */ -- cgit v1.2.3