<div dir="ltr"><div><span style="font-size:14px">Hi all,</span></div><span style="font-size:14px"><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">The patch works: </span>drivers/gpu/drm/drm_edid.c</div><div>I switch 4K@60 and 4K@30 monitors some times, monitors show correct output.</div><div>Thanks for your help.<br></div><div><br></div><div>What are the steps to close the issue in freedesktop? Append the patch by<font color="#000000"> <span style="font-size:small">Ville Syrjälä, then I close it?</span></font></div></span><span style="font-size:14px"><div><br></div><div>Antony</div></span><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:14.4444px;background-color:rgb(255,255,255)"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote">2018-04-25 3:36 GMT+08:00 Daniel Vetter <span dir="ltr"><<a href="mailto:daniel@ffwll.ch" target="_blank">daniel@ffwll.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Apr 24, 2018 at 05:26:30PM +0300, Ville Syrjälä wrote:<br>
> On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:<br>
> > On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:<br>
> > > From: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a><wbr>><br>
> > > <br>
> > > We're currently failing to reset everything in display_info.hdmi<br>
> > > which will potentially cause us to use stale information when<br>
> > > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor<br>
> > > with a HDMI 1.x monitor we will continue to think that the monitor<br>
> > > supports scrambling. That will lead to a black screen since the<br>
> > > HDMI 1.x monitor won't understand the scrambled signal.<br>
> > > <br>
> > > Fix the problem by clearing display_info.hdmi fully. And while at<br>
> > > eliminate some duplicated code by calling drm_reset_display_info()<br>
> > > in drm_add_display_info().<br>
> > > <br>
> > > Cc: Antony Chen <<a href="mailto:antonychen@qnap.com">antonychen@qnap.com</a>><br>
> > > Cc: Shashank Sharma <<a href="mailto:shashank.sharma@intel.com">shashank.sharma@intel.com</a>><br>
> > > Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=105655" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=105655</a><br>
> > > Signed-off-by: Ville Syrjälä <<a href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a><wbr>><br>
> > > ---<br>
> > > drivers/gpu/drm/drm_edid.c | 11 +++--------<br>
> > > 1 file changed, 3 insertions(+), 8 deletions(-)<br>
> > > <br>
> > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c<br>
> > > index 134069f36482..39f1db4acda4 100644<br>
> > > --- a/drivers/gpu/drm/drm_edid.c<br>
> > > +++ b/drivers/gpu/drm/drm_edid.c<br>
> > > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)<br>
> > > info->max_tmds_clock = 0;<br>
> > > info->dvi_dual = false;<br>
> > > info->has_hdmi_infoframe = false;<br>
> > > + memset(&info->hdmi, 0, sizeof(info->hdmi));<br>
> > > <br>
> > > info->non_desktop = 0;<br>
> > > }<br>
> > > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi<br>
> > > <br>
> > > u32 quirks = edid_get_quirks(edid);<br>
> > > <br>
> > > + drm_reset_display_info(<wbr>connector);<br>
> > > +<br>
> > <br>
> > Strictly speaking this is a separate bugfix, for the case where you<br>
> > immediately go from one output to a different one. Keith already fixed the<br>
> > case where at least somewhere in between you go to the disconnected state<br>
> > in:<br>
> > <br>
> > commit 170178fe99dd212bf25e70c89bc4b6<wbr>e195564ffc<br>
> > Author: Keith Packard <<a href="mailto:keithp@keithp.com">keithp@keithp.com</a>><br>
> > Date: Wed Dec 13 00:44:26 2017 -0800<br>
> > <br>
> > drm: Update edid-derived drm_display_info fields at edid property set [v2]<br>
> > <br>
> > With the above explained in the commit message:<br>
> <br>
> The drm_reset_display_info() call is just the "deduplicate the code"<br>
> part. The memset() is the bugfix, and applies in all cases.<br>
<br>
Hm ... I guess my brain wasn't fully working.<br>
<br>
Reviewed-by: Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>><br>
<br>
as-is.<br>
-Daniel<br>
<br>
> <br>
> > <br>
> > Reviewed-by: Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>><br>
> > <br>
> > > info->width_mm = edid->width_cm * 10;<br>
> > > info->height_mm = edid->height_cm * 10;<br>
> > > <br>
> > > - /* driver figures it out in this case */<br>
> > > - info->bpc = 0;<br>
> > > - info->color_formats = 0;<br>
> > > - info->cea_rev = 0;<br>
> > > - info->max_tmds_clock = 0;<br>
> > > - info->dvi_dual = false;<br>
> > > - info->has_hdmi_infoframe = false;<br>
> > > -<br>
> > > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);<br>
> > > <br>
> > > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);<br>
> > > -- <br>
> > > 2.16.1<br>
> > > <br>
> > > ______________________________<wbr>_________________<br>
> > > Intel-gfx mailing list<br>
> > > <a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.<wbr>org</a><br>
> > > <a href="https://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/intel-gfx</a><br>
> > <br>
> > -- <br>
> > Daniel Vetter<br>
> > Software Engineer, Intel Corporation<br>
> > <a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
<span class="gmail-HOEnZb"><font color="#888888">> <br>
> -- <br>
> Ville Syrjälä<br>
> Intel<br>
<br>
-- <br>
Daniel Vetter<br>
Software Engineer, Intel Corporation<br>
<a href="http://blog.ffwll.ch" rel="noreferrer" target="_blank">http://blog.ffwll.ch</a><br>
</font></span></blockquote></div><br></div></div>