qxl: don't unref cursor bo inside atomic section (release mapping).
Subsystems (3)
Dave Airlie
maintainerPATCH 1/1 qxl: don't unref cursor bo inside atomic section (release mapping).
From: Dave Airlie <[email protected]>
Fixes 9428088c (drm/qxl: reapply cursor after resetting primary)
Reported-by Mike Galbraith <[email protected]>
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/qxl/qxl_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +5 -2
@@ -623,7 +623,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,struct qxl_cursor_cmd *cmd;struct qxl_cursor *cursor;struct drm_gem_object *obj; -struct qxl_bo *cursor_bo =NULL , *user_bo =NULL ; +struct qxl_bo *cursor_bo =NULL , *user_bo =NULL , *old_cursor_bo =NULL ;int ret;void *user_ptr;int size =64 *64 *4 ;
@@ -677,7 +677,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, cursor_bo, 0); cmd->type =QXL_CURSOR_SET ; -qxl_bo_unref (&qcrtc->cursor_bo); + old_cursor_bo = qcrtc->cursor_bo; qcrtc->cursor_bo = cursor_bo; cursor_bo =NULL ; }else {
@@ -697,6 +697,9 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +if (old_cursor_bo) +qxl_bo_unref (&old_cursor_bo); +qxl_bo_unref (&cursor_bo);return ;
Signature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Dave Airlie
From: Dave Airlie <[email protected]>
Fixes 9428088c (drm/qxl: reapply cursor after resetting primary)Reported-by Mike Galbraith <[email protected]>Signed-off-by Dave Airlie <[email protected]>
Reviewed-by Daniel Vetter <[email protected]>
Quoted 43 lines
--- drivers/gpu/drm/qxl/qxl_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/qxl/qxl_display.c +5
-2@@ -623,7 +623,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,struct qxl_cursor_cmd *cmd;struct qxl_cursor *cursor;struct drm_gem_object *obj; -struct qxl_bo *cursor_bo =NULL , *user_bo =NULL ; +struct qxl_bo *cursor_bo =NULL , *user_bo =NULL , *old_cursor_bo =NULL ;int ret;void *user_ptr;int size =64 *64 *4 ;@@ -677,7 +677,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, cursor_bo, 0); cmd->type =QXL_CURSOR_SET ; -qxl_bo_unref (&qcrtc->cursor_bo); + old_cursor_bo = qcrtc->cursor_bo; qcrtc->cursor_bo = cursor_bo; cursor_bo =NULL ; }else {@@ -697,6 +697,9 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane,qxl_push_cursor_ring_release (qdev, release,QXL_CMD_CURSOR , false);qxl_release_fence_buffer_objects (release); +if (old_cursor_bo) +qxl_bo_unref (&old_cursor_bo); +qxl_bo_unref (&cursor_bo);return ;Signature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel