Skip to content

Commit 27cd446

Browse files
bpeeldanvet
authored andcommitted
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. Signed-off-by: Neil Roberts <neil@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 1063418 commit 27cd446

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/i915/i915_dma.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
6868
case I915_PARAM_CHIPSET_ID:
6969
value = dev->pdev->device;
7070
break;
71+
case I915_PARAM_REVISION:
72+
value = dev->pdev->revision;
73+
break;
7174
case I915_PARAM_HAS_GEM:
7275
value = 1;
7376
break;

include/uapi/drm/i915_drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ typedef struct drm_i915_irq_wait {
347347
#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
348348
#define I915_PARAM_MMAP_VERSION 30
349349
#define I915_PARAM_HAS_BSD2 31
350+
#define I915_PARAM_REVISION 32
350351

351352
typedef struct drm_i915_getparam {
352353
int param;

0 commit comments

Comments
 (0)