Skip to content

Commit c16b855

Browse files
Helen Koikebbrezillon
authored andcommitted
drm/vc4: fix fb references in async update
Async update callbacks are expected to set the old_fb in the new_state so prepare/cleanup framebuffers are balanced. Calling drm_atomic_set_fb_for_plane() (which gets a reference of the new fb and put the old fb) is not required, as it's taken care by drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane(). Cc: <[email protected]> # v4.19+ Fixes: 539c320 ("drm/vc4: update cursors asynchronously through atomic") Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Helen Koike <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 474d952 commit c16b855

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ static void vc4_plane_atomic_async_update(struct drm_plane *plane,
10251025
{
10261026
struct vc4_plane_state *vc4_state, *new_vc4_state;
10271027

1028-
drm_atomic_set_fb_for_plane(plane->state, state->fb);
1028+
swap(plane->state->fb, state->fb);
10291029
plane->state->crtc_x = state->crtc_x;
10301030
plane->state->crtc_y = state->crtc_y;
10311031
plane->state->crtc_w = state->crtc_w;

0 commit comments

Comments
 (0)