drm/i915: Use the correct bpp when validating "4:2:0 only" modes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Sep 2020 21:43:35 +0000 (00:43 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 Sep 2020 16:53:16 +0000 (19:53 +0300)
commit0bf8dedc763aa7abe4b03d67d7697ccc2b72430a
treec391b509c955949d669999de1f1702104e3d87f1
parentf1bce832500ea2c7903382ee4217e2e5e6eb6953
drm/i915: Use the correct bpp when validating "4:2:0 only" modes

When validating a "YCbCr 4:2:0 only" mode we must take into
account the fact that we're going to be outputting YCbCr
4:2:0 or 4:4:4 (when a DP->HDMI protocol converter is doing
the 4:2:0 downsampling). For YCbCr 4:4:4 the minimum output
bpc is 8, for YCbCr 4:2:0 it'll be half that. The currently
hardcoded 6bpc is only correct for RGB 4:4:4, which we will
never use with these kinds of modes. Figure out what we're
going to output and use the correct min bpp value to validate
whether the link has sufficient bandwidth.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200917214335.3569-3-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c