]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check async flip capability early on
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 14 Feb 2022 10:55:30 +0000 (12:55 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 8 Mar 2022 06:35:08 +0000 (08:35 +0200)
commite8f4825244e88bc8ca12ccf12fa39064b30f182f
tree93b4f2f0866c18c71574a3600472b1c7c4576d92
parentb9789fb6f5f6fe91d3a46d2b31d2d1f995ca0908
drm/i915: Check async flip capability early on

Since the async flip state check is done very late and
thus it can see potentially all the planes in the state
(due to the wm/ddb optimization) we need to move the
"can the requested plane do async flips at all?" check
much earlier. For this purpose we introduce
intel_async_flip_check_uapi() that gets called early during
the atomic check.

And for good measure we'll throw in a couple of basic checks:
- is the crtc active?
- was a modeset flagged?
- is+was the plane enabled?
Though atm all of those should be guaranteed by the fact
that the async flip can only be requested through the legacy
page flip ioctl.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Fixes: cf58db4909ff ("drm/i915: Use wm0 only during async flips for DG2")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220214105532.13049-3-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
(cherry picked from commit b0b2bed2a1305c8f977c6b7d5fa162773693a212)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/display/intel_display.c