Re: [PATCH] drm/i915/hdmi: Prune Interlaced modes for Display >= 12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/13/2022 4:00 PM, Ville Syrjälä wrote:
On Thu, Oct 13, 2022 at 10:41:24AM +0530, Ankit Nautiyal wrote:
Defeature Display Interlace support.
Support for Interlace modes is removed from Gen 12 onwards.
For DP we do not support interlace modes (except for very old
platforms).
Yes we do. Specifically G4X/VLV/CHV do not support it,
everything else does.

You are right. I think I misread the condition for DP and came to wrong conclusion.

Will need to add the condition for DP as well in that case.

Apologies for the confusion, and thanks for pointing it out.


Pruning the interlaced modes for HDMI for Display >=12.
Bspec: 50490
The tagging there seems borked. Only ADLS shows it as not supported.

Yes the page is getting updated it seems. The HSDES for this reads affected platform as 12 and beyond.



Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx>
---
  drivers/gpu/drm/i915/display/intel_hdmi.c | 11 ++++++++++-
  1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 93519fb23d9d..791bfb062c49 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1990,6 +1990,9 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
  	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
  		return MODE_NO_DBLESCAN;
+ if (DISPLAY_VER(dev_priv) >= 12 && mode->flags & DRM_MODE_FLAG_INTERLACE)
+		return MODE_NO_INTERLACE;
+
These are pointless if the connector doesn't declare interlace_allowed
anyway.

You are right,  will drop this from mode valid then.

As an aside, I see, we do not set connector double_scan allowed, so  the above condition from mode_valid can also be removed I think.

Thanks & Regards,

Ankit



  	if ((mode->flags & DRM_MODE_FLAG_3D_MASK) == DRM_MODE_FLAG_3D_FRAME_PACKING)
  		clock *= 2;
@@ -2247,6 +2250,10 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
  	if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
  		return -EINVAL;
+ if (DISPLAY_VER(dev_priv) >= 12 &&
+	    adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
+		return -EINVAL;
+
  	pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
  	pipe_config->has_hdmi_sink = intel_has_hdmi_sink(intel_hdmi,
  							 conn_state);
@@ -2956,7 +2963,9 @@ void intel_hdmi_init_connector(struct intel_digital_port *dig_port,
  				    ddc);
  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
- connector->interlace_allowed = true;
+	if (DISPLAY_VER(dev_priv) < 12)
+		connector->interlace_allowed = true;
+
  	connector->stereo_allowed = true;
if (DISPLAY_VER(dev_priv) >= 10)
--
2.25.1



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux