* [PATCH] drm/edid: Reset more of the display info
@ 2018-04-24 13:02 Ville Syrjala
2018-04-24 14:18 ` Daniel Vetter
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Ville Syrjala @ 2018-04-24 13:02 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, Antony Chen
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
We're currently failing to reset everything in display_info.hdmi
which will potentially cause us to use stale information when
swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
with a HDMI 1.x monitor we will continue to think that the monitor
supports scrambling. That will lead to a black screen since the
HDMI 1.x monitor won't understand the scrambled signal.
Fix the problem by clearing display_info.hdmi fully. And while at
eliminate some duplicated code by calling drm_reset_display_info()
in drm_add_display_info().
Cc: Antony Chen <antonychen@qnap.com>
Cc: Shashank Sharma <shashank.sharma@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/drm_edid.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 134069f36482..39f1db4acda4 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)
info->max_tmds_clock = 0;
info->dvi_dual = false;
info->has_hdmi_infoframe = false;
+ memset(&info->hdmi, 0, sizeof(info->hdmi));
info->non_desktop = 0;
}
@@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
u32 quirks = edid_get_quirks(edid);
+ drm_reset_display_info(connector);
+
info->width_mm = edid->width_cm * 10;
info->height_mm = edid->height_cm * 10;
- /* driver figures it out in this case */
- info->bpc = 0;
- info->color_formats = 0;
- info->cea_rev = 0;
- info->max_tmds_clock = 0;
- info->dvi_dual = false;
- info->has_hdmi_infoframe = false;
-
info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
--
2.16.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/edid: Reset more of the display info
2018-04-24 13:02 [PATCH] drm/edid: Reset more of the display info Ville Syrjala
@ 2018-04-24 14:18 ` Daniel Vetter
2018-04-24 14:26 ` Ville Syrjälä
2018-04-24 14:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-04-24 17:46 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2018-04-24 14:18 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx, Antony Chen, dri-devel
On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We're currently failing to reset everything in display_info.hdmi
> which will potentially cause us to use stale information when
> swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> with a HDMI 1.x monitor we will continue to think that the monitor
> supports scrambling. That will lead to a black screen since the
> HDMI 1.x monitor won't understand the scrambled signal.
>
> Fix the problem by clearing display_info.hdmi fully. And while at
> eliminate some duplicated code by calling drm_reset_display_info()
> in drm_add_display_info().
>
> Cc: Antony Chen <antonychen@qnap.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_edid.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 134069f36482..39f1db4acda4 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)
> info->max_tmds_clock = 0;
> info->dvi_dual = false;
> info->has_hdmi_infoframe = false;
> + memset(&info->hdmi, 0, sizeof(info->hdmi));
>
> info->non_desktop = 0;
> }
> @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
>
> u32 quirks = edid_get_quirks(edid);
>
> + drm_reset_display_info(connector);
> +
Strictly speaking this is a separate bugfix, for the case where you
immediately go from one output to a different one. Keith already fixed the
case where at least somewhere in between you go to the disconnected state
in:
commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
Author: Keith Packard <keithp@keithp.com>
Date: Wed Dec 13 00:44:26 2017 -0800
drm: Update edid-derived drm_display_info fields at edid property set [v2]
With the above explained in the commit message:
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> info->width_mm = edid->width_cm * 10;
> info->height_mm = edid->height_cm * 10;
>
> - /* driver figures it out in this case */
> - info->bpc = 0;
> - info->color_formats = 0;
> - info->cea_rev = 0;
> - info->max_tmds_clock = 0;
> - info->dvi_dual = false;
> - info->has_hdmi_infoframe = false;
> -
> info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
>
> DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> --
> 2.16.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.BAT: success for drm/edid: Reset more of the display info
2018-04-24 13:02 [PATCH] drm/edid: Reset more of the display info Ville Syrjala
2018-04-24 14:18 ` Daniel Vetter
@ 2018-04-24 14:22 ` Patchwork
2018-04-24 17:46 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-04-24 14:22 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/edid: Reset more of the display info
URL : https://patchwork.freedesktop.org/series/42191/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4086 -> Patchwork_8788 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42191/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8788:
=== IGT changes ===
==== Possible regressions ====
igt@kms_psr_sink_crc@psr_basic:
{fi-hsw-4200u}: NOTRUN -> FAIL
== Known issues ==
Here are the changes found in Patchwork_8788 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-ivb-3520m: PASS -> DMESG-WARN (fdo#106084)
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
== Participating hosts (36 -> 34) ==
Additional (1): fi-hsw-4200u
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4086 -> Patchwork_8788
CI_DRM_4086: 10d9666c9a49d47bcb5be8fa4116ef6508155aff @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4446: e5e8dafc991ee922ec159491c680caff0cfe9235 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8788: 7b7203fdea70afbb0a94169624dca292c4623d28 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4446: a2f486679f467cd6e82578384f56d4aabaa8cf2e @ git://anongit.freedesktop.org/piglit
== Linux commits ==
7b7203fdea70 drm/edid: Reset more of the display info
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8788/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/edid: Reset more of the display info
2018-04-24 14:18 ` Daniel Vetter
@ 2018-04-24 14:26 ` Ville Syrjälä
2018-04-24 19:36 ` Daniel Vetter
0 siblings, 1 reply; 9+ messages in thread
From: Ville Syrjälä @ 2018-04-24 14:26 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx, Antony Chen, dri-devel
On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:
> On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > We're currently failing to reset everything in display_info.hdmi
> > which will potentially cause us to use stale information when
> > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> > with a HDMI 1.x monitor we will continue to think that the monitor
> > supports scrambling. That will lead to a black screen since the
> > HDMI 1.x monitor won't understand the scrambled signal.
> >
> > Fix the problem by clearing display_info.hdmi fully. And while at
> > eliminate some duplicated code by calling drm_reset_display_info()
> > in drm_add_display_info().
> >
> > Cc: Antony Chen <antonychen@qnap.com>
> > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/drm_edid.c | 11 +++--------
> > 1 file changed, 3 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > index 134069f36482..39f1db4acda4 100644
> > --- a/drivers/gpu/drm/drm_edid.c
> > +++ b/drivers/gpu/drm/drm_edid.c
> > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)
> > info->max_tmds_clock = 0;
> > info->dvi_dual = false;
> > info->has_hdmi_infoframe = false;
> > + memset(&info->hdmi, 0, sizeof(info->hdmi));
> >
> > info->non_desktop = 0;
> > }
> > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
> >
> > u32 quirks = edid_get_quirks(edid);
> >
> > + drm_reset_display_info(connector);
> > +
>
> Strictly speaking this is a separate bugfix, for the case where you
> immediately go from one output to a different one. Keith already fixed the
> case where at least somewhere in between you go to the disconnected state
> in:
>
> commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
> Author: Keith Packard <keithp@keithp.com>
> Date: Wed Dec 13 00:44:26 2017 -0800
>
> drm: Update edid-derived drm_display_info fields at edid property set [v2]
>
> With the above explained in the commit message:
The drm_reset_display_info() call is just the "deduplicate the code"
part. The memset() is the bugfix, and applies in all cases.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> > info->width_mm = edid->width_cm * 10;
> > info->height_mm = edid->height_cm * 10;
> >
> > - /* driver figures it out in this case */
> > - info->bpc = 0;
> > - info->color_formats = 0;
> > - info->cea_rev = 0;
> > - info->max_tmds_clock = 0;
> > - info->dvi_dual = false;
> > - info->has_hdmi_infoframe = false;
> > -
> > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
> >
> > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> > --
> > 2.16.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* ✓ Fi.CI.IGT: success for drm/edid: Reset more of the display info
2018-04-24 13:02 [PATCH] drm/edid: Reset more of the display info Ville Syrjala
2018-04-24 14:18 ` Daniel Vetter
2018-04-24 14:22 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-04-24 17:46 ` Patchwork
2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-04-24 17:46 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
== Series Details ==
Series: drm/edid: Reset more of the display info
URL : https://patchwork.freedesktop.org/series/42191/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4086_full -> Patchwork_8788_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8788_full need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_8788_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42191/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8788_full:
=== IGT changes ===
==== Warnings ====
igt@kms_plane@plane-panning-bottom-right-pipe-a-planes:
shard-glk: SKIP -> PASS +122
== Known issues ==
Here are the changes found in Patchwork_8788_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#102887, fdo#105363)
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_rotation_crc@primary-rotation-180:
shard-hsw: PASS -> FAIL (fdo#103925)
==== Possible fixes ====
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: FAIL (fdo#102887, fdo#105363) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff:
shard-apl: FAIL (fdo#103167) -> PASS
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
== Participating hosts (6 -> 4) ==
Missing (2): shard-glkb shard-kbl
== Build changes ==
* Linux: CI_DRM_4086 -> Patchwork_8788
CI_DRM_4086: 10d9666c9a49d47bcb5be8fa4116ef6508155aff @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4446: e5e8dafc991ee922ec159491c680caff0cfe9235 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8788: 7b7203fdea70afbb0a94169624dca292c4623d28 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4446: a2f486679f467cd6e82578384f56d4aabaa8cf2e @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8788/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/edid: Reset more of the display info
2018-04-24 14:26 ` Ville Syrjälä
@ 2018-04-24 19:36 ` Daniel Vetter
2018-04-25 11:03 ` [Intel-gfx] " Antony Chen
2018-04-25 14:09 ` Ville Syrjälä
0 siblings, 2 replies; 9+ messages in thread
From: Daniel Vetter @ 2018-04-24 19:36 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx, Antony Chen, dri-devel
On Tue, Apr 24, 2018 at 05:26:30PM +0300, Ville Syrjälä wrote:
> On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:
> > On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > We're currently failing to reset everything in display_info.hdmi
> > > which will potentially cause us to use stale information when
> > > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> > > with a HDMI 1.x monitor we will continue to think that the monitor
> > > supports scrambling. That will lead to a black screen since the
> > > HDMI 1.x monitor won't understand the scrambled signal.
> > >
> > > Fix the problem by clearing display_info.hdmi fully. And while at
> > > eliminate some duplicated code by calling drm_reset_display_info()
> > > in drm_add_display_info().
> > >
> > > Cc: Antony Chen <antonychen@qnap.com>
> > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/drm_edid.c | 11 +++--------
> > > 1 file changed, 3 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > index 134069f36482..39f1db4acda4 100644
> > > --- a/drivers/gpu/drm/drm_edid.c
> > > +++ b/drivers/gpu/drm/drm_edid.c
> > > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)
> > > info->max_tmds_clock = 0;
> > > info->dvi_dual = false;
> > > info->has_hdmi_infoframe = false;
> > > + memset(&info->hdmi, 0, sizeof(info->hdmi));
> > >
> > > info->non_desktop = 0;
> > > }
> > > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
> > >
> > > u32 quirks = edid_get_quirks(edid);
> > >
> > > + drm_reset_display_info(connector);
> > > +
> >
> > Strictly speaking this is a separate bugfix, for the case where you
> > immediately go from one output to a different one. Keith already fixed the
> > case where at least somewhere in between you go to the disconnected state
> > in:
> >
> > commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
> > Author: Keith Packard <keithp@keithp.com>
> > Date: Wed Dec 13 00:44:26 2017 -0800
> >
> > drm: Update edid-derived drm_display_info fields at edid property set [v2]
> >
> > With the above explained in the commit message:
>
> The drm_reset_display_info() call is just the "deduplicate the code"
> part. The memset() is the bugfix, and applies in all cases.
Hm ... I guess my brain wasn't fully working.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
as-is.
-Daniel
>
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > > info->width_mm = edid->width_cm * 10;
> > > info->height_mm = edid->height_cm * 10;
> > >
> > > - /* driver figures it out in this case */
> > > - info->bpc = 0;
> > > - info->color_formats = 0;
> > > - info->cea_rev = 0;
> > > - info->max_tmds_clock = 0;
> > > - info->dvi_dual = false;
> > > - info->has_hdmi_infoframe = false;
> > > -
> > > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
> > >
> > > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> > > --
> > > 2.16.1
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
>
> --
> Ville Syrjälä
> Intel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/edid: Reset more of the display info
2018-04-24 19:36 ` Daniel Vetter
@ 2018-04-25 11:03 ` Antony Chen
2018-04-25 14:10 ` Ville Syrjälä
2018-04-25 14:09 ` Ville Syrjälä
1 sibling, 1 reply; 9+ messages in thread
From: Antony Chen @ 2018-04-25 11:03 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 4351 bytes --]
Hi all,
The patch works: drivers/gpu/drm/drm_edid.c
I switch 4K@60 and 4K@30 monitors some times, monitors show correct output.
Thanks for your help.
What are the steps to close the issue in freedesktop? Append the patch by Ville
Syrjälä, then I close it?
Antony
2018-04-25 3:36 GMT+08:00 Daniel Vetter <daniel@ffwll.ch>:
> On Tue, Apr 24, 2018 at 05:26:30PM +0300, Ville Syrjälä wrote:
> > On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:
> > > On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > We're currently failing to reset everything in display_info.hdmi
> > > > which will potentially cause us to use stale information when
> > > > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> > > > with a HDMI 1.x monitor we will continue to think that the monitor
> > > > supports scrambling. That will lead to a black screen since the
> > > > HDMI 1.x monitor won't understand the scrambled signal.
> > > >
> > > > Fix the problem by clearing display_info.hdmi fully. And while at
> > > > eliminate some duplicated code by calling drm_reset_display_info()
> > > > in drm_add_display_info().
> > > >
> > > > Cc: Antony Chen <antonychen@qnap.com>
> > > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > > drivers/gpu/drm/drm_edid.c | 11 +++--------
> > > > 1 file changed, 3 insertions(+), 8 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > index 134069f36482..39f1db4acda4 100644
> > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector
> *connector)
> > > > info->max_tmds_clock = 0;
> > > > info->dvi_dual = false;
> > > > info->has_hdmi_infoframe = false;
> > > > + memset(&info->hdmi, 0, sizeof(info->hdmi));
> > > >
> > > > info->non_desktop = 0;
> > > > }
> > > > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct
> drm_connector *connector, const struct edid *edi
> > > >
> > > > u32 quirks = edid_get_quirks(edid);
> > > >
> > > > + drm_reset_display_info(connector);
> > > > +
> > >
> > > Strictly speaking this is a separate bugfix, for the case where you
> > > immediately go from one output to a different one. Keith already fixed
> the
> > > case where at least somewhere in between you go to the disconnected
> state
> > > in:
> > >
> > > commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
> > > Author: Keith Packard <keithp@keithp.com>
> > > Date: Wed Dec 13 00:44:26 2017 -0800
> > >
> > > drm: Update edid-derived drm_display_info fields at edid property
> set [v2]
> > >
> > > With the above explained in the commit message:
> >
> > The drm_reset_display_info() call is just the "deduplicate the code"
> > part. The memset() is the bugfix, and applies in all cases.
>
> Hm ... I guess my brain wasn't fully working.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> as-is.
> -Daniel
>
> >
> > >
> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > >
> > > > info->width_mm = edid->width_cm * 10;
> > > > info->height_mm = edid->height_cm * 10;
> > > >
> > > > - /* driver figures it out in this case */
> > > > - info->bpc = 0;
> > > > - info->color_formats = 0;
> > > > - info->cea_rev = 0;
> > > > - info->max_tmds_clock = 0;
> > > > - info->dvi_dual = false;
> > > > - info->has_hdmi_infoframe = false;
> > > > -
> > > > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
> > > >
> > > > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> > > > --
> > > > 2.16.1
> > > >
> > > > _______________________________________________
> > > > Intel-gfx mailing list
> > > > Intel-gfx@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > >
> > > --
> > > Daniel Vetter
> > > Software Engineer, Intel Corporation
> > > http://blog.ffwll.ch
> >
> > --
> > Ville Syrjälä
> > Intel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
[-- Attachment #1.2: Type: text/html, Size: 7267 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/edid: Reset more of the display info
2018-04-24 19:36 ` Daniel Vetter
2018-04-25 11:03 ` [Intel-gfx] " Antony Chen
@ 2018-04-25 14:09 ` Ville Syrjälä
1 sibling, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2018-04-25 14:09 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx, Antony Chen, dri-devel
On Tue, Apr 24, 2018 at 09:36:29PM +0200, Daniel Vetter wrote:
> On Tue, Apr 24, 2018 at 05:26:30PM +0300, Ville Syrjälä wrote:
> > On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:
> > > On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > We're currently failing to reset everything in display_info.hdmi
> > > > which will potentially cause us to use stale information when
> > > > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> > > > with a HDMI 1.x monitor we will continue to think that the monitor
> > > > supports scrambling. That will lead to a black screen since the
> > > > HDMI 1.x monitor won't understand the scrambled signal.
> > > >
> > > > Fix the problem by clearing display_info.hdmi fully. And while at
> > > > eliminate some duplicated code by calling drm_reset_display_info()
> > > > in drm_add_display_info().
> > > >
> > > > Cc: Antony Chen <antonychen@qnap.com>
> > > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > > drivers/gpu/drm/drm_edid.c | 11 +++--------
> > > > 1 file changed, 3 insertions(+), 8 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > index 134069f36482..39f1db4acda4 100644
> > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector *connector)
> > > > info->max_tmds_clock = 0;
> > > > info->dvi_dual = false;
> > > > info->has_hdmi_infoframe = false;
> > > > + memset(&info->hdmi, 0, sizeof(info->hdmi));
> > > >
> > > > info->non_desktop = 0;
> > > > }
> > > > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
> > > >
> > > > u32 quirks = edid_get_quirks(edid);
> > > >
> > > > + drm_reset_display_info(connector);
> > > > +
> > >
> > > Strictly speaking this is a separate bugfix, for the case where you
> > > immediately go from one output to a different one. Keith already fixed the
> > > case where at least somewhere in between you go to the disconnected state
> > > in:
> > >
> > > commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
> > > Author: Keith Packard <keithp@keithp.com>
> > > Date: Wed Dec 13 00:44:26 2017 -0800
> > >
> > > drm: Update edid-derived drm_display_info fields at edid property set [v2]
> > >
> > > With the above explained in the commit message:
> >
> > The drm_reset_display_info() call is just the "deduplicate the code"
> > part. The memset() is the bugfix, and applies in all cases.
>
> Hm ... I guess my brain wasn't fully working.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> as-is.
Cool. Thanks.
Pushed to drm-misc-fixes with
Cc: stable@vger.kernel.org
Tested-by: Antony Chen <antonychen@qnap.com>
> -Daniel
>
> >
> > >
> > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > >
> > > > info->width_mm = edid->width_cm * 10;
> > > > info->height_mm = edid->height_cm * 10;
> > > >
> > > > - /* driver figures it out in this case */
> > > > - info->bpc = 0;
> > > > - info->color_formats = 0;
> > > > - info->cea_rev = 0;
> > > > - info->max_tmds_clock = 0;
> > > > - info->dvi_dual = false;
> > > > - info->has_hdmi_infoframe = false;
> > > > -
> > > > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
> > > >
> > > > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> > > > --
> > > > 2.16.1
> > > >
> > > > _______________________________________________
> > > > Intel-gfx mailing list
> > > > Intel-gfx@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > >
> > > --
> > > Daniel Vetter
> > > Software Engineer, Intel Corporation
> > > http://blog.ffwll.ch
> >
> > --
> > Ville Syrjälä
> > Intel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/edid: Reset more of the display info
2018-04-25 11:03 ` [Intel-gfx] " Antony Chen
@ 2018-04-25 14:10 ` Ville Syrjälä
0 siblings, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2018-04-25 14:10 UTC (permalink / raw)
To: Antony Chen; +Cc: intel-gfx, dri-devel
On Wed, Apr 25, 2018 at 07:03:14PM +0800, Antony Chen wrote:
> Hi all,
>
> The patch works: drivers/gpu/drm/drm_edid.c
> I switch 4K@60 and 4K@30 monitors some times, monitors show correct output.
> Thanks for your help.
>
> What are the steps to close the issue in freedesktop? Append the patch by Ville
> Syrjälä, then I close it?
The bug is now resolved. Thanks for reporting the problem and testing
the fix.
>
> Antony
>
> 2018-04-25 3:36 GMT+08:00 Daniel Vetter <daniel@ffwll.ch>:
>
> > On Tue, Apr 24, 2018 at 05:26:30PM +0300, Ville Syrjälä wrote:
> > > On Tue, Apr 24, 2018 at 04:18:37PM +0200, Daniel Vetter wrote:
> > > > On Tue, Apr 24, 2018 at 04:02:50PM +0300, Ville Syrjala wrote:
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > >
> > > > > We're currently failing to reset everything in display_info.hdmi
> > > > > which will potentially cause us to use stale information when
> > > > > swapping monitors. Eg. if the user replaces a HDMI 2.0 monitor
> > > > > with a HDMI 1.x monitor we will continue to think that the monitor
> > > > > supports scrambling. That will lead to a black screen since the
> > > > > HDMI 1.x monitor won't understand the scrambled signal.
> > > > >
> > > > > Fix the problem by clearing display_info.hdmi fully. And while at
> > > > > eliminate some duplicated code by calling drm_reset_display_info()
> > > > > in drm_add_display_info().
> > > > >
> > > > > Cc: Antony Chen <antonychen@qnap.com>
> > > > > Cc: Shashank Sharma <shashank.sharma@intel.com>
> > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105655
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > ---
> > > > > drivers/gpu/drm/drm_edid.c | 11 +++--------
> > > > > 1 file changed, 3 insertions(+), 8 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > > index 134069f36482..39f1db4acda4 100644
> > > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > > @@ -4451,6 +4451,7 @@ drm_reset_display_info(struct drm_connector
> > *connector)
> > > > > info->max_tmds_clock = 0;
> > > > > info->dvi_dual = false;
> > > > > info->has_hdmi_infoframe = false;
> > > > > + memset(&info->hdmi, 0, sizeof(info->hdmi));
> > > > >
> > > > > info->non_desktop = 0;
> > > > > }
> > > > > @@ -4462,17 +4463,11 @@ u32 drm_add_display_info(struct
> > drm_connector *connector, const struct edid *edi
> > > > >
> > > > > u32 quirks = edid_get_quirks(edid);
> > > > >
> > > > > + drm_reset_display_info(connector);
> > > > > +
> > > >
> > > > Strictly speaking this is a separate bugfix, for the case where you
> > > > immediately go from one output to a different one. Keith already fixed
> > the
> > > > case where at least somewhere in between you go to the disconnected
> > state
> > > > in:
> > > >
> > > > commit 170178fe99dd212bf25e70c89bc4b6e195564ffc
> > > > Author: Keith Packard <keithp@keithp.com>
> > > > Date: Wed Dec 13 00:44:26 2017 -0800
> > > >
> > > > drm: Update edid-derived drm_display_info fields at edid property
> > set [v2]
> > > >
> > > > With the above explained in the commit message:
> > >
> > > The drm_reset_display_info() call is just the "deduplicate the code"
> > > part. The memset() is the bugfix, and applies in all cases.
> >
> > Hm ... I guess my brain wasn't fully working.
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > as-is.
> > -Daniel
> >
> > >
> > > >
> > > > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > >
> > > > > info->width_mm = edid->width_cm * 10;
> > > > > info->height_mm = edid->height_cm * 10;
> > > > >
> > > > > - /* driver figures it out in this case */
> > > > > - info->bpc = 0;
> > > > > - info->color_formats = 0;
> > > > > - info->cea_rev = 0;
> > > > > - info->max_tmds_clock = 0;
> > > > > - info->dvi_dual = false;
> > > > > - info->has_hdmi_infoframe = false;
> > > > > -
> > > > > info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP);
> > > > >
> > > > > DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop);
> > > > > --
> > > > > 2.16.1
> > > > >
> > > > > _______________________________________________
> > > > > Intel-gfx mailing list
> > > > > Intel-gfx@lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > > >
> > > > --
> > > > Daniel Vetter
> > > > Software Engineer, Intel Corporation
> > > > http://blog.ffwll.ch
> > >
> > > --
> > > Ville Syrjälä
> > > Intel
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> >
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-04-25 14:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 13:02 [PATCH] drm/edid: Reset more of the display info Ville Syrjala
2018-04-24 14:18 ` Daniel Vetter
2018-04-24 14:26 ` Ville Syrjälä
2018-04-24 19:36 ` Daniel Vetter
2018-04-25 11:03 ` [Intel-gfx] " Antony Chen
2018-04-25 14:10 ` Ville Syrjälä
2018-04-25 14:09 ` Ville Syrjälä
2018-04-24 14:22 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-04-24 17:46 ` ✓ Fi.CI.IGT: " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.