drm/i915: Clear the VBT defaults for unused ports
Subsystems (2)
PATCH 1/1 drm/i915: Clear the VBT defaults for unused ports
If during VBT parsing we find that the port is unused, the driver code just bails out without clearing the defaults for that port. This can cause failures down the path through link training for unused Port. This patch fixes this issue by clearing the defaults before bailing out from the VBT parsing function.
--- drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +8 -2
@@ -1148,9 +1148,15 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, } } } -if (!child) -return ; +if (!child) { +/* Clear the DDI VBT Port info values */ + info->supports_dvi =0 ; + info->supports_hdmi =0 ; + info->supports_dp =0 ; + info->supports_edp =0 ; +return ; + } aux_channel = child->common.aux_channel; ddc_pin = child->common.ddc_pin;
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: Clear the VBT defaults for unused ports
== Series Details ==
== Series Details ==
Series: drm/i915: Clear the VBT defaults for unused ports
URL : https://patchwork.freedesktop.org/series/20619/
State : warning
== Summary ==
Series 20619v1 drm/i915: Clear the VBT defaults for unused ports
https://patchwork.freedesktop.org/api/1.0/series/20619/revisions/1/mbox/
Test gem_exec_fence:
Subgroup await-hang-default:
incomplete -> PASS (fi-hsw-4770) fdo#99726
Test gem_exec_suspend:
Subgroup basic-s4-devices:
pass -> DMESG-WARN (fi-bxt-t5700)fdo#99726 https://bugs.freedesktop.org/show_bug.cgi?id=99726
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 fi-bxt-t5700 total:278 pass:257 dwarn:1 dfail:0 fail:0 skip:20 fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29
740d0bc8790801dad0f99ea437183542fc7861be drm-tip: 2017y-03m-03d-13h-27m-37s UTC integration manifest c6b4ac2 drm/i915: Clear the VBT defaults for unused ports
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4054/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Manasi Navare
If during VBT parsing we find that the port is unused, the driver code just bails out without clearing the defaults for that port. This can cause failures down the path through link training for unused Port. This patch fixes this issue by clearing the defaults before bailing out from the VBT parsing function.
Cc Ville Syrjala <[email protected]>Signed-off-by Manasi Navare <[email protected]>--- drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_bios.c +0
-0@@ -1148,9 +1148,15 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, }
drivers/gpu/drm/i915/intel_bios.c static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, · line 1156
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +6
-2} } -if (!child) -return ; +if (!child) { +/* Clear the DDI VBT Port info values */ + info->supports_dvi =0 ; + info->supports_hdmi =0 ; + info->supports_dp =0 ; + info->supports_edp =0 ;
I would s/0/false/ here. Although they are apparently of type 'uint8_t:1'. As a followup someone might want to s/uint8_t:1/bool:1/ the definitions so that the compiler will protect us against values >1 when we assign these.
Otherwise lgtm. And based on a cursory glance the bogus port A has now disappaered from the ci results on fi-skl-6700k, so looks like my analysis of the problem was correct.
Quoted 8 lines
drivers/gpu/drm/i915/intel_bios.c +2
-0+return ; + } aux_channel = child->common.aux_channel; ddc_pin = child->common.ddc_pin;Signature · 1 line
2.1.4
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 36 lines · Ville Syrjälä
Quoted 19 lines · Manasi Navare
If during VBT parsing we find that the port is unused, the driver code just bails out without clearing the defaults for that port. This can cause failures down the path through link training for unused Port. This patch fixes this issue by clearing the defaults before bailing out from the VBT parsing function.
Cc Ville Syrjala <[email protected]>Signed-off-by Manasi Navare <[email protected]>--- drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_bios.c +0
-0@@ -1148,9 +1148,15 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, }drivers/gpu/drm/i915/intel_bios.c static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, · line 1156
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +6
-2} } -if (!child) -return ; +if (!child) { +/* Clear the DDI VBT Port info values */ + info->supports_dvi =0 ; + info->supports_hdmi =0 ; + info->supports_dp =0 ; + info->supports_edp =0 ;I would s/0/false/ here. Although they are apparently of type 'uint8_t:1'. As a followup someone might want to s/uint8_t:1/bool:1/ the definitions so that the compiler will protect us against values >1 when we assign these.
Quoted 5 lines
Otherwise lgtm. And based on a cursory glance the bogus port A has now disappaered from the ci results on fi-skl-6700k, so looks like my analysis of the problem was correct.
Reviewed-by Ville Syrjälä <[email protected]>
Bikeshedding after review...
I think the approach here is a bit magical, first setting defaults on all platforms, then removing same defaults on platforms that a) are DDI,
b) have VBT, c) have a high enough VBT revision, and d) do not have child devices.
I think I'd go with simplicity, and split out a function from init_vbt_defaults() to be called on platforms without VBT. It would initially just contain the loop to initialize
info->supports_dvi = (port != PORT_A && port != PORT_E); info->supports_hdmi = info->supports_dvi; info->supports_dp = (port != PORT_E);
BR,
Jani.
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/i915/intel_bios.c +2
-0+return ; + } aux_channel = child->common.aux_channel; ddc_pin = child->common.ddc_pin;Signature · 1 line
2.1.4
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 54 lines · Jani Nikula
Quoted 36 lines · Ville Syrjälä
Quoted 19 lines · Manasi Navare
If during VBT parsing we find that the port is unused, the driver code just bails out without clearing the defaults for that port. This can cause failures down the path through link training for unused Port. This patch fixes this issue by clearing the defaults before bailing out from the VBT parsing function.
Cc Ville Syrjala <[email protected]>Signed-off-by Manasi Navare <[email protected]>--- drivers/gpu/drm/i915/intel_bios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_bios.c +0
-0@@ -1148,9 +1148,15 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, }drivers/gpu/drm/i915/intel_bios.c static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, · line 1156
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +6
-2} } -if (!child) -return ; +if (!child) { +/* Clear the DDI VBT Port info values */ + info->supports_dvi =0 ; + info->supports_hdmi =0 ; + info->supports_dp =0 ; + info->supports_edp =0 ;I would s/0/false/ here. Although they are apparently of type 'uint8_t:1'. As a followup someone might want to s/uint8_t:1/bool:1/ the definitions so that the compiler will protect us against values >1 when we assign these.
Quoted 5 lines
Otherwise lgtm. And based on a cursory glance the bogus port A has now disappaered from the ci results on fi-skl-6700k, so looks like my analysis of the problem was correct.
Reviewed-by Ville Syrjälä <[email protected]>Bikeshedding after review...
I think the approach here is a bit magical, first setting defaults on all platforms, then removing same defaults on platforms that a) are DDI,
b) have VBT, c) have a high enough VBT revision, and d) do not have child devices.I think I'd go with simplicity, and split out a function from
init_vbt_defaults()to be called on platforms without VBT. It would initially just contain the loop to initialize
Quoted 8 lines
info->supports_dvi = (port != PORT_A && port != PORT_E); info->supports_hdmi = info->supports_dvi; info->supports_dp = (port != PORT_E);BR,
Jani.
How do we determine if the platforms have VBT or not?
So then in case of platforms with VBT, do not initialize them at all??
Regards
Manasi
Quoted 13 lines
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/intel_bios.c +2
-0+return ; + } aux_channel = child->common.aux_channel; ddc_pin = child->common.ddc_pin;Signature · 1 line
2.1.4Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx