drm/i915/hdmi: Clean up TMDS clock limit exceeding user mode handling
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 15 Oct 2021 13:39:07 +0000 (16:39 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Jan 2022 09:38:29 +0000 (11:38 +0200)
commitb4d775775877453b44834a621eb410aed7891875
tree7a05176d3ebb999dd29bbd9198dc5b2e5d1b3783
parent428cb15d5b003102bc33d49f2ab31a6e4e785157
drm/i915/hdmi: Clean up TMDS clock limit exceeding user mode handling

Currently we just use all the hdmi_deep_color_possible() stuff
to compute whether deep color is possible, and leave the 8bpc
case to do its own thing. That doesn't mesh super well with 4:2:0
handling because we might end up going for 8bpc RGB without
considering that it's essentially illegal and we could instead
go for a legal 4:2:0 config.

So let's run through all the clock checks even for 8bpc first.
If we've fully exhausted all options only then do we re-run
the computation for 8bpc while ignoring the downstream TMDS
clock limits. This will guarantee that if there's a config
that respects all limits we will find it, and if there is not
we still allow the user to override the mode manually.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015133921.4609-7-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_hdmi.h