drm/i915: Add helpers to select correct ccs/aux planes
authorImre Deak <imre.deak@intel.com>
Sat, 21 Dec 2019 12:05:37 +0000 (14:05 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 23 Dec 2019 11:50:56 +0000 (13:50 +0200)
commite7af9094579474912ac7ea2d2f2434c4df2fd5e6
tree22f886949b5e71e8a40ef97b61d0236cbff9fa9e
parent13f2cb9a280054c9c95c694a8837fd0828b03853
drm/i915: Add helpers to select correct ccs/aux planes

Using helpers instead of open coding this to select a CCS plane for a
main plane makes the code cleaner and less error-prone when the location
of CCS plane can be different based on the format (packed vs. YUV
semiplanar). The same applies to selecting an AUX plane which can be a
UV plane (for an uncompressed YUV semiplanar format), or a CCS plane.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-5-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display.c