drm/i915: fix swizzling on gen6+
Subsystems (2)
PATCH 1/1 drm/i915: fix swizzling on gen6+
Fixes tests/gem_tiled_pread on my snb. I know, mesa doesn't use this on gen6+, but I also hate failing testcases.
--- drivers/gpu/drm/i915/i915_gem_tiling.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_gem_tiling.c +4 -1
@@ -92,7 +92,10 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)uint32_t swizzle_x =I915_BIT_6_SWIZZLE_UNKNOWN ;uint32_t swizzle_y =I915_BIT_6_SWIZZLE_UNKNOWN ; -if (INTEL_INFO (dev)->gen >=5 ) { +if (INTEL_INFO (dev)->gen >=6 ) { + swizzle_x =I915_BIT_6_SWIZZLE_NONE ; + swizzle_y =I915_BIT_6_SWIZZLE_NONE ; + }else if (IS_GEN5 (dev)) {/* On Ironlake whatever DRAM config, GPU always do * same swizzling setup. */
Signature · 1 line
1.7.6
Quoted 2 lines · Daniel Vetter
Fixes tests/gem_tiled_pread on my snb. I know, mesa doesn't use this on gen6+, but I also hate failing testcases.
Hmm, I thought gen6 also has DRAM configuration registers that we were meant to set and to follow. Not that I could actually find the cross-references! I've been surprised that it works and scared to poke too hard just in case it was broken underneath. ;-) -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 8 lines · Chris Wilson
Quoted 2 lines · Daniel Vetter
Fixes tests/gem_tiled_pread on my snb. I know, mesa doesn't use this on gen6+, but I also hate failing testcases.
Hmm, I thought gen6 also has DRAM configuration registers that we were meant to set and to follow. Not that I could actually find the cross-references! I've been surprised that it works and scared to poke too hard just in case it was broken underneath. ;-)
Well, I've checked with my ilk and snb, and now it works for both. ymmv. The other options is to return SWIZZLE_UNKOWN back to userspace and disable the tests on gen5+. I don't care too much either way, but I think making it work is less risky. And now that qa actually runs our tests, we might even catch this earlier.
-Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48
Quoted 10 lines · Daniel Vetter
Quoted 8 lines · Chris Wilson
Quoted 2 lines · Daniel Vetter
Fixes tests/gem_tiled_pread on my snb. I know, mesa doesn't use this on gen6+, but I also hate failing testcases.
Hmm, I thought gen6 also has DRAM configuration registers that we were meant to set and to follow. Not that I could actually find the cross-references! I've been surprised that it works and scared to poke too hard just in case it was broken underneath. ;-)
Quoted 5 lines
Well, I've checked with my ilk and snb, and now it works for both. ymmv. The other options is to return
SWIZZLE_UNKOWNback to userspace and disable the tests on gen5+. I don't care too much either way, but I think making it work is less risky. And now that qa actually runs our tests, we might even catch this earlier.
I suspect we are missing some code to handle atypical configurations. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Hi Keith,
This one fixes a testcase from intel-gpu-tools. No actual userspace depends upon it, afaics. The other option is to stop supporting this on gen6+ and return SWIZZLE_UNKOWN. I don't mind either way, I just don't like broken interfaces ;-)
Yours, Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48