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

Ville Syrjala
2026-03-30T23:54:19Z

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Make sure the sink supports out 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>
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 ce40d38557e1..ed89fbcdd549 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1466,6 +1466,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