Skip to contentSkip to conversation

drm/i915: Add I915_PARAM_REVISION

PATCH In review Neil Roberts 3 participants 3 messages Mar 4, 2015 – Mar 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Add I915_PARAM_REVISION

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.

---
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(+)
drivers/gpu/drm/i915/i915_dma.c +3 -0
index 0312879..36dd1df 100644
@@ -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;
include/uapi/drm/i915_drm.h +1 -0
index 6eed16b..b768f3b 100644
@@ -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;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 6 lines · Neil Roberts

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.

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

Cheers, Daniel

Quoted 46 lines

---
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(+)
drivers/gpu/drm/i915/i915_dma.c +3 -0
index 0312879..36dd1df 100644
@@ -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;
include/uapi/drm/i915_drm.h +1 -0
index 6eed16b..b768f3b 100644
@@ -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;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to Neil Roberts
Quoted 6 lines · Neil Roberts

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.

Quoted 8 lines

---
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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx