OSDN Git Service

drm/i915: Skip rotated offset adjustment for unsupported modifiers
authorDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Sat, 21 Dec 2019 12:05:41 +0000 (14:05 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 23 Dec 2019 11:51:01 +0000 (13:51 +0200)
commit931cd348bb8dc9374b9561846be149bfae7571b6
treee158fa45933a76a64caed73e2fdbaf2e76b3bdc9
parent71df86f0fbf5046a68a2adaaba98feee2f6e22d1
drm/i915: Skip rotated offset adjustment for unsupported modifiers

During framebuffer creation, we pre-compute offsets for 90/270 plane
rotation. However, only Y and Yf modifiers support 90/270 rotation. So,
skip the calculations for other modifiers.

To keep the gem buffer size check still working for tiled planes, factor
out the logic needed for rotation setup and skip only this part for
tiled planes other than Y/Yf.

v2: Add a bounds check WARN for the rotation info array.
v3: Keep the gem buffer size check working for tiled planes.

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