linux-stable/drivers/gpu/drm/arm
Liviu Dudau 5121d040d3 drm/komeda: Fix handling of atomic commits in the atomic_commit_tail hook
[ Upstream commit eaa225b6b5 ]

Komeda driver relies on the generic DRM atomic helper functions to handle
commits. It only implements an atomic_commit_tail hook for the
mode_config_helper_funcs and even that one is pretty close to the generic
implementation with the exception of additional dma_fence signalling.

What the generic helper framework doesn't do is waiting for the actual
hardware to signal that the commit parameters have been written into the
appropriate registers. As we signal CRTC events only on the irq handlers,
we need to flush the configuration and wait for the hardware to respond.

Add the Komeda specific implementation for atomic_commit_hw_done() that
flushes and waits for flip done before calling drm_atomic_helper_commit_hw_done().

The fix was prompted by a patch from Carsten Haitzler where he was trying to
solve the same issue but in a different way that I think can lead to wrong
event signaling to userspace.

Reported-by: Carsten Haitzler <carsten.haitzler@arm.com>
Tested-by: Carsten Haitzler <carsten.haitzler@arm.com>
Reviewed-by: Carsten Haitzler <carsten.haitzler@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220722122139.288486-1-liviu.dudau@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-21 12:39:12 +02:00
..
display drm/komeda: Fix handling of atomic commits in the atomic_commit_tail hook 2022-10-21 12:39:12 +02:00
Kconfig drm/arm: arm hdlcd select DRM_GEM_CMA_HELPER 2022-02-28 13:31:20 -06:00
Makefile
hdlcd_crtc.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
hdlcd_drv.c drm/arm/hdlcd: Replace module initialization with DRM helpers 2022-01-19 18:40:27 +01:00
hdlcd_drv.h drm/arm/hdlcd: Convert to Linux IRQ interfaces 2021-08-10 20:00:51 +02:00
hdlcd_regs.h
malidp_crtc.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
malidp_drv.c drm/malidp: Replace module initialization with DRM helpers 2022-01-19 18:40:29 +01:00
malidp_drv.h
malidp_hw.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
malidp_hw.h
malidp_mw.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
malidp_mw.h
malidp_planes.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
malidp_regs.h