drm/i915: Add I915_PARAM_REVISION
authorNeil Roberts <neil@linux.intel.com>
Wed, 4 Mar 2015 14:41:16 +0000 (14:41 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 17 Mar 2015 21:29:54 +0000 (22:29 +0100)
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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
include/uapi/drm/i915_drm.h

index 053e1788f5781b0c93b3e8bc35fb20d2ad4d04b9..3b64c526b6b9f25a44c324f4537b72a19daa21b4 100644 (file)
@@ -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;
index 6eed16b92a24192a92c4fc920dbfafa0bca3872a..b768f3b21eaa94d3e4a42fede8edac927cf8eb9e 100644 (file)
@@ -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;