mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/atomic-helper: Support atomic flush with an optional kthread worker
@ 2025-10-31 10:21 Liu Ying
  2025-10-31 10:21 ` [PATCH 1/2] " Liu Ying
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Liu Ying @ 2025-10-31 10:21 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: dri-devel, linux-kernel, imx, linux-arm-kernel, Liu Ying

Hi,

As drm_atomic_helper_commit_planes() calls atomic_flush for CRTCs
sequentially and a driver's atomic_flush callback could be blocking,
the performance for flushing multiple CRTCs in a single atomic commit
could be low, like page flip for multiple CRTCs.  A real case is imx8-dc,
which supports two CRTCs and does atomic_flush in a blocking way, i.e.,
waits for a done event for loading shadow registers.

To resolve that, introduce an optional kthread worker to conduct
flush in drm_atomic_helper_commit_planes(), so that flush can run in
parallel for multiple CRTCs.

Drivers should call drmm_crtc_flush_worker_init() to initialize the
kthread worker if they want to use it.

Patch 1 adds the optional kthread worker support.
Patch 2 makes imx8-dc use the kthread worker.

Let me know your thoughts.  Thanks.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
---
Liu Ying (2):
      drm/atomic-helper: Support atomic flush with an optional kthread worker
      drm/imx: dc-crtc: Use flush worker

 drivers/gpu/drm/drm_atomic_helper.c | 27 ++++++++++++++++-
 drivers/gpu/drm/drm_crtc.c          | 59 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/imx/dc/dc-crtc.c    |  9 +++++-
 include/drm/drm_crtc.h              | 45 ++++++++++++++++++++++++++++
 4 files changed, 138 insertions(+), 2 deletions(-)
---
base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
change-id: 20251031-drm-crtc-flush-worker-0aac27acf40f

Best regards,
-- 
Liu Ying <victor.liu@nxp.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-12-08  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-31 10:21 [PATCH 0/2] drm/atomic-helper: Support atomic flush with an optional kthread worker Liu Ying
2025-10-31 10:21 ` [PATCH 1/2] " Liu Ying
2025-10-31 10:21 ` [PATCH 2/2] drm/imx: dc-crtc: Use flush worker Liu Ying
2025-12-08  7:38 ` [PATCH 0/2] drm/atomic-helper: Support atomic flush with an optional kthread worker Liu Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®