lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251031-drm-crtc-flush-worker-v1-2-9edc94da0fb7@nxp.com>
Date: Fri, 31 Oct 2025 18:21:25 +0800
From: Liu Ying <victor.liu@....com>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, 
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
 Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, 
 Pengutronix Kernel Team <kernel@...gutronix.de>, 
 Fabio Estevam <festevam@...il.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
 imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, 
 Liu Ying <victor.liu@....com>
Subject: [PATCH 2/2] drm/imx: dc-crtc: Use flush worker

As dc_crtc_atomic_flush() is blocking due to waiting for shadow load
done event, page flip performance could be low when atomic flush for
two CRTCs are conducted sequentially by drm_atomic_helper_commit_planes()
with a single atomic commit.  So, call drmm_crtc_flush_worker_init()
from dc_crtc_init() to initialize a flush worker for each CRTC so that
atomic flush can run in parallel by drm_atomic_helper_commit_planes()
for multiple CRTCs to achieve better page flip performance.

Signed-off-by: Liu Ying <victor.liu@....com>
---
 drivers/gpu/drm/imx/dc/dc-crtc.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/dc/dc-crtc.c b/drivers/gpu/drm/imx/dc/dc-crtc.c
index 31d3a982deaf7a0390937285c9d5d00100323181..fb1049a09296a3ecaad8d1430d818fd6e2f25a54 100644
--- a/drivers/gpu/drm/imx/dc/dc-crtc.c
+++ b/drivers/gpu/drm/imx/dc/dc-crtc.c
@@ -540,8 +540,15 @@ int dc_crtc_init(struct dc_drm_device *dc_drm, int crtc_index)
 
 	ret = drm_crtc_init_with_planes(drm, &dc_crtc->base, &dc_primary->base,
 					NULL, &dc_crtc_funcs, NULL);
-	if (ret)
+	if (ret) {
 		dev_err(de->dev, "failed to add CRTC: %d\n", ret);
+		return ret;
+	}
+
+	ret = drmm_crtc_flush_worker_init(drm, &dc_crtc->base);
+	if (ret)
+		dev_err(de->dev,
+			"failed to initialize flush worker for CRTC: %d\n", ret);
 
 	return ret;
 }

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ