Skip to content

Commit

Permalink
drm/i915: Add I915_PARAM_REVISION
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Neil Roberts authored and Daniel Vetter committed Mar 17, 2015
1 parent 1063418 commit 27cd446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/uapi/drm/i915_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 27cd446

Please sign in to comment.