]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reorder skl+ scaler vs. plane updates
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 May 2021 07:38:36 +0000 (10:38 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 May 2021 05:09:54 +0000 (08:09 +0300)
commit335f139218621f3edc5a986f8197be24223a1757
treeea66f87730bca2310c8238a6783b392fea46ef93
parent434d6c82f94f7726c2597c3415795443633a542f
drm/i915: Reorder skl+ scaler vs. plane updates

When scanning out NV12 if we at any time have the plane enabled
while the scaler is disabled we get a pretty catastrophic
underrun.

Let's reorder the operations so that we try to avoid that happening
even if our vblank evade fails and the scaler enable/disable and
the plane enable/disable get latched during two diffent frames.

This takes care of the most common cases. I suppose there is still
at least a theoretical possibility of hitting this if one plane
takes the scaler away from another plane before the second plane
had a chance to set up another scaler for its use. But that
is starting to get a bit complicated, especially since the plane
commit order already has to be carefully sequenced to avoid any
dbuf overlaps. So plugging this 100% may prove somewhat hard...

Cc: Cooper Chiou <cooper.chiou@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210506073836.14848-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/skl_universal_plane.c