Commit ff967363 authored by Laurent Pinchart's avatar Laurent Pinchart

drm: rcar-du: Compute plane DDCR4 register value directly

There's no need for a read-modify-write pattern, all register bits can
be set explicitly.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
parent 1b0fd0ea
...@@ -28,13 +28,6 @@ ...@@ -28,13 +28,6 @@
#define RCAR_DU_COLORKEY_SOURCE (1 << 24) #define RCAR_DU_COLORKEY_SOURCE (1 << 24)
#define RCAR_DU_COLORKEY_MASK (1 << 24) #define RCAR_DU_COLORKEY_MASK (1 << 24)
static u32 rcar_du_plane_read(struct rcar_du_group *rgrp,
unsigned int index, u32 reg)
{
return rcar_du_read(rgrp->dev,
rgrp->mmio_offset + index * PLANE_OFF + reg);
}
static void rcar_du_plane_write(struct rcar_du_group *rgrp, static void rcar_du_plane_write(struct rcar_du_group *rgrp,
unsigned int index, u32 reg, u32 data) unsigned int index, u32 reg, u32 data)
{ {
...@@ -182,9 +175,6 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane, ...@@ -182,9 +175,6 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,
* The data format is selected by the DDDF field in PnMR and the EDF * The data format is selected by the DDDF field in PnMR and the EDF
* field in DDCR4. * field in DDCR4.
*/ */
ddcr4 = rcar_du_plane_read(rgrp, index, PnDDCR4);
ddcr4 &= ~PnDDCR4_EDF_MASK;
ddcr4 |= state->format->edf | PnDDCR4_CODE;
rcar_du_plane_setup_mode(plane, index); rcar_du_plane_setup_mode(plane, index);
...@@ -204,6 +194,9 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane, ...@@ -204,6 +194,9 @@ static void __rcar_du_plane_setup(struct rcar_du_plane *plane,
} }
rcar_du_plane_write(rgrp, index, PnDDCR2, ddcr2); rcar_du_plane_write(rgrp, index, PnDDCR2, ddcr2);
ddcr4 = state->format->edf | PnDDCR4_CODE;
rcar_du_plane_write(rgrp, index, PnDDCR4, ddcr4); rcar_du_plane_write(rgrp, index, PnDDCR4, ddcr4);
/* Destination position and size */ /* Destination position and size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment