All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Add I915_PARAM_REVISION
@ 2015-03-04 14:41 Neil Roberts
  2015-03-04 16:16 ` Daniel Vetter
  2015-03-27 19:18 ` Jesse Barnes
  0 siblings, 2 replies; 3+ messages in thread
From: Neil Roberts @ 2015-03-04 14:41 UTC (permalink / raw)
  To: intel-gfx

Adds a parameter which can be used with DRM_I915_GETPARAM to query the
GPU revision. The intention is to use this in Mesa to implement the
WaDisableSIMD16On3SrcInstr workaround on Skylake but only for
revision 2.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
---
The corresponding Mesa patches are here:

http://lists.freedesktop.org/archives/mesa-dev/2015-March/078534.html

and the libdrm patch is here:

http://lists.freedesktop.org/archives/dri-devel/2015-March/078645.html

 drivers/gpu/drm/i915/i915_dma.c | 3 +++
 include/uapi/drm/i915_drm.h     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 0312879..36dd1df 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -68,6 +68,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
 	case I915_PARAM_CHIPSET_ID:
 		value = dev->pdev->device;
 		break;
+	case I915_PARAM_REVISION:
+		value = dev->pdev->revision;
+		break;
 	case I915_PARAM_HAS_GEM:
 		value = 1;
 		break;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 6eed16b..b768f3b 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -347,6 +347,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
 #define I915_PARAM_MMAP_VERSION          30
 #define I915_PARAM_HAS_BSD2		 31
+#define I915_PARAM_REVISION              32
 
 typedef struct drm_i915_getparam {
 	int param;
-- 
1.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Add I915_PARAM_REVISION
  2015-03-04 14:41 [PATCH] drm/i915: Add I915_PARAM_REVISION Neil Roberts
@ 2015-03-04 16:16 ` Daniel Vetter
  2015-03-27 19:18 ` Jesse Barnes
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2015-03-04 16:16 UTC (permalink / raw)
  To: Neil Roberts; +Cc: intel-gfx

On Wed, Mar 04, 2015 at 02:41:16PM +0000, Neil Roberts wrote:
> Adds a parameter which can be used with DRM_I915_GETPARAM to query the
> GPU revision. The intention is to use this in Mesa to implement the
> WaDisableSIMD16On3SrcInstr workaround on Skylake but only for
> revision 2.
> 
> Signed-off-by: Neil Roberts <neil@linux.intel.com>

Just listened to Damien explain this all and pulled it right into dinq.

Cheers, Daniel

> ---
> The corresponding Mesa patches are here:
> 
> http://lists.freedesktop.org/archives/mesa-dev/2015-March/078534.html
> 
> and the libdrm patch is here:
> 
> http://lists.freedesktop.org/archives/dri-devel/2015-March/078645.html
> 
>  drivers/gpu/drm/i915/i915_dma.c | 3 +++
>  include/uapi/drm/i915_drm.h     | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 0312879..36dd1df 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -68,6 +68,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
>  	case I915_PARAM_CHIPSET_ID:
>  		value = dev->pdev->device;
>  		break;
> +	case I915_PARAM_REVISION:
> +		value = dev->pdev->revision;
> +		break;
>  	case I915_PARAM_HAS_GEM:
>  		value = 1;
>  		break;
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 6eed16b..b768f3b 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -347,6 +347,7 @@ typedef struct drm_i915_irq_wait {
>  #define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
>  #define I915_PARAM_MMAP_VERSION          30
>  #define I915_PARAM_HAS_BSD2		 31
> +#define I915_PARAM_REVISION              32
>  
>  typedef struct drm_i915_getparam {
>  	int param;
> -- 
> 1.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Add I915_PARAM_REVISION
  2015-03-04 14:41 [PATCH] drm/i915: Add I915_PARAM_REVISION Neil Roberts
  2015-03-04 16:16 ` Daniel Vetter
@ 2015-03-27 19:18 ` Jesse Barnes
  1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2015-03-27 19:18 UTC (permalink / raw)
  To: Neil Roberts, intel-gfx

On 03/04/2015 06:41 AM, Neil Roberts wrote:
> Adds a parameter which can be used with DRM_I915_GETPARAM to query the
> GPU revision. The intention is to use this in Mesa to implement the
> WaDisableSIMD16On3SrcInstr workaround on Skylake but only for
> revision 2.
> 
> Signed-off-by: Neil Roberts <neil@linux.intel.com>
> ---
> The corresponding Mesa patches are here:
> 
> http://lists.freedesktop.org/archives/mesa-dev/2015-March/078534.html
> 
> and the libdrm patch is here:
> 
> http://lists.freedesktop.org/archives/dri-devel/2015-March/078645.html

Is this just for convenience?  We can get this info w/o privs using
libpciaccess already...

Jesse

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-27 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 14:41 [PATCH] drm/i915: Add I915_PARAM_REVISION Neil Roberts
2015-03-04 16:16 ` Daniel Vetter
2015-03-27 19:18 ` Jesse Barnes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.