]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:06 +0000 (12:28 +0200)
commit8bf2d4ca521d3acb57fc1607386e749b3cc92aaf
tree3c0fc018d92b520e180f206701ea6d1f0abcaf11
parent09974a1352d3479748cfb08dbfc39a3c019e4486
drm/mxsfb: Disable overlay plane in mxsfb_plane_overlay_atomic_disable()

commit aa656d48e871a1b062e1bbf9474d8b831c35074c upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/mxsfb/mxsfb_kms.c