diff mbox series

[1/5] drm/i915: Restore lost glk FBC 16bpp w/a

Message ID 20210412054607.18133-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix glk display version regressions | expand

Commit Message

Ville Syrjälä April 12, 2021, 5:46 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We lost the FBC 16bpp 512byte stride requirement on glk when
we switched from display version 9 to 10. Restore the w/a to
avoid enabling FBC with a bad stride and thus display garbage.

Cc: Matt Roper <matthew.d.roper@intel.com>
Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula April 14, 2021, 9:14 a.m. UTC | #1
On Mon, 12 Apr 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We lost the FBC 16bpp 512byte stride requirement on glk when
> we switched from display version 9 to 10. Restore the w/a to
> avoid enabling FBC with a bad stride and thus display garbage.
>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests")

I think this should be:

Fixes: 005e95377249 ("drm/i915/display: Eliminate most usage of INTEL_GEN()")

Right?

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 04d9c7d22b04..dcc0f73ea225 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -598,7 +598,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv,
>  		return false;
>  
>  	/* Display WA #1105: skl,bxt,kbl,cfl,glk */
> -	if (IS_DISPLAY_VER(dev_priv, 9) &&
> +	if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
>  	    modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
>  		return false;
Jani Nikula April 14, 2021, 9:17 a.m. UTC | #2
On Wed, 14 Apr 2021, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Mon, 12 Apr 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> We lost the FBC 16bpp 512byte stride requirement on glk when
>> we switched from display version 9 to 10. Restore the w/a to
>> avoid enabling FBC with a bad stride and thus display garbage.
>>
>> Cc: Matt Roper <matthew.d.roper@intel.com>
>> Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests")
>
> I think this should be:
>
> Fixes: 005e95377249 ("drm/i915/display: Eliminate most usage of INTEL_GEN()")

Strike that, the regression is in the one you mention, though arguably
it was the combination of the two that broke this, really.

>
> Right?
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_fbc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
>> index 04d9c7d22b04..dcc0f73ea225 100644
>> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
>> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
>> @@ -598,7 +598,7 @@ static bool stride_is_valid(struct drm_i915_private *dev_priv,
>>  		return false;
>>  
>>  	/* Display WA #1105: skl,bxt,kbl,cfl,glk */
>> -	if (IS_DISPLAY_VER(dev_priv, 9) &&
>> +	if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
>>  	    modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
>>  		return false;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 04d9c7d22b04..dcc0f73ea225 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -598,7 +598,7 @@  static bool stride_is_valid(struct drm_i915_private *dev_priv,
 		return false;
 
 	/* Display WA #1105: skl,bxt,kbl,cfl,glk */
-	if (IS_DISPLAY_VER(dev_priv, 9) &&
+	if ((IS_DISPLAY_VER(dev_priv, 9) || IS_GEMINILAKE(dev_priv)) &&
 	    modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
 		return false;