Currently we are doing silently synchronized flip if user-space is
requesting async flip on plane not supporting it. Add drm_WARN_ON for this
scenario. Instead of silently switching to synchronized flip continue to
async flip as requested.

Signed-off-by: Jouni Högander <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_plane.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_plane.c 
b/drivers/gpu/drm/i915/display/intel_plane.c
index 3dc2ed52147f..88c981a17fc5 100644
--- a/drivers/gpu/drm/i915/display/intel_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_plane.c
@@ -471,9 +471,6 @@ static bool intel_plane_do_async_flip(struct intel_plane 
*plane,
 {
        struct intel_display *display = to_intel_display(plane);
 
-       if (!plane->async_flip)
-               return false;
-
        if (!new_crtc_state->uapi.async_flip)
                return false;
 
@@ -654,6 +651,8 @@ static int intel_plane_atomic_calc_changes(const struct 
intel_crtc_state *old_cr
            ilk_must_disable_cxsr(new_crtc_state, old_plane_state, 
new_plane_state))
                new_crtc_state->disable_cxsr = true;
 
+       drm_WARN_ON(display->drm, new_crtc_state->uapi.async_flip && 
!plane->async_flip);
+
        if (intel_plane_do_async_flip(plane, old_crtc_state, new_crtc_state))
                new_crtc_state->do_async_flip = true;
 
-- 
2.43.0

Reply via email to