]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Validate sink format in .mode_valid()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 9 Apr 2026 10:15:37 +0000 (13:15 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 13 Apr 2026 18:16:13 +0000 (21:16 +0300)
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>
Link: https://patch.msgid.link/20260409101539.22032-8-ville.syrjala@linux.intel.com
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
drivers/gpu/drm/i915/display/intel_dp.c

index e806828345300add100ca1c5325edcdb5c87eadc..945994fe681ba3b0b533a4864a2e51d1e5978fc5 100644 (file)
@@ -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);