diff mbox series

drm/i915/fbc: Disable fbc with VT-d also with kbl and cfl

Message ID 20180925133803.23677-1-mika.kuoppala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/fbc: Disable fbc with VT-d also with kbl and cfl | expand

Commit Message

Mika Kuoppala Sept. 25, 2018, 1:38 p.m. UTC
Using fbc with VT-d flickers also on kbl and cfl.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Ville Syrjala Sept. 25, 2018, 3:15 p.m. UTC | #1
On Tue, Sep 25, 2018 at 04:38:03PM +0300, Mika Kuoppala wrote:
> Using fbc with VT-d flickers also on kbl and cfl.
> 
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: <stable@vger.kernel.org> # v4.9+
> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_fbc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> index 74d425c700ef..a149f08c1b79 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -1275,9 +1275,10 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
>  
>  static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv)
>  {
> -	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
> +	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,kbl,cfl */

The hsds seem to be saying that this was fixed in kbl/cnl. I guess the
flicker could be due to a different vt-d vs. fbc issue.

Is the chicken bit in CHICKEN_PIPESL in the correct position?

Hmm. Bspec doesn't list chicken bit for glk. That would seem to suggest
that we need this w/a for glk as well.

>  	if (intel_vtd_active() &&
> -	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))) {
> +	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv) ||
> +	     IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))) {
>  		DRM_INFO("Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
>  		return true;
>  	}
> -- 
> 2.17.1
Mika Kuoppala Sept. 26, 2018, 12:56 p.m. UTC | #2
Ville Syrjälä <ville.syrjala@linux.intel.com> writes:

> On Tue, Sep 25, 2018 at 04:38:03PM +0300, Mika Kuoppala wrote:
>> Using fbc with VT-d flickers also on kbl and cfl.
>> 
>> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Cc: <stable@vger.kernel.org> # v4.9+
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_fbc.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
>> index 74d425c700ef..a149f08c1b79 100644
>> --- a/drivers/gpu/drm/i915/intel_fbc.c
>> +++ b/drivers/gpu/drm/i915/intel_fbc.c
>> @@ -1275,9 +1275,10 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
>>  
>>  static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv)
>>  {
>> -	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
>> +	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,kbl,cfl */
>
> The hsds seem to be saying that this was fixed in kbl/cnl. I guess the
> flicker could be due to a different vt-d vs. fbc issue.
>

I was trusting the wa database on this one.

> Is the chicken bit in CHICKEN_PIPESL in the correct position?

Yes it is zero.

>
> Hmm. Bspec doesn't list chicken bit for glk. That would seem to suggest
> that we need this w/a for glk as well.

Agreed. The questio is that should we follow bspec and logic or
leave it until we get a report if it is a problem?

cfl is close enough|similar in this respect that we mimic
kbl with it?

Thanks,
-Mika

>
>>  	if (intel_vtd_active() &&
>> -	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))) {
>> +	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv) ||
>> +	     IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))) {
>>  		DRM_INFO("Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
>>  		return true;
>>  	}
>> -- 
>> 2.17.1
>
> -- 
> Ville Syrjälä
> Intel
Rodrigo Vivi Sept. 26, 2018, 1:40 p.m. UTC | #3
On Wed, Sep 26, 2018 at 03:56:39PM +0300, Mika Kuoppala wrote:
> Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
> 
> > On Tue, Sep 25, 2018 at 04:38:03PM +0300, Mika Kuoppala wrote:
> >> Using fbc with VT-d flickers also on kbl and cfl.
> >> 
> >> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> Cc: <stable@vger.kernel.org> # v4.9+
> >> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/intel_fbc.c | 5 +++--
> >>  1 file changed, 3 insertions(+), 2 deletions(-)
> >> 
> >> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> >> index 74d425c700ef..a149f08c1b79 100644
> >> --- a/drivers/gpu/drm/i915/intel_fbc.c
> >> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> >> @@ -1275,9 +1275,10 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
> >>  
> >>  static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv)
> >>  {
> >> -	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
> >> +	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,kbl,cfl */
> >
> > The hsds seem to be saying that this was fixed in kbl/cnl. I guess the
> > flicker could be due to a different vt-d vs. fbc issue.
> >
> 
> I was trusting the wa database on this one.

I believe it would be worth to trust the wa_database,
but this database can be tricky too...

Like on this case it is listed for KBL, but A0 only
and not listed for CFL.

> 
> > Is the chicken bit in CHICKEN_PIPESL in the correct position?
> 
> Yes it is zero.
> 
> >
> > Hmm. Bspec doesn't list chicken bit for glk. That would seem to suggest
> > that we need this w/a for glk as well.
> 
> Agreed. The questio is that should we follow bspec and logic or
> leave it until we get a report if it is a problem?
> 
> cfl is close enough|similar in this respect that we mimic
> kbl with it?

yes, we can safely consider it is similar to latest steppings of KBL.

> 
> Thanks,
> -Mika
> 
> >
> >>  	if (intel_vtd_active() &&
> >> -	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))) {
> >> +	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv) ||
> >> +	     IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))) {
> >>  		DRM_INFO("Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
> >>  		return true;
> >>  	}
> >> -- 
> >> 2.17.1
> >
> > -- 
> > Ville Syrjälä
> > Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 74d425c700ef..a149f08c1b79 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -1275,9 +1275,10 @@  static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
 
 static bool need_fbc_vtd_wa(struct drm_i915_private *dev_priv)
 {
-	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
+	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,kbl,cfl */
 	if (intel_vtd_active() &&
-	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))) {
+	    (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv) ||
+	     IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))) {
 		DRM_INFO("Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
 		return true;
 	}