diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-06 11:28:59 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-06 12:36:30 -0400 |
commit | 90cad095eeaa43711d60066096cddaf0d3b58bf6 (patch) | |
tree | 4c368d32140891a2bc8132a08a2fb1f374bf4b5d /drivers/gpu/drm/i915/intel_engine_cs.c | |
parent | 0db8c961209153498fe7e279b8f0d3deb81808f0 (diff) |
drm/i915: Disable MI_STORE_DATA_IMM for i915g/i915gm
The early gen3 machines (i915g/Grantsdale and i915gm/Alviso) share a lot
of characteristics in their MI/GTT blocks with gen2, and in particular
can only use physical addresses in MI_STORE_DATA_IMM. This makes it
incompatible with our usage, so include those two machines in the
blacklist to prevent usage.
v2: Make it easy for gcc and rewrite it as a switch to save some space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20170906152859.5304-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_engine_cs.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_engine_cs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index ae668340620e..23812ec23969 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c | |||
@@ -1378,6 +1378,21 @@ void intel_engines_mark_idle(struct drm_i915_private *i915) | |||
1378 | } | 1378 | } |
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | bool intel_engine_can_store_dword(struct intel_engine_cs *engine) | ||
1382 | { | ||
1383 | switch (INTEL_GEN(engine->i915)) { | ||
1384 | case 2: | ||
1385 | return false; /* uses physical not virtual addresses */ | ||
1386 | case 3: | ||
1387 | /* maybe only uses physical not virtual addresses */ | ||
1388 | return !(IS_I915G(engine->i915) || IS_I915GM(engine->i915)); | ||
1389 | case 6: | ||
1390 | return engine->class != VIDEO_DECODE_CLASS; /* b0rked */ | ||
1391 | default: | ||
1392 | return true; | ||
1393 | } | ||
1394 | } | ||
1395 | |||
1381 | #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) | 1396 | #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) |
1382 | #include "selftests/mock_engine.c" | 1397 | #include "selftests/mock_engine.c" |
1383 | #endif | 1398 | #endif |