OSDN Git Service

drm: rcar-du: Write correct values in DORCR reserved fields
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 22 Feb 2023 03:49:39 +0000 (05:49 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 25 Mar 2023 20:38:10 +0000 (22:38 +0200)
commit944eb068879f297af5470b7d9ffc58d7be3c6df3
treefad614d3db62c5d7ebdb6bc11f3e111a00fdf4a8
parent3d3f8d8cb80ae6170cece11d39127fef95211056
drm: rcar-du: Write correct values in DORCR reserved fields

The DORCR register controls the routing of clocks and data between DU
channels within a group. For groups that contain a single channel,
there's no routing option to control, and some fields of the register
are then reserved. On Gen2 those reserved fields are documented as
required to be set to 0, while on Gen3 and newer the PG1T, DK1S and PG1D
reserved fields must be set to 1.

The DU driver initializes the DORCR register in rcar_du_group_setup(),
where it ignores the PG1T, DK1S and PG1D, and then configures those
fields to the correct value in rcar_du_group_set_routing(). This hasn't
been shown to cause any issue, but prevents certifying that the driver
complies with the documentation in safety-critical use cases.

As there is no reasonable change that the documentation will be updated
to clarify that those reserved fields can be written to 0 temporarily
before starting the hardware, make sure that the registers are always
set to valid values.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_group.c