diff mbox series

drm/i915/tgl: allow DVI/HDMI on port A

Message ID 20191113021935.41547-1-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/tgl: allow DVI/HDMI on port A | expand

Commit Message

Lucas De Marchi Nov. 13, 2019, 2:19 a.m. UTC
Tiger Lake supports HDMI on port A. For other platforms we ignore what the VBT
says regarding HDMI to workaround broken VBTs, see commit
2ba7d7e04371 ("drm/i915/bios: ignore HDMI on port A"). Make this apply
gen12+ so they inherit the TGL behavior.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Matt Roper Nov. 13, 2019, 4:23 p.m. UTC | #1
On Tue, Nov 12, 2019 at 06:19:35PM -0800, Lucas De Marchi wrote:
> Tiger Lake supports HDMI on port A. For other platforms we ignore what the VBT
> says regarding HDMI to workaround broken VBTs, see commit
> 2ba7d7e04371 ("drm/i915/bios: ignore HDMI on port A"). Make this apply
> gen12+ so they inherit the TGL behavior.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 7c0ca733bef8..e6da98729e1f 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1450,7 +1450,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  	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) {
> +	if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) {
>  		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
>  			      is_hdmi ? "/HDMI" : "");
>  		is_dvi = false;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index ed4a68fb351f..659a03b08849 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -3140,7 +3140,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>  	DRM_DEBUG_KMS("Adding HDMI connector on [ENCODER:%d:%s]\n",
>  		      intel_encoder->base.base.id, intel_encoder->base.name);
>  
> -	if (WARN_ON(port == PORT_A))
> +	if (INTEL_GEN(dev_priv) < 12 && WARN_ON(port == PORT_A))
>  		return;
>  
>  	if (WARN(intel_dig_port->max_lanes < 4,
> -- 
> 2.24.0
>
Jani Nikula Nov. 14, 2019, 12:43 p.m. UTC | #2
On Tue, 12 Nov 2019, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Tiger Lake supports HDMI on port A. For other platforms we ignore what the VBT
> says regarding HDMI to workaround broken VBTs, see commit
> 2ba7d7e04371 ("drm/i915/bios: ignore HDMI on port A"). Make this apply
> gen12+ so they inherit the TGL behavior.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Do *NOT* merge patches without full IGT results. BAT is *NOT* enough,
and this did not even pass BAT.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 7c0ca733bef8..e6da98729e1f 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1450,7 +1450,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  	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) {
> +	if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) {
>  		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
>  			      is_hdmi ? "/HDMI" : "");
>  		is_dvi = false;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index ed4a68fb351f..659a03b08849 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -3140,7 +3140,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>  	DRM_DEBUG_KMS("Adding HDMI connector on [ENCODER:%d:%s]\n",
>  		      intel_encoder->base.base.id, intel_encoder->base.name);
>  
> -	if (WARN_ON(port == PORT_A))
> +	if (INTEL_GEN(dev_priv) < 12 && WARN_ON(port == PORT_A))
>  		return;
>  
>  	if (WARN(intel_dig_port->max_lanes < 4,
Lucas De Marchi Nov. 14, 2019, 5:31 p.m. UTC | #3
On Thu, Nov 14, 2019 at 02:43:17PM +0200, Jani Nikula wrote:
>On Tue, 12 Nov 2019, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
>> Tiger Lake supports HDMI on port A. For other platforms we ignore what the VBT
>> says regarding HDMI to workaround broken VBTs, see commit
>> 2ba7d7e04371 ("drm/i915/bios: ignore HDMI on port A"). Make this apply
>> gen12+ so they inherit the TGL behavior.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
>Do *NOT* merge patches without full IGT results. BAT is *NOT* enough,
>and this did not even pass BAT.

same as on other patch, I should have waited. I did look to the BAT
results though and it could not be related. The only gen12 machine is
currently disabled in CI and even when enabled it doesn't provide a
success/result feedback so we have to look to the tests themselves.

This is no excuse not to wait though, agreed. I will be more careful
next times.

Lucas De Marchi


>
>BR,
>Jani.
>
>
>> ---
>>  drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
>>  drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
>> index 7c0ca733bef8..e6da98729e1f 100644
>> --- a/drivers/gpu/drm/i915/display/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
>> @@ -1450,7 +1450,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>>  	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) {
>> +	if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) {
>>  		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
>>  			      is_hdmi ? "/HDMI" : "");
>>  		is_dvi = false;
>> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> index ed4a68fb351f..659a03b08849 100644
>> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
>> @@ -3140,7 +3140,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
>>  	DRM_DEBUG_KMS("Adding HDMI connector on [ENCODER:%d:%s]\n",
>>  		      intel_encoder->base.base.id, intel_encoder->base.name);
>>
>> -	if (WARN_ON(port == PORT_A))
>> +	if (INTEL_GEN(dev_priv) < 12 && WARN_ON(port == PORT_A))
>>  		return;
>>
>>  	if (WARN(intel_dig_port->max_lanes < 4,
>
>-- 
>Jani Nikula, Intel Open Source Graphics Center
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 7c0ca733bef8..e6da98729e1f 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1450,7 +1450,7 @@  static void parse_ddi_port(struct drm_i915_private *dev_priv,
 	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) {
+	if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) {
 		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
 			      is_hdmi ? "/HDMI" : "");
 		is_dvi = false;
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index ed4a68fb351f..659a03b08849 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -3140,7 +3140,7 @@  void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 	DRM_DEBUG_KMS("Adding HDMI connector on [ENCODER:%d:%s]\n",
 		      intel_encoder->base.base.id, intel_encoder->base.name);
 
-	if (WARN_ON(port == PORT_A))
+	if (INTEL_GEN(dev_priv) < 12 && WARN_ON(port == PORT_A))
 		return;
 
 	if (WARN(intel_dig_port->max_lanes < 4,