public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/2] A couple of fixes on top of the recent W/A work
@ 2015-02-11 18:21 Damien Lespiau
  2015-02-11 18:21 ` [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check Damien Lespiau
  2015-02-11 18:21 ` [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5 Damien Lespiau
  0 siblings, 2 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-02-11 18:21 UTC (permalink / raw)
  To: intel-gfx

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

-- 
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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check
  2015-02-11 18:21 [PATCH 0/2] A couple of fixes on top of the recent W/A work Damien Lespiau
@ 2015-02-11 18:21 ` Damien Lespiau
  2015-02-12 13:33   ` Nick Hoath
  2015-02-11 18:21 ` [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5 Damien Lespiau
  1 sibling, 1 reply; 7+ messages in thread
From: Damien Lespiau @ 2015-02-11 18:21 UTC (permalink / raw)
  To: intel-gfx

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.

Cc: Nick Hoath <nicholas.hoath@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 2060610..8735e56 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -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.
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5
  2015-02-11 18:21 [PATCH 0/2] A couple of fixes on top of the recent W/A work Damien Lespiau
  2015-02-11 18:21 ` [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check Damien Lespiau
@ 2015-02-11 18:21 ` Damien Lespiau
  2015-02-12 13:36   ` Nick Hoath
  2015-02-13  7:03   ` shuang.he
  1 sibling, 2 replies; 7+ messages in thread
From: Damien Lespiau @ 2015-02-11 18:21 UTC (permalink / raw)
  To: intel-gfx

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!

Cc: Nick Hoath <nicholas.hoath@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 8735e56..acc1669 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -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) {
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check
  2015-02-11 18:21 ` [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check Damien Lespiau
@ 2015-02-12 13:33   ` Nick Hoath
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Hoath @ 2015-02-12 13:33 UTC (permalink / raw)
  To: Lespiau, Damien, intel-gfx@lists.freedesktop.org

On 11/02/2015 18:21, Lespiau, Damien wrote:
> 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.
>
> Cc: Nick Hoath <nicholas.hoath@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

A bit contrived :) but:
Reviewed-by: Nick Hoath <nicholas.hoath@intel.com>

> ---
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 2060610..8735e56 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5
  2015-02-11 18:21 ` [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5 Damien Lespiau
@ 2015-02-12 13:36   ` Nick Hoath
  2015-02-13  8:59     ` Daniel Vetter
  2015-02-13  7:03   ` shuang.he
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Hoath @ 2015-02-12 13:36 UTC (permalink / raw)
  To: Lespiau, Damien, intel-gfx@lists.freedesktop.org

On 11/02/2015 18:21, Lespiau, Damien wrote:
> 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!
>
> Cc: Nick Hoath <nicholas.hoath@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Nick Hoath <nicholas.hoath@intel.com>

> ---
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 8735e56..acc1669 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -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) {
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5
  2015-02-11 18:21 ` [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5 Damien Lespiau
  2015-02-12 13:36   ` Nick Hoath
@ 2015-02-13  7:03   ` shuang.he
  1 sibling, 0 replies; 7+ messages in thread
From: shuang.he @ 2015-02-13  7:03 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, damien.lespiau

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
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
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5
  2015-02-12 13:36   ` Nick Hoath
@ 2015-02-13  8:59     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-02-13  8:59 UTC (permalink / raw)
  To: Nick Hoath; +Cc: intel-gfx@lists.freedesktop.org

On Thu, Feb 12, 2015 at 01:36:29PM +0000, Nick Hoath wrote:
> On 11/02/2015 18:21, Lespiau, Damien wrote:
> >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!
> >
> >Cc: Nick Hoath <nicholas.hoath@intel.com>
> >Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> 
> Reviewed-by: Nick Hoath <nicholas.hoath@intel.com>

Merged four more skl wa patches, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-13  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 18:21 [PATCH 0/2] A couple of fixes on top of the recent W/A work Damien Lespiau
2015-02-11 18:21 ` [PATCH 1/2] drm/i915/skl: Fix always true comparison in a revision id check Damien Lespiau
2015-02-12 13:33   ` Nick Hoath
2015-02-11 18:21 ` [PATCH 2/2] drm/i915/skl: Use a LRI for WaDisableDgMirrorFixInHalfSliceChicken5 Damien Lespiau
2015-02-12 13:36   ` Nick Hoath
2015-02-13  8:59     ` Daniel Vetter
2015-02-13  7:03   ` shuang.he

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox