]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tue, 19 May 2026 16:08:24 +0000 (17:08 +0100)
committerBiju Das <biju.das.jz@bp.renesas.com>
Fri, 22 May 2026 06:31:36 +0000 (07:31 +0100)
commit332d72b9513cee25682108b5b37fe9fe9468ba73
treed7c39d7566b09a3606b8ba576e9fbde5093f6074
parent62ca607fcb1f442e909e6729fa9e1e7a18e6ae5d
drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits

Move pixel clock validation from a fixed encoder check to per SoC
constraints stored in rzg2l_du_device_info.

Pixel clock limits differ across SoCs in the RZ DU family and cannot be
expressed by a single shared rule. For example, RZ/G2UL and RZ/G2L limit
the DPAD0 pixel clock to a narrow window, while other SoCs such as
RZ/T2H require a wider operating range.

Add mode_clock_min and mode_clock_max fields to rzg2l_du_device_info to
describe the supported pixel clock range for each SoC. Update
rzg2l_du_encoder_mode_valid() to check these bounds when evaluating
DPAD0 outputs, returning MODE_CLOCK_LOW when the pixel clock falls
below mode_clock_min and MODE_CLOCK_HIGH when it exceeds mode_clock_max.

Populate the pixel clock limits for both the RZ/G2UL (R9A07G043U) and
RZ/G2L (R9A07G044) variants to a minimum of 20875 kHz and a maximum of
83500 kHz.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20260519160825.4082566-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c