Skip to content

Commit 6071c4c

Browse files
drm/qxl: add drm_gem_plane_helper_prepare_fb
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
1 parent 596c35b commit 6071c4c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/qxl/qxl_display.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <drm/drm_plane_helper.h>
3535
#include <drm/drm_probe_helper.h>
3636
#include <drm/drm_simple_kms_helper.h>
37+
#include <drm/drm_gem_atomic_helper.h>
3738

3839
#include "qxl_drv.h"
3940
#include "qxl_object.h"
@@ -829,6 +830,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
829830
struct qxl_device *qdev = to_qxl(plane->dev);
830831
struct drm_gem_object *obj;
831832
struct qxl_bo *user_bo;
833+
int ret;
832834

833835
if (!new_state->fb)
834836
return 0;
@@ -852,7 +854,11 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane,
852854
qxl_free_cursor(old_cursor_bo);
853855
}
854856

855-
return qxl_bo_pin(user_bo);
857+
ret = qxl_bo_pin(user_bo);
858+
if (ret)
859+
return ret;
860+
861+
return drm_gem_plane_helper_prepare_fb(plane, new_state);
856862
}
857863

858864
static void qxl_plane_cleanup_fb(struct drm_plane *plane,

0 commit comments

Comments
 (0)