Skip to contentSkip to conversation

A couple of fixes on top of the recent W/A work

PATCH In review Damien Lespiau 4 participants 7 messages Feb 11, 2015 – Feb 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover A couple of fixes on top of the recent W/A work

The first one is minor, while it's puzzling I managed to give my r-b tag for the the second one. Oh Well.

Signature · 16 lines
Damien

Damien Lespiau (2):
  drm/i915/skl: Fix always true comparison in a revision id check
  drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5

 drivers/gpu/drm/i915/intel_ringbuffer.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/2 drm/i915/skl: Fix always true comparison in a revision id check

It's always a good idea to keep static analysis happy (also because it prompts doing the check like I proposed :), this time smatch complains:

drivers/gpu/drm/i915/intel_ringbuffer.c:891 gen9_init_workarounds() warn:
always true condition '((->dev->pdev->revision) >= (0)) => (0-255 >= 0)'

That's because revision is a u8. Tweak a bit the condition then.

---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -2
index 2060610..8735e56 100644
@@ -957,8 +957,8 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
 	WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3,
 			  GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC);
 
-	if (INTEL_REVID(dev) >= SKL_REVID_A0 &&
-	    INTEL_REVID(dev) <= SKL_REVID_B0) {
+	if (INTEL_REVID(dev) == SKL_REVID_A0 ||
+	    INTEL_REVID(dev) == SKL_REVID_B0) {
 		/*
 		* WaDisableDgMirrorFixInHalfSliceChicken5:skl
 		* This is a pre-production w/a.
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check

Quoted 10 lines · Damien

It's always a good idea to keep static analysis happy (also because it prompts doing the check like I proposed :), this time smatch complains:

drivers/gpu/drm/i915/intel_ringbuffer.c:891 gen9_init_workarounds() warn:

   always true condition '((->dev->pdev->revision) >= (0)) => (0-255 >= 0)'

That's because revision is a u8. Tweak a bit the condition then.

A bit contrived :) but:

Quoted 10 lines
---
  drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
index 2060610..8735e56 100644

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 964

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -2
@@ -957,8 +957,8 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
  	WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3,
  			  GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC);
 
-	if (INTEL_REVID(dev) >= SKL_REVID_A0 &&
-	    INTEL_REVID(dev) <= SKL_REVID_B0) {
+	if (INTEL_REVID(dev) == SKL_REVID_A0 ||
+	    INTEL_REVID(dev) == SKL_REVID_B0) {
  		/*
  		* WaDisableDgMirrorFixInHalfSliceChicken5:skl
  		* This is a pre-production w/a.

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

PATCH 2/2 drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5

In reply to Damien Lespiau

I have no idea how that crept in, but we need to do the write from the ring and this is a masked register. Two fixes in 1!

---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +3 -7
index 8735e56..acc1669 100644
@@ -959,13 +959,9 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
 
 	if (INTEL_REVID(dev) == SKL_REVID_A0 ||
 	    INTEL_REVID(dev) == SKL_REVID_B0) {
-		/*
-		* WaDisableDgMirrorFixInHalfSliceChicken5:skl
-		* This is a pre-production w/a.
-		*/
-		I915_WRITE(GEN9_HALF_SLICE_CHICKEN5,
-			I915_READ(GEN9_HALF_SLICE_CHICKEN5) &
-			~GEN9_DG_MIRROR_FIX_ENABLE);
+		/* WaDisableDgMirrorFixInHalfSliceChicken5:skl */
+		WA_CLR_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN5,
+				  GEN9_DG_MIRROR_FIX_ENABLE);
 	}
 
 	if (INTEL_REVID(dev) >= SKL_REVID_C0) {
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5

Quoted 5 lines · Damien

I have no idea how that crept in, but we need to do the write from the ring and this is a masked register. Two fixes in 1!

Quoted 16 lines
---
  drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++-------
  1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -3
index 8735e56..acc1669 100644
@@ -959,13 +959,9 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
 
  	if (INTEL_REVID(dev) == SKL_REVID_A0 ||
  	    INTEL_REVID(dev) == SKL_REVID_B0) {
-		/*
-		* WaDisableDgMirrorFixInHalfSliceChicken5:skl
-		* This is a pre-production w/a.

drivers/gpu/drm/i915/intel_ringbuffer.c static int gen9_init_workarounds(struct intel_engine_cs *ring) · line 967

Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +3 -4
-		*/
-		I915_WRITE(GEN9_HALF_SLICE_CHICKEN5,
-			I915_READ(GEN9_HALF_SLICE_CHICKEN5) &
-			~GEN9_DG_MIRROR_FIX_ENABLE);
+		/* WaDisableDgMirrorFixInHalfSliceChicken5:skl */
+		WA_CLR_BIT_MASKED(GEN9_HALF_SLICE_CHICKEN5,
+				  GEN9_DG_MIRROR_FIX_ENABLE);
  	}
 
  	if (INTEL_REVID(dev) >= SKL_REVID_C0) {

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5

Quoted 8 lines · Nick Hoath
Quoted 5 lines · Damien

I have no idea how that crept in, but we need to do the write from the ring and this is a masked register. Two fixes in 1!

Merged four more skl wa patches, thanks.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5

In reply to Damien Lespiau

Task id: 5763 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  282/282              282/282
ILK                                  313/313              313/313
SNB                                  309/323              309/323
IVB                                  380/380              380/380
BYT                                  296/296              296/296
HSW                                  425/425              425/425

BDW -1 318/318 317/318
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BDW igt_gem_gtt_hog PASS(8) DMESG_WARN(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx