drm/mxsfb: Disable overlay plane in mxsfb_plane_overlay_atomic_disable()
authorLiu Ying <victor.liu@nxp.com>
Mon, 12 Jun 2023 09:23:59 +0000 (17:23 +0800)
committerMarek Vasut <marex@denx.de>
Sun, 25 Jun 2023 12:51:35 +0000 (14:51 +0200)
commitaa656d48e871a1b062e1bbf9474d8b831c35074c
treeec139b90e7856b6a175a30d15402d42ced87a496
parentcc4fd2934d41a69b4339d7145040d99e7ea79b02
drm/mxsfb: Disable overlay plane in mxsfb_plane_overlay_atomic_disable()

When disabling overlay plane in mxsfb_plane_overlay_atomic_update(),
overlay plane's framebuffer pointer is NULL.  So, dereferencing it would
cause a kernel Oops(NULL pointer dereferencing).  Fix the issue by
disabling overlay plane in mxsfb_plane_overlay_atomic_disable() instead.

Fixes: cb285a5348e7 ("drm: mxsfb: Replace mxsfb_get_fb_paddr() with drm_fb_cma_get_gem_addr()")
Cc: stable@vger.kernel.org # 5.19+
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230612092359.784115-1-victor.liu@nxp.com
drivers/gpu/drm/mxsfb/mxsfb_kms.c