[PATCH v7 00/15] drm/imx: dc: Use prefetch engine

From: Liu Ying

Date: Mon Oct 26 2026 - 06:04:10 EST


Hi,

This patch series aims to use prefetch engine in imx8-dc KMS driver.

One prefetch engine consists of one DPR Channel(DPRC) and one or two
Display Prefetch Resolve Gaskets(PRGs). It prefetches data from
DDR, resolves data in tile formats if needed and outputs the result
data to FetchUnit(s). When one PRG is used, a prefetch engine supports
processing pixel formats with one planar, e.g., RGB formats. When two
are used, pixel formats with two planars are supported, e.g., NV12.

For now, this patch series only supports prefetch engines with one PRG
because it is enough for XRGB8888 which is the only pixel format
supported by imx8-dc plane driver. Two PRGs would be supported by
future patches.

Patch 1 and 2 add dt-bindings for DPRC and PRG. They were reviewed
by Rob[1][2]. I slightly modified the patches' commit message to use
imperative mood.

Patch 3 fixes invisible plane issue reported by Sashiko AI bot in v6.

Patch 4 fixes FetchUnit dimensions as related to prefetch engine function.

Patch 5 flags CRTC status in GERNERALPURPOSE register as needed by patch 6.

Patch 6 disables CRTC at boot if needed to support prefetch engine better.

Patch 7 and 8 add PRG and DPRC drivers.

Patch 9 to 14 do preparations before using prefetch engine in imx8-dc KMS
driver.

Patch 15 uses prefetch engine in imx8-dc KMS driver.

[1] https://lore.kernel.org/lkml/20201207165945.GA430214@xxxxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/lkml/20201207170206.GA434964@xxxxxxxxxxxxxxxxxx/

Signed-off-by: Liu Ying <victor.liu@xxxxxxx>
---
Changes in v7:
- Collect Maxime's A-b tags.
- Fix Sashiko AI bot's comments. See detail changelog in each patch.
- Trivial tweaks.
- Cc Alexander.
- Link to v6: https://patch.msgid.link/20260904-imx8-dc-prefetch-v6-0-26643e3f6cb7@xxxxxxx

Changes in v6:
- Rebase onto the latest drm-misc-next and resolve conflicts in patch 4&7&13.
- Include "dc-drv.h" in patch 5&6 to avoid build warnings with C=1.
- Fix PRG BYPASS programming in patch 5.
- Link to v5: https://lore.kernel.org/r/20251027-imx8-dc-prefetch-v5-0-4ecb6c6d4941@xxxxxxx

Changes in v5:
- Squash MAINTAINERS file update into patch 1&2. (Krzysztof)
- Link to v4: https://lore.kernel.org/r/20251016-imx8-dc-prefetch-v4-0-dfda347cb3c5@xxxxxxx

Changes in v4:
- Rebase onto the latest drm-misc-next and resolve conflicts in patch 4&10.
- Sort bits and bitfields in descending order for register PRG_CTRL in patch 6.
- Cc Marek as stakeholder of the driver due to recent i.MX95 DC patches posted.
- Link to v3: https://lore.kernel.org/r/20250929-imx8-dc-prefetch-v3-0-c01d0608add2@xxxxxxx

Changes in v3:
- Call dc_dprc_enable() only when start == true in patch 7. (Frank)
- Collect Frank's R-b tags.
- Link to v2: https://lore.kernel.org/r/20250923-imx8-dc-prefetch-v2-0-5d69dc9ac8b5@xxxxxxx

Changes in v2:
- Rebase the patch series onto next-20250922.
- Collect Alexander's and Frank's R-b tags.
- Manage PRG's and DPRC's clocks with bulk interfaces in patch 6&7. (Frank)
- Sort variables in probe function in reverse Christmas tree fashion in patch 7. (Frank)
- Link to v1: https://lore.kernel.org/r/20250704-imx8-dc-prefetch-v1-0-784c03fd645f@xxxxxxx

---
Liu Ying (15):
dt-bindings: display: imx: Add i.MX8qxp/qm PRG binding
dt-bindings: display: imx: Add i.MX8qxp/qm DPR channel binding
drm/imx: dc-plane: Disable plane when it is invisible
drm/imx: dc-fu: Fix dimensions
drm/imx: dc: Flag CRTC status in GERNERALPURPOSE register
drm/imx: dc-crtc: Disable at boot
drm/imx: dc: Add PRG support
drm/imx: dc: Add DPR channel support
drm/imx: dc: Use TCON operation mode
drm/imx: dc-ed: Support getting source selection
drm/imx: dc-lb: Support getting secondary input selection
drm/imx: dc-ed: Drop initial source selection
drm/imx: dc-lb: Drop initial primary and secondary input selections
drm/imx: dc-fu: Get DPR channel
drm/imx: dc: Use prefetch engine

.../bindings/display/imx/fsl,imx8qxp-dprc.yaml | 100 ++++
.../bindings/display/imx/fsl,imx8qxp-prg.yaml | 60 +++
MAINTAINERS | 2 +
drivers/gpu/drm/imx/dc/Kconfig | 1 +
drivers/gpu/drm/imx/dc/Makefile | 6 +-
drivers/gpu/drm/imx/dc/dc-crtc.c | 214 ++++++++-
drivers/gpu/drm/imx/dc/dc-de.h | 2 +
drivers/gpu/drm/imx/dc/dc-dprc.c | 522 +++++++++++++++++++++
drivers/gpu/drm/imx/dc/dc-dprc.h | 37 ++
drivers/gpu/drm/imx/dc/dc-drv.c | 83 ++++
drivers/gpu/drm/imx/dc/dc-drv.h | 12 +
drivers/gpu/drm/imx/dc/dc-ed.c | 35 +-
drivers/gpu/drm/imx/dc/dc-fg.c | 11 +-
drivers/gpu/drm/imx/dc/dc-fl.c | 7 +-
drivers/gpu/drm/imx/dc/dc-fu.c | 59 ++-
drivers/gpu/drm/imx/dc/dc-fu.h | 11 +-
drivers/gpu/drm/imx/dc/dc-fw.c | 7 +-
drivers/gpu/drm/imx/dc/dc-kms.h | 7 +
drivers/gpu/drm/imx/dc/dc-lb.c | 27 +-
drivers/gpu/drm/imx/dc/dc-pe.h | 2 +
drivers/gpu/drm/imx/dc/dc-plane.c | 100 ++--
drivers/gpu/drm/imx/dc/dc-prg.c | 326 +++++++++++++
drivers/gpu/drm/imx/dc/dc-prg.h | 39 ++
drivers/gpu/drm/imx/dc/dc-tc.c | 119 ++++-
24 files changed, 1726 insertions(+), 63 deletions(-)
---
base-commit: cf61bef3801c3c9d0d8c39026b7b2fb242898a3a
change-id: 20250703-imx8-dc-prefetch-028e306591c6

Best regards,
--
Regards,
Liu Ying