diff mbox

drm/i915/gen9: Add WaClearHIZ_WM_CHICKEN3 for bxt and glk

Message ID 20180510200708.18097-1-michel.thierry@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michel Thierry May 10, 2018, 8:07 p.m. UTC
Factor in clear values wherever required while updating destination
min/max.

References: HSDES#1604444184
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Cc: mesa-dev@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h          | 3 +++
 drivers/gpu/drm/i915/intel_workarounds.c | 4 ++++
 2 files changed, 7 insertions(+)

Comments

Mika Kuoppala May 11, 2018, 9:56 a.m. UTC | #1
Michel Thierry <michel.thierry@intel.com> writes:

> Factor in clear values wherever required while updating destination
> min/max.
>
> References: HSDES#1604444184
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> Cc: mesa-dev@lists.freedesktop.org
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Chris Wilson May 11, 2018, 12:19 p.m. UTC | #2
Quoting Mika Kuoppala (2018-05-11 10:56:49)
> Michel Thierry <michel.thierry@intel.com> writes:
> 
> > Factor in clear values wherever required while updating destination
> > min/max.
> >
> > References: HSDES#1604444184
> > Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> > Cc: mesa-dev@lists.freedesktop.org
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > Cc: Oscar Mateo <oscar.mateo@intel.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Cc: stable?
-Chris
Mika Kuoppala May 11, 2018, 12:43 p.m. UTC | #3
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Mika Kuoppala (2018-05-11 10:56:49)
>> Michel Thierry <michel.thierry@intel.com> writes:
>> 
>> > Factor in clear values wherever required while updating destination
>> > min/max.
>> >
>> > References: HSDES#1604444184
>> > Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> > Cc: mesa-dev@lists.freedesktop.org
>> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> > Cc: Oscar Mateo <oscar.mateo@intel.com>
>> 
>> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> Cc: stable?

Yes, we should.

-Mika
Michel Thierry May 11, 2018, 3:07 p.m. UTC | #4
On 5/11/2018 5:43 AM, Mika Kuoppala wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
>> Quoting Mika Kuoppala (2018-05-11 10:56:49)
>>> Michel Thierry <michel.thierry@intel.com> writes:
>>>
>>>> Factor in clear values wherever required while updating destination
>>>> min/max.
>>>>
>>>> References: HSDES#1604444184
>>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>>> Cc: mesa-dev@lists.freedesktop.org
>>>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>>>> Cc: Oscar Mateo <oscar.mateo@intel.com>
>>>
>>> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>>
>> Cc: stable?
> 
> Yes, we should.
> 

I think so too, although stable doesn't have the workaround refactoring 
yet, the change will be in intel_engine_cs.c instead.

> -Mika
>
Chris Wilson May 13, 2018, 9:31 a.m. UTC | #5
Quoting Michel Thierry (2018-05-11 16:07:55)
> On 5/11/2018 5:43 AM, Mika Kuoppala wrote:
> > Chris Wilson <chris@chris-wilson.co.uk> writes:
> > 
> >> Quoting Mika Kuoppala (2018-05-11 10:56:49)
> >>> Michel Thierry <michel.thierry@intel.com> writes:
> >>>
> >>>> Factor in clear values wherever required while updating destination
> >>>> min/max.
> >>>>
> >>>> References: HSDES#1604444184
> >>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> >>>> Cc: mesa-dev@lists.freedesktop.org
> >>>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> >>>> Cc: Oscar Mateo <oscar.mateo@intel.com>
> >>>
> >>> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> >>
> >> Cc: stable?
> > 
> > Yes, we should.
> > 
> 
> I think so too, although stable doesn't have the workaround refactoring 
> yet, the change will be in intel_engine_cs.c instead.

Added the cc for stable, and pushed. We may need to send a fixup patch
later if we want it backported all the way.

Thanks,
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 085928c9005e..ee11f6ed217a 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7251,6 +7251,9 @@  enum {
 #define SLICE_ECO_CHICKEN0			_MMIO(0x7308)
 #define   PIXEL_MASK_CAMMING_DISABLE		(1 << 14)
 
+#define GEN9_WM_CHICKEN3			_MMIO(0x5588)
+#define   GEN9_FACTOR_IN_CLR_VAL_HIZ		(1 << 9)
+
 /* WaCatErrorRejectionIssue */
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		_MMIO(0x9030)
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
diff --git a/drivers/gpu/drm/i915/intel_workarounds.c b/drivers/gpu/drm/i915/intel_workarounds.c
index ec9d340fcb00..054e1dee7899 100644
--- a/drivers/gpu/drm/i915/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/intel_workarounds.c
@@ -270,6 +270,10 @@  static int gen9_ctx_workarounds_init(struct drm_i915_private *dev_priv)
 			    GEN9_PREEMPT_GPGPU_LEVEL_MASK,
 			    GEN9_PREEMPT_GPGPU_COMMAND_LEVEL);
 
+	/* WaClearHIZ_WM_CHICKEN3:bxt,glk */
+	if (IS_GEN9_LP(dev_priv))
+		WA_SET_BIT_MASKED(GEN9_WM_CHICKEN3, GEN9_FACTOR_IN_CLR_VAL_HIZ);
+
 	return 0;
 }