diff options
-rw-r--r-- | usr/src/common/libdrm/patches/incl-drm-i915-drm-h.patch | 28 | ||||
-rw-r--r-- | usr/src/uts/common/drm/i915_drm.h | 9 |
2 files changed, 29 insertions, 8 deletions
diff --git a/usr/src/common/libdrm/patches/incl-drm-i915-drm-h.patch b/usr/src/common/libdrm/patches/incl-drm-i915-drm-h.patch index ac49639..42aa184 100644 --- a/usr/src/common/libdrm/patches/incl-drm-i915-drm-h.patch +++ b/usr/src/common/libdrm/patches/incl-drm-i915-drm-h.patch @@ -45,7 +45,25 @@ diff ... b/include/drm/i915_drm.h /* fill out some space for old userspace triple buffer */ drm_handle_t unused_handle; __u32 unused1, unused2, unused3; -@@ -296,6 +299,15 @@ +@@ -235,11 +238,14 @@ + #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) + #define DRM_IOCTL_I915_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLIP) + #define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) +-#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) ++/* I915_IRQ_EMIT is IOW not IOWR because it does its own copyout. */ ++#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) + #define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) +-#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) ++/* I915_GETPARAM is IOW not IOWR because it does its own copyout. */ ++#define DRM_IOCTL_I915_GETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) + #define DRM_IOCTL_I915_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t) +-#define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) ++/* I915_ALLOC is IOW not IOWR because it's a noop */ ++#define DRM_IOCTL_I915_ALLOC DRM_IOW( DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) + #define DRM_IOCTL_I915_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t) + #define DRM_IOCTL_I915_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t) + #define DRM_IOCTL_I915_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t) +@@ -296,6 +302,15 @@ struct drm_clip_rect *cliprects; /* pointer to userspace cliprects */ } drm_i915_batchbuffer_t; @@ -61,7 +79,7 @@ diff ... b/include/drm/i915_drm.h /* As above, but pass a pointer to userspace buffer which can be * validated by the kernel prior to sending to hardware. */ -@@ -308,6 +320,15 @@ +@@ -308,6 +323,15 @@ struct drm_clip_rect *cliprects; /* pointer to userspace cliprects */ } drm_i915_cmdbuffer_t; @@ -77,7 +95,7 @@ diff ... b/include/drm/i915_drm.h /* Userspace can request & wait on irq's: */ typedef struct drm_i915_irq_emit { -@@ -314,6 +335,10 @@ +@@ -314,6 +338,10 @@ int *irq_seq; } drm_i915_irq_emit_t; @@ -88,7 +106,7 @@ diff ... b/include/drm/i915_drm.h typedef struct drm_i915_irq_wait { int irq_seq; } drm_i915_irq_wait_t; -@@ -369,6 +394,11 @@ +@@ -369,6 +397,11 @@ int *value; } drm_i915_getparam_t; @@ -100,7 +118,7 @@ diff ... b/include/drm/i915_drm.h /* Ioctl to set kernel params: */ #define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 -@@ -392,6 +422,13 @@ +@@ -392,6 +425,13 @@ int *region_offset; /* offset from start of fb or agp */ } drm_i915_mem_alloc_t; diff --git a/usr/src/uts/common/drm/i915_drm.h b/usr/src/uts/common/drm/i915_drm.h index c452a6c..5a6bdb4 100644 --- a/usr/src/uts/common/drm/i915_drm.h +++ b/usr/src/uts/common/drm/i915_drm.h @@ -238,11 +238,14 @@ typedef struct _drm_i915_sarea { #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) #define DRM_IOCTL_I915_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLIP) #define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) -#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) +/* I915_IRQ_EMIT is IOW not IOWR because it does its own copyout. */ +#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) #define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) -#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) +/* I915_GETPARAM is IOW not IOWR because it does its own copyout. */ +#define DRM_IOCTL_I915_GETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) #define DRM_IOCTL_I915_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t) -#define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) +/* I915_ALLOC is IOW not IOWR because it's a noop */ +#define DRM_IOCTL_I915_ALLOC DRM_IOW( DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) #define DRM_IOCTL_I915_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t) #define DRM_IOCTL_I915_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t) #define DRM_IOCTL_I915_CMDBUFFER DRM_IOW( DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t) |