linux/drivers/gpu/drm/rockchip
Helen Koike d985a35332 drm/rockchip: fix fb references in async update
In the case of async update, modifications are done in place, i.e. in the
current plane state, so the new_state is prepared and the new_state is
cleaned up (instead of the old_state, unlike what happens in a
normal sync update).
To cleanup the old_fb properly, it needs to be placed in the new_state
in the end of async_update, so cleanup call will unreference the old_fb
correctly.

Also, the previous code had a:

	plane_state = plane->funcs->atomic_duplicate_state(plane);
	...
	swap(plane_state, plane->state);

	if (plane->state->fb && plane->state->fb != new_state->fb) {
	...
	}

Which was wrong, as the fb were just assigned to be equal, so this if
statement nevers evaluates to true.

Another details is that the function drm_crtc_vblank_get() can only be
called when vop->is_enabled is true, otherwise it has no effect and
trows a WARN_ON().

Calling drm_atomic_set_fb_for_plane() (which get a referent of the new
fb and pus the old fb) is not required, as it is taken care by
drm_mode_cursor_universal() when calling
drm_atomic_helper_update_plane().

Fixes: 15609559a8 ("drm/rockchip: update cursors asynchronously through atomic.")
Cc: <stable@vger.kernel.org> # v4.20+
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190603165610.24614-2-helen.koike@collabora.com
2019-06-04 10:12:02 +02:00
..
analogix_dp-rockchip.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-core.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-core.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-reg.c drm/rockchip: fix for mailbox read validation. 2019-01-28 11:10:44 +01:00
cdn-dp-reg.h drm/rockchip: cdn-dp: Correct PHY register address 2017-03-13 15:59:26 -04:00
dw_hdmi-rockchip.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
dw-mipi-dsi-rockchip.c drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
inno_hdmi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
inno_hdmi.h
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rk3066_hdmi.c drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rk3066_hdmi.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_drv.c drm/rockchip: shutdown drm subsystem on shutdown 2019-04-18 10:28:30 +02:00
rockchip_drm_drv.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_fb.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
rockchip_drm_fb.h drm/rockchip: rockchip_drm_fb -> drm_framebuffer 2018-05-18 16:02:05 +01:00
rockchip_drm_fbdev.c drm/rockchip: Use drm_fb_helper_fill_info 2019-03-27 10:05:37 +01:00
rockchip_drm_fbdev.h
rockchip_drm_gem.c drm/rockchip/rockchip_drm_gem.c: convert to use vm_map_pages() 2019-05-14 09:47:50 -07:00
rockchip_drm_gem.h drm/rockchip: support prime import sg table 2018-02-18 11:16:40 +01:00
rockchip_drm_psr.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
rockchip_drm_psr.h drm/rockchip: update cursors asynchronously through atomic. 2019-01-10 23:29:17 +01:00
rockchip_drm_vop.c drm/rockchip: fix fb references in async update 2019-06-04 10:12:02 +02:00
rockchip_drm_vop.h drm/rockchip: vop: Support dithering to RGB666 2019-03-30 23:39:12 +01:00
rockchip_lvds.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
rockchip_lvds.h drm/rockchip: Add support for Rockchip Soc LVDS 2017-09-08 14:57:26 +08:00
rockchip_rgb.c Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
rockchip_rgb.h drm/rockchip: rgb: update SPDX license identifier 2019-01-25 14:50:07 +01:00
rockchip_vop_reg.c drm/rockchip: vop: Support dithering to RGB666 2019-03-30 23:39:12 +01:00
rockchip_vop_reg.h drm: rockchip: vop: add rk3066 vop definitions 2019-01-12 19:42:58 +01:00