diff mbox

drm/i915/glk: Don't allow 12 bpc when htotal is too big

Message ID 20170424104718.26448-1-ander.conselvan.de.oliveira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ander Conselvan de Oliveira April 24, 2017, 10:47 a.m. UTC
Display workaround #1139 for Geminilake instructs us to restrict HDMI
to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
to generate a proper signal and is left in a state where corruption is
seen with other modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
Cc: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Ander Conselvan de Oliveira April 24, 2017, 10:56 a.m. UTC | #1
On Mon, 2017-04-24 at 13:47 +0300, Ander Conselvan de Oliveira wrote:
> Display workaround #1139 for Geminilake instructs us to restrict HDMI
> to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
> to generate a proper signal and is left in a state where corruption is
> seen with other modes.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>

Perhaps this should have

Fixes: 14292b7ff86f ("drm/i915: allow HDMI 2.0 clock rates")

since it is only after that patch that the issue would be exposed, even though
is not the cause for it. Jani?

Ander

> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 6efc3cb..52f0b2d 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1327,6 +1327,11 @@ static bool hdmi_12bpc_possible(struct intel_crtc_state *crtc_state)
>  			return false;
>  	}
>  
> +	/* Display Wa #1139 */
> +	if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> +	    crtc_state->base.adjusted_mode.htotal > 5460)
> +		return false;
> +
>  	return true;
>  }
>
Sharma, Shashank April 24, 2017, 11:19 a.m. UTC | #2
Regards

Shashank


On 4/24/2017 4:17 PM, Ander Conselvan de Oliveira wrote:
> Display workaround #1139 for Geminilake instructs us to restrict HDMI
> to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
> to generate a proper signal and is left in a state where corruption is
> seen with other modes.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 6efc3cb..52f0b2d 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1327,6 +1327,11 @@ static bool hdmi_12bpc_possible(struct intel_crtc_state *crtc_state)
>   			return false;
>   	}
>   
> +	/* Display Wa #1139 */
> +	if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> +	    crtc_state->base.adjusted_mode.htotal > 5460)
Small inputs:
- We might wanna extend this for CNL too, as the WAR is valid for it 
too. I am not sure it should be this same patch or not.
- We need to modify this check not to affect the YCBCR 420 modes, as 
there won't be any change between the timings of a YCBCR mode and a
   normal mode (apart from a flag), but htotal should be valid in YCBCR 
420 case. But I can handle this part while sending second patch set of
   YCBCR 420 handling.
- Also, should we reject 12BPC totally, or just clamp htotal to max 
possible (5460) and go ahead? Ville ?

In any case, please feel free to use:
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
> +		return false;
> +
>   	return true;
>   }
>
Jani Nikula April 24, 2017, 11:31 a.m. UTC | #3
On Mon, 24 Apr 2017, Ander Conselvan De Oliveira <conselvan2@gmail.com> wrote:
> On Mon, 2017-04-24 at 13:47 +0300, Ander Conselvan de Oliveira wrote:
>> Display workaround #1139 for Geminilake instructs us to restrict HDMI
>> to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
>> to generate a proper signal and is left in a state where corruption is
>> seen with other modes.
>> 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
>> Cc: Shashank Sharma <shashank.sharma@intel.com>
>> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
>
> Perhaps this should have
>
> Fixes: 14292b7ff86f ("drm/i915: allow HDMI 2.0 clock rates")
>
> since it is only after that patch that the issue would be exposed, even though
> is not the cause for it. Jani?

I don't mind/care too much either way, because it's only GLK <= A1.

BR,
Jani.



>
> Ander
>
>> ---
>>  drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>> index 6efc3cb..52f0b2d 100644
>> --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> @@ -1327,6 +1327,11 @@ static bool hdmi_12bpc_possible(struct intel_crtc_state *crtc_state)
>>  			return false;
>>  	}
>>  
>> +	/* Display Wa #1139 */
>> +	if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
>> +	    crtc_state->base.adjusted_mode.htotal > 5460)
>> +		return false;
>> +
>>  	return true;
>>  }
>>
Ander Conselvan de Oliveira April 25, 2017, 7:10 a.m. UTC | #4
On Mon, 2017-04-24 at 16:49 +0530, Sharma, Shashank wrote:
> Regards
> 
> Shashank
> 
> 
> On 4/24/2017 4:17 PM, Ander Conselvan de Oliveira wrote:
> > Display workaround #1139 for Geminilake instructs us to restrict HDMI
> > to 8 bpc when htotal is greater than 5460. Otherwise, the pipe is unable
> > to generate a proper signal and is left in a state where corruption is
> > seen with other modes.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100440
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_hdmi.c | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 6efc3cb..52f0b2d 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -1327,6 +1327,11 @@ static bool hdmi_12bpc_possible(struct intel_crtc_state *crtc_state)
> >   			return false;
> >   	}
> >   
> > +	/* Display Wa #1139 */
> > +	if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> > +	    crtc_state->base.adjusted_mode.htotal > 5460)
> 
> Small inputs:
> - We might wanna extend this for CNL too, as the WAR is valid for it 
> too. I am not sure it should be this same patch or not.

None of the CNL patches landed yet, so I think we should include this in the
patch/series that enables hdmi 2.0 clocks for it.

> - We need to modify this check not to affect the YCBCR 420 modes, as 
> there won't be any change between the timings of a YCBCR mode and a
>    normal mode (apart from a flag), but htotal should be valid in YCBCR 
> 420 case. But I can handle this part while sending second patch set of
>    YCBCR 420 handling.

Thanks.

> - Also, should we reject 12BPC totally, or just clamp htotal to max 
> possible (5460) and go ahead? Ville ?

Since this is only up to GLK A1, I don't think it is worth the trouble.

Ander

> 
> In any case, please feel free to use:
> Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
> > +		return false;
> > +
> >   	return true;
> >   }
> >   
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ander Conselvan de Oliveira April 26, 2017, 4:07 p.m. UTC | #5
On Mon, 2017-04-24 at 11:22 +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/glk: Don't allow 12 bpc when htotal is too big
> URL   : https://patchwork.freedesktop.org/series/23451/
> State : success

Pushed, thanks for reviewing.

Ander

> 
> == Summary ==
> 
> Series 23451v1 drm/i915/glk: Don't allow 12 bpc when htotal is too big
> https://patchwork.freedesktop.org/api/1.0/series/23451/revisions/1/mbox/
> 
> Test gem_exec_flush:
>         Subgroup basic-batch-kernel-default-uc:
>                 fail       -> PASS       (fi-snb-2600) fdo#100007
> 
> fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
> 
> fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:429s
> fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:430s
> fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:576s
> fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:506s
> fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time:564s
> fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:490s
> fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:493s
> fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:415s
> fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:410s
> fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:425s
> fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:494s
> fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:464s
> fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:461s
> fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:562s
> fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:450s
> fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:575s
> fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:457s
> fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:497s
> fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:429s
> fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:529s
> fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time:398s
> 
> 9fb4b60bfa8c532ad6eda05af002c6b2f090d97f drm-tip: 2017y-04m-24d-09h-40m-53s UTC integration manifest
> 7fa2f63 drm/i915/glk: Don't allow 12 bpc when htotal is too big
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4536/
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 6efc3cb..52f0b2d 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1327,6 +1327,11 @@  static bool hdmi_12bpc_possible(struct intel_crtc_state *crtc_state)
 			return false;
 	}
 
+	/* Display Wa #1139 */
+	if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
+	    crtc_state->base.adjusted_mode.htotal > 5460)
+		return false;
+
 	return true;
 }