stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/bios: ignore HDMI on port A
@ 2017-09-21 13:11 Jani Nikula
  2017-09-21 13:16 ` [Intel-gfx] " Ville Syrjälä
  2017-09-21 14:19 ` [PATCH v2] " Jani Nikula
  0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2017-09-21 13:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, stable, Imre Deak

The hardware state readout oopses after several warnings when trying to
use HDMI on port A, if such a combination is configured in VBT. Filter
the combo out already at the VBT parsing phase.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889
Cc: stable@vger.kernel.org
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 5949750a35ee..f85f736569f1 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1162,6 +1162,11 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
 	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
 	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
 
+	if (port == PORT_A && is_hdmi) {
+		DRM_DEBUG_KMS("VBT claims port A supports HDMI, ignoring\n");
+		is_hdmi = false;
+	}
+
 	info->supports_dvi = is_dvi;
 	info->supports_hdmi = is_hdmi;
 	info->supports_dp = is_dp;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/bios: ignore HDMI on port A
  2017-09-21 13:11 [PATCH] drm/i915/bios: ignore HDMI on port A Jani Nikula
@ 2017-09-21 13:16 ` Ville Syrjälä
  2017-09-21 14:19 ` [PATCH v2] " Jani Nikula
  1 sibling, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2017-09-21 13:16 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, stable

On Thu, Sep 21, 2017 at 04:11:49PM +0300, Jani Nikula wrote:
> The hardware state readout oopses after several warnings when trying to
> use HDMI on port A, if such a combination is configured in VBT. Filter
> the combo out already at the VBT parsing phase.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889
> Cc: stable@vger.kernel.org
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 5949750a35ee..f85f736569f1 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1162,6 +1162,11 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>  	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
>  	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
>  
> +	if (port == PORT_A && is_hdmi) {

s/is_hdmi/is_dvi/

> +		DRM_DEBUG_KMS("VBT claims port A supports HDMI, ignoring\n");
> +		is_hdmi = false;

+ is_dvi = false;

> +	}
> +
>  	info->supports_dvi = is_dvi;
>  	info->supports_hdmi = is_hdmi;
>  	info->supports_dp = is_dp;
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrj�l�
Intel OTC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] drm/i915/bios: ignore HDMI on port A
  2017-09-21 13:11 [PATCH] drm/i915/bios: ignore HDMI on port A Jani Nikula
  2017-09-21 13:16 ` [Intel-gfx] " Ville Syrjälä
@ 2017-09-21 14:19 ` Jani Nikula
  2017-09-21 14:51   ` [Intel-gfx] " Ville Syrjälä
  1 sibling, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2017-09-21 14:19 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx; +Cc: stable, Imre Deak

The hardware state readout oopses after several warnings when trying to
use HDMI on port A, if such a combination is configured in VBT. Filter
the combo out already at the VBT parsing phase.

v2: also ignore DVI (Ville)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889
Cc: stable@vger.kernel.org
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 5949750a35ee..97931b294f9a 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1162,6 +1162,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
 	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
 	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
 
+	if (port == PORT_A && is_dvi) {
+		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
+			      is_hdmi ? "/HDMI" : "");
+		is_dvi = false;
+		is_hdmi = false;
+	}
+
 	info->supports_dvi = is_dvi;
 	info->supports_hdmi = is_hdmi;
 	info->supports_dp = is_dp;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/bios: ignore HDMI on port A
  2017-09-21 14:19 ` [PATCH v2] " Jani Nikula
@ 2017-09-21 14:51   ` Ville Syrjälä
  2017-09-25  7:50     ` Jani Nikula
  0 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2017-09-21 14:51 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, stable

On Thu, Sep 21, 2017 at 05:19:20PM +0300, Jani Nikula wrote:
> The hardware state readout oopses after several warnings when trying to
> use HDMI on port A, if such a combination is configured in VBT. Filter
> the combo out already at the VBT parsing phase.
> 
> v2: also ignore DVI (Ville)
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889
> Cc: stable@vger.kernel.org
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 5949750a35ee..97931b294f9a 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1162,6 +1162,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>  	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
>  	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
>  
> +	if (port == PORT_A && is_dvi) {

We may want to do the same for PORT_E. Although in that case we would
already reject it in intel_hdmi_init_connector() since PORT_E can have
max 2 lanes and HDMI needs 4. But looks like that would result in a WARN.
Given that we've now seen a bogus VBT for port A I wouldn't put it past
them to cook one up for port E as well.

Either way
Reviewed-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>

> +		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
> +			      is_hdmi ? "/HDMI" : "");
> +		is_dvi = false;
> +		is_hdmi = false;
> +	}
> +
>  	info->supports_dvi = is_dvi;
>  	info->supports_hdmi = is_hdmi;
>  	info->supports_dp = is_dp;
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrj�l�
Intel OTC

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/bios: ignore HDMI on port A
  2017-09-21 14:51   ` [Intel-gfx] " Ville Syrjälä
@ 2017-09-25  7:50     ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2017-09-25  7:50 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, stable

On Thu, 21 Sep 2017, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Sep 21, 2017 at 05:19:20PM +0300, Jani Nikula wrote:
>> The hardware state readout oopses after several warnings when trying to
>> use HDMI on port A, if such a combination is configured in VBT. Filter
>> the combo out already at the VBT parsing phase.
>> 
>> v2: also ignore DVI (Ville)
>> 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102889
>> Cc: stable@vger.kernel.org
>> Cc: Imre Deak <imre.deak@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_bios.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index 5949750a35ee..97931b294f9a 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -1162,6 +1162,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
>>  	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
>>  	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
>>  
>> +	if (port == PORT_A && is_dvi) {
>
> We may want to do the same for PORT_E. Although in that case we would
> already reject it in intel_hdmi_init_connector() since PORT_E can have
> max 2 lanes and HDMI needs 4. But looks like that would result in a WARN.
> Given that we've now seen a bogus VBT for port A I wouldn't put it past
> them to cook one up for port E as well.
>
> Either way
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Pushed to dinq with Tested-by from the bug, thanks for the review.

BR,
Jani.


>
>> +		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
>> +			      is_hdmi ? "/HDMI" : "");
>> +		is_dvi = false;
>> +		is_hdmi = false;
>> +	}
>> +
>>  	info->supports_dvi = is_dvi;
>>  	info->supports_hdmi = is_hdmi;
>>  	info->supports_dp = is_dp;
>> -- 
>> 2.11.0
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-25  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 13:11 [PATCH] drm/i915/bios: ignore HDMI on port A Jani Nikula
2017-09-21 13:16 ` [Intel-gfx] " Ville Syrjälä
2017-09-21 14:19 ` [PATCH v2] " Jani Nikula
2017-09-21 14:51   ` [Intel-gfx] " Ville Syrjälä
2017-09-25  7:50     ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).