]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/qxl: add drm_gem_plane_helper_prepare_fb
authorChristian König <christian.koenig@amd.com>
Fri, 29 Apr 2022 13:29:08 +0000 (15:29 +0200)
committerChristian König <christian.koenig@amd.com>
Thu, 5 May 2022 10:30:10 +0000 (12:30 +0200)
We could need to wait for the pin to complete here.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: spice-devel@lists.freedesktop.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220429134230.24334-4-christian.koenig@amd.com
drivers/gpu/drm/qxl/qxl_display.c

index 9a9c29b1d3e1169df4ccd4b1c000ef5b8fb041e8..9a64fa4c75305cb725ad0fa982bcbb8330d5595e 100644 (file)
@@ -34,6 +34,7 @@
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_simple_kms_helper.h>
+#include <drm/drm_gem_atomic_helper.h>
 
 #include "qxl_drv.h"
 #include "qxl_object.h"
@@ -829,6 +830,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
        struct qxl_device *qdev = to_qxl(plane->dev);
        struct drm_gem_object *obj;
        struct qxl_bo *user_bo;
+       int ret;
 
        if (!new_state->fb)
                return 0;
@@ -852,7 +854,11 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
                qxl_free_cursor(old_cursor_bo);
        }
 
-       return qxl_bo_pin(user_bo);
+       ret = qxl_bo_pin(user_bo);
+       if (ret)
+               return ret;
+
+       return drm_gem_plane_helper_prepare_fb(plane, new_state);
 }
 
 static void qxl_plane_cleanup_fb(struct drm_plane *plane,