]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.51/drm-vc4-fix-fb-references-in-async-update.patch
Linux 4.19.51
[thirdparty/kernel/stable-queue.git] / releases / 4.19.51 / drm-vc4-fix-fb-references-in-async-update.patch
1 From c16b85559dcfb5a348cc085a7b4c75ed49b05e2c Mon Sep 17 00:00:00 2001
2 From: Helen Koike <helen.koike@collabora.com>
3 Date: Mon, 3 Jun 2019 13:56:09 -0300
4 Subject: drm/vc4: fix fb references in async update
5
6 From: Helen Koike <helen.koike@collabora.com>
7
8 commit c16b85559dcfb5a348cc085a7b4c75ed49b05e2c upstream.
9
10 Async update callbacks are expected to set the old_fb in the new_state
11 so prepare/cleanup framebuffers are balanced.
12
13 Calling drm_atomic_set_fb_for_plane() (which gets a reference of the new
14 fb and put the old fb) is not required, as it's taken care by
15 drm_mode_cursor_universal() when calling drm_atomic_helper_update_plane().
16
17 Cc: <stable@vger.kernel.org> # v4.19+
18 Fixes: 539c320bfa97 ("drm/vc4: update cursors asynchronously through atomic")
19 Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
20 Signed-off-by: Helen Koike <helen.koike@collabora.com>
21 Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
22 Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
23 Link: https://patchwork.freedesktop.org/patch/msgid/20190603165610.24614-5-helen.koike@collabora.com
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26 ---
27 drivers/gpu/drm/vc4/vc4_plane.c | 1 +
28 1 file changed, 1 insertion(+)
29
30 --- a/drivers/gpu/drm/vc4/vc4_plane.c
31 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
32 @@ -818,6 +818,7 @@ static void vc4_plane_atomic_async_updat
33 drm_atomic_set_fb_for_plane(plane->state, state->fb);
34 }
35
36 + swap(plane->state->fb, state->fb);
37 /* Set the cursor's position on the screen. This is the
38 * expected change from the drm_mode_cursor_universal()
39 * helper.