Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 777ee96f authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/i915: add HAS_ALIASING_PPGTT parameter for userspace



On Sanybridge a few MI read/write commands only work when ppgtt is
enabled.  Userspace therefore needs to be able to check whether ppgtt
is enabled. For added hilarity, you need to reset the "use global GTT"
bit on snb when ppgtt is enabled, otherwise it won't work.  Despite
what bspec says about automatically using ppgtt ...

Luckily PIPE_CONTROL (the only write cmd current userspace uses) is
not affected by all this, as tested by tests/gem_pipe_control_store_loop.

Reviewed-and-tested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 0ebb9829
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -790,6 +790,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
	case I915_PARAM_HAS_LLC:
		value = HAS_LLC(dev);
		break;
	case I915_PARAM_HAS_ALIASING_PPGTT:
		value = dev_priv->mm.aliasing_ppgtt ? 1 : 0;
		break;
	default:
		DRM_DEBUG_DRIVER("Unknown parameter %d\n",
				 param->param);
+2 −1
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_RELAXED_DELTA	 15
#define I915_PARAM_HAS_GEN7_SOL_RESET	 16
#define I915_PARAM_HAS_LLC     	 	 17
#define I915_PARAM_HAS_ALIASING_PPGTT	 18

typedef struct drm_i915_getparam {
	int param;