[PATCH v2 7/9] drm/i915/dp: Validate sink format in .mode_valid()

Ville Syrjala
2026-04-09T10:16:18Z

Make sure the sink supports our chosen sink format. I suppose it
might be at least possible that some PCONs might not snoop the EDID
hard enough and filter out all the modes that they should.

Also if we ever want to add a similar "force DVI" knob to DP
outputs that we have for native HDMI, we'd need to manually
get rid of anything DVI sinks can't handle.

Cc: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index e80682834530..945994fe681b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1457,6 +1457,10 @@ intel_dp_mode_valid_format(struct intel_connector *connector,
int num_joined_pipes;
int link_bpp_x16;

+ status = intel_dp_sink_format_valid(connector, mode, sink_format);
+ if (status != MODE_OK)
+ return status;
+
output_format = intel_dp_output_format(connector, sink_format);

max_link_clock = intel_dp_max_link_rate(intel_dp);
--
2.52.0