drm/i915: Don't override output type for DDI HDMI
Subsystems (2)
PATCH 1/1 drm/i915: Don't override output type for DDI HDMI
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
--- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +2 -1
@@ -5153,7 +5153,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)enum intel_display_power_domain power_domain;enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) +if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && + intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ;if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {
Signature · 6 lines
2.6.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 14 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Quoted 4 lines
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
We rely upon the detection code to correctly adjust the encoder type, otherwise the subsequent modeset will pick the wrong code (even when userspace asked the kernel to light up the right connector). I'm not sure whether this is now broken ...
-Daniel
Quoted 21 lines
--- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +2
-1@@ -5153,7 +5153,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)enum intel_display_power_domain power_domain;enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) +if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && + intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ;if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {Signature · 1 line
2.6.3
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Daniel Vetter
Quoted 14 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Quoted 7 lines
Quoted 4 lines
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
Quoted 4 lines
We rely upon the detection code to correctly adjust the encoder type, otherwise the subsequent modeset will pick the wrong code (even when userspace asked the kernel to light up the right connector). I'm not sure whether this is now broken ...
I guess the only case this might matter is MST, as the encoder override didn't exist before the MST support patch, so the non-MST case should keep working even with this change.
thanks,
Takashi
Quoted 19 lines
-Daniel
Quoted 17 lines
--- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +2
-1@@ -5153,7 +5153,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)enum intel_display_power_domain power_domain;enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) +if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && + intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ;
Quoted 10 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp.c +0
-0if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {Signature · 1 line
2.6.3Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · Takashi Iwai
Quoted 21 lines · Daniel Vetter
Quoted 18 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>
Quoted 5 lines
Quoted 2 lines
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
I checked again some machines, and they all seem working.
Actually the encoder type is set again in each detection function (intel_hdmi_detect(), intel_dp_detect()) no matter with or without my workaround. The problem happens when a HPD is triggered only to DP while the HDMI is kept on. Then intel_hdmi_detect() won't be called so the wrongly overridden encoder type remains.
Why the override is still needed in intel_dp_hpd_pulse() isn't clear to me, but at least it influences on the port power domain handling. And my change won't affect in this regard.
Takashi
Quoted 6 lines
Quoted 5 lines
We rely upon the detection code to correctly adjust the encoder type, otherwise the subsequent modeset will pick the wrong code (even when userspace asked the kernel to light up the right connector). I'm not sure whether this is now broken ...
Quoted 38 lines
I guess the only case this might matter is MST, as the encoder override didn't exist before the MST support patch, so the non-MST case should keep working even with this change.
thanks,
Takashi
Quoted 29 lines
-Daniel
Quoted 21 lines
--- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_dp.c +2
-1@@ -5153,7 +5153,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)enum intel_display_power_domain power_domain;enum irqreturn ret =IRQ_NONE ; -if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP ) +if (intel_dig_port->base.type !=INTEL_OUTPUT_EDP && + intel_dig_port->base.type !=INTEL_OUTPUT_HDMI ) intel_dig_port->base.type =INTEL_OUTPUT_DISPLAYPORT ;if (long_hpd && intel_dig_port->base.type ==INTEL_OUTPUT_EDP ) {Signature · 1 line
2.6.3Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 40 lines · Takashi Iwai
Quoted 24 lines · Takashi Iwai
Quoted 21 lines · Daniel Vetter
Quoted 18 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>Quoted 5 lines
Quoted 2 lines
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
I checked again some machines, and they all seem working.
Actually the encoder type is set again in each detection function (
intel_hdmi_detect(),intel_dp_detect()) no matter with or without my workaround. The problem happens when a HPD is triggered only to DP while the HDMI is kept on. Thenintel_hdmi_detect()won't be called so the wrongly overridden encoder type remains.
Quoted 3 lines
Why the override is still needed in
intel_dp_hpd_pulse()isn't clear to me, but at least it influences on the port power domain handling. And my change won't affect in this regard.
My suspicion is that we need this to reset between INTEL_OUTPUT_DISPLAYPORT and INTEL_OUTPUT_DP_MST.
Thanks for testing this. With the above explanation added to the commit
message: Reviewed-by: Daniel Vetter <[email protected]>
Jani, can you please pick this up?
Thanks, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 41 lines · Daniel Vetter
Quoted 40 lines · Takashi Iwai
Quoted 24 lines · Takashi Iwai
Quoted 21 lines · Daniel Vetter
Quoted 18 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>Quoted 5 lines
Quoted 2 lines
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
I checked again some machines, and they all seem working.
Actually the encoder type is set again in each detection function (
intel_hdmi_detect(),intel_dp_detect()) no matter with or without my workaround. The problem happens when a HPD is triggered only to DP while the HDMI is kept on. Thenintel_hdmi_detect()won't be called so the wrongly overridden encoder type remains.
Quoted 6 lines
Quoted 3 lines
Why the override is still needed in
intel_dp_hpd_pulse()isn't clear to me, but at least it influences on the port power domain handling. And my change won't affect in this regard.My suspicion is that we need this to reset between
INTEL_OUTPUT_DISPLAYPORTandINTEL_OUTPUT_DP_MST.
INTEL_OUTPUT_DP_MST is the type for fake mst encoders, and those don't have a .hpd_pulse() hook to begin with.
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 46 lines · Ville Syrjälä
Quoted 45 lines · Daniel Vetter
Quoted 43 lines · Takashi Iwai
Quoted 24 lines · Takashi Iwai
Quoted 21 lines · Daniel Vetter
Quoted 18 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>Quoted 5 lines
Quoted 2 lines
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
I checked again some machines, and they all seem working.
Actually the encoder type is set again in each detection function (
intel_hdmi_detect(),intel_dp_detect()) no matter with or without my workaround. The problem happens when a HPD is triggered only to DP while the HDMI is kept on. Thenintel_hdmi_detect()won't be called so the wrongly overridden encoder type remains.Why the override is still needed in
intel_dp_hpd_pulse()isn't clear to me, but at least it influences on the port power domain handling. And my change won't affect in this regard.
Quoted 5 lines
Quoted 2 lines
My suspicion is that we need this to reset between
INTEL_OUTPUT_DISPLAYPORTandINTEL_OUTPUT_DP_MST.
INTEL_OUTPUT_DP_MSTis the type for fake mst encoders, and those don't have a .hpd_pulse() hook to begin with.
Hm ... that would mean we only need this for the initial hotplug when we go _UNKOWN -> _DISPLAYPORT. Oh well, putting it into the state properly, derived from what userspace wants, should be the proper fix anyway. But for stable this is good enough.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 50 lines · Daniel Vetter
Quoted 49 lines · Ville Syrjälä
Quoted 47 lines · Daniel Vetter
Quoted 40 lines · Takashi Iwai
Quoted 24 lines · Takashi Iwai
Quoted 21 lines · Daniel Vetter
Quoted 18 lines · Takashi Iwai
Currently a DDI port may register the DP hotplug handler even though it's used with HDMI, and the DP HPD handler overrides the encoder type forcibly to DP. This caused the inconsistency on a machine connected with a HDMI monitor; upon a hotplug event, the DDI port is suddenly switched to be handled as a DP although the same monitor is kept connected, and this leads to the erroneous blank output.
This patch papers over the bug by excluding the previous HDMI encoder type from this override. This should be fixed more fundamentally, e.g. by moving the encoder type reset from the HPD or by having individual encoder objects for HDMI and DP. But since the bug has been present for a long time (3.17), it's better to have a quick-n-dirty fix for now, and keep working on a cleaner fix.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=955190
Fixes 0e32b39ceed6 ('drm/i915: add DP 1.2 MST support (v0.7)')Cc <[email protected]> # v3.17+Signed-off-by Takashi Iwai <[email protected]>Quoted 5 lines
Quoted 2 lines
If you plug in a hmid screen (using a level-shifter adapter), then a DP screen, does still everything work?
That was my slight concern, too, although it seems working as long as I tested several HSW machines. Maybe better to double-check.
I checked again some machines, and they all seem working.
Actually the encoder type is set again in each detection function (
intel_hdmi_detect(),intel_dp_detect()) no matter with or without my workaround. The problem happens when a HPD is triggered only to DP while the HDMI is kept on. Thenintel_hdmi_detect()won't be called so the wrongly overridden encoder type remains.Quoted 3 lines
Why the override is still needed in
intel_dp_hpd_pulse()isn't clear to me, but at least it influences on the port power domain handling. And my change won't affect in this regard.My suspicion is that we need this to reset between
INTEL_OUTPUT_DISPLAYPORTandINTEL_OUTPUT_DP_MST.
Quoted 7 lines
Quoted 2 lines
INTEL_OUTPUT_DP_MSTis the type for fake mst encoders, and those don't have a .hpd_pulse() hook to begin with.Hm ... that would mean we only need this for the initial hotplug when we go
_UNKOWN->_DISPLAYPORT. Oh well, putting it into the state properly, derived from what userspace wants, should be the proper fix anyway. But for stable this is good enough.
Pushed to drm-intel-fixes, thanks for the patch and review.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx