]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Make a copy of the ggtt view for slave plane
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 10 Jan 2020 18:32:23 +0000 (20:32 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 14 Jan 2020 18:06:56 +0000 (20:06 +0200)
commit43aadce39fb426644c53d294a0b028ebec18a3b6
tree83f10fbcbcde7163c60a2b058bd128a2775ad3b8
parentd83e039e326d2b1b50ab85b838e7b1f5a22bbb24
drm/i915: Make a copy of the ggtt view for slave plane

intel_prepare_plane_fb() will always pin plane_state->hw.fb whenever
it is present. We copy that from the master plane to the slave plane,
but we fail to copy the corresponding ggtt view. Thus when it comes time
to pin the slave plane's fb we use some stale ggtt view left over from
the last time the plane was used as a non-slave plane. If that previous
use involved 90/270 degree rotation or remapping we'll try to shuffle
the pages of the new fb around accordingingly. However the new
fb may be backed by a bo with less pages than what the ggtt view
rotation/remapped info requires, and so we we trip a GEM_BUG().

Steps to reproduce on icl:
1. plane 1: whatever
   plane 6: largish !NV12 fb + 90 degree rotation
2. plane 1: smallish NV12 fb
   plane 6: make invisible so it gets slaved to plane 1
3. GEM_BUG()

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/issues/951
Fixes: 52cbc1a80ea9 ("drm/i915: Remove special case slave handling during hw programming, v3.")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200110183228.8199-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_display.c