intel: Update for new i915_drm.h defines.
PATCH 1/1 intel: Update for new i915_drm.h defines.
---
This syncs the code up to the kernel as of the gen7 SOL changes. It would be nice if doing this was just a straight copy of the kernel code -- there are two diffs left out. One is this hunk:
-#ifdef __KERNEL__
-/* For use by IPS driver */
-extern unsigned long i915_read_mch_val(void);
-extern bool i915_gpu_raise(void);
-extern bool i915_gpu_lower(void);
-extern bool i915_gpu_busy(void);
-extern bool i915_gpu_turbo_disable(void);
-#endif
Does anyone see any real reason to be dropping this?
The other is removing the sparse __user annotations on the structs. Could we just patch the kernel to #define it away for userland, so we could make updating this file just a matter of "cp"?
include/drm/i915_drm.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
include/drm/i915_drm.h +5 -1
@@ -228,7 +228,7 @@ typedef struct _drm_i915_sarea {#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id)#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) -#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_IOCTL_I915_OVERLAY_ATTRS, struct drm_intel_overlay_put_image) +#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)/* Allow drivers to submit batchbuffers directly to hardware, relying
@@ -282,6 +282,7 @@ typedef struct drm_i915_irq_wait {#define I915_PARAM_HAS_COHERENT_RINGS 13#define I915_PARAM_HAS_EXEC_CONSTANTS 14#define I915_PARAM_HAS_RELAXED_DELTA 15 +#define I915_PARAM_HAS_GEN7_SOL_RESET 16 typedef struct drm_i915_getparam { int param;
@@ -644,6 +645,9 @@ struct drm_i915_gem_execbuffer2 {__u64 rsvd2; }; +/** Resets the SO write offset registers for transform feedback on gen7. */ +#define I915_EXEC_GEN7_SOL_RESET (1<<8) +struct drm_i915_gem_pin {/** Handle of the buffer to be pinned. */ __u32 handle;
Signature · 1 line
1.7.7.3
Quoted 15 lines · Eric Anholt
---
This syncs the code up to the kernel as of the gen7 SOL changes. It would be nice if doing this was just a straight copy of the kernel code -- there are two diffs left out. One is this hunk:
(quoted diff) +0
-8-#ifdef __KERNEL__ -/* For use by IPS driver */ -extern unsigned long i915_read_mch_val(void); -extern bool i915_gpu_raise(void); -extern bool i915_gpu_lower(void); -extern bool i915_gpu_busy(void); -extern bool i915_gpu_turbo_disable(void); -#endif
Quoted 5 lines
Does anyone see any real reason to be dropping this?
The other is removing the sparse
__userannotations on the structs. Could we just patch the kernel to #define it away for userland, so we could make updating this file just a matter of "cp"?
$ make headers_install
in the kernel tree should do all this preprocessing for you and drop a sanitized header into usr/include/drm/i915_drm.h. Lazy me hasn't checked whether that would match up perfectly with what's in libdrm though ... -Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 15 lines · On Tue, 3 Jan 2012 19:10:00 -0800 Eric Anholt <[email protected]> wrote:
---
This syncs the code up to the kernel as of the gen7 SOL changes. It would be nice if doing this was just a straight copy of the kernel code -- there are two diffs left out. One is this hunk:
(quoted diff) +0
-8-#ifdef __KERNEL__ -/* For use by IPS driver */ -extern unsigned long i915_read_mch_val(void); -extern bool i915_gpu_raise(void); -extern bool i915_gpu_lower(void); -extern bool i915_gpu_busy(void); -extern bool i915_gpu_turbo_disable(void); -#endif
Quoted 5 lines
Does anyone see any real reason to be dropping this?
The other is removing the sparse
__userannotations on the structs. Could we just patch the kernel to #define it away for userland, so we could make updating this file just a matter of "cp"?
Having just done this locally, I'm in favor. The stuff under __KERNEL__ should be harmless; don't see why we can't just copy it.
For the __user define, we must be missing a compiler.h include somewhere in the libdrm case. If you explicitly include it do the errors go away?
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 27 lines · Jesse Barnes
Quoted 15 lines · On Tue, 3 Jan 2012 19:10:00 -0800 Eric Anholt <[email protected]> wrote:
---
This syncs the code up to the kernel as of the gen7 SOL changes. It would be nice if doing this was just a straight copy of the kernel code -- there are two diffs left out. One is this hunk:
(quoted diff) +0
-8-#ifdef __KERNEL__ -/* For use by IPS driver */ -extern unsigned long i915_read_mch_val(void); -extern bool i915_gpu_raise(void); -extern bool i915_gpu_lower(void); -extern bool i915_gpu_busy(void); -extern bool i915_gpu_turbo_disable(void); -#endifQuoted 5 lines
Does anyone see any real reason to be dropping this?
The other is removing the sparse
__userannotations on the structs. Could we just patch the kernel to #define it away for userland, so we could make updating this file just a matter of "cp"?Having just done this locally, I'm in favor. The stuff under
__KERNEL__should be harmless; don't see why we can't just copy it.
Quoted 3 lines
For the
__userdefine, we must be missing acompiler.hinclude somewhere in the libdrm case. If you explicitly include it do the errors go away?
What version of POSIX is compiler.h part of? Remember that this is userland code built across OSes (as much as we try to forget that).
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · On Wed, 04 Jan 2012 14:48:37 -0800 Eric Anholt <[email protected]> wrote:
Quoted 27 lines · Jesse Barnes
Quoted 15 lines · On Tue, 3 Jan 2012 19:10:00 -0800 Eric Anholt <[email protected]> wrote:
---
This syncs the code up to the kernel as of the gen7 SOL changes. It would be nice if doing this was just a straight copy of the kernel code -- there are two diffs left out. One is this hunk:
(quoted diff) +0
-8-#ifdef __KERNEL__ -/* For use by IPS driver */ -extern unsigned long i915_read_mch_val(void); -extern bool i915_gpu_raise(void); -extern bool i915_gpu_lower(void); -extern bool i915_gpu_busy(void); -extern bool i915_gpu_turbo_disable(void); -#endifQuoted 5 lines
Does anyone see any real reason to be dropping this?
The other is removing the sparse
__userannotations on the structs. Could we just patch the kernel to #define it away for userland, so we could make updating this file just a matter of "cp"?Having just done this locally, I'm in favor. The stuff under
__KERNEL__should be harmless; don't see why we can't just copy it.
Quoted 6 lines
Quoted 3 lines
For the
__userdefine, we must be missing acompiler.hinclude somewhere in the libdrm case. If you explicitly include it do the errors go away?What version of POSIX is
compiler.hpart of? Remember that this is userland code built across OSes (as much as we try to forget that).
It's one of the Linux kernel headers. I'm such a Linux-ist I didn't even consider an OS that might not have it. We can just #define away __user in drm.h or something to avoid adding OS deps. Or use the header install target like Daniel said and copy from that.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx