OSDN Git Service

drm: rcar-du: Use the correct naming for ODPM fields in DEFR6
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Thu, 26 Apr 2018 16:53:33 +0000 (17:53 +0100)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 5 May 2018 14:11:18 +0000 (17:11 +0300)
The naming of the fields for the ODPM signals in the DU extensional
function control register 6 (DEFR6) is incorrect against the data sheets
for both R-Car Gen2 and R-Car Gen3.

Rename the fields to match the datasheet.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_group.c
drivers/gpu/drm/rcar-du/rcar_du_regs.h

index 2f37ea9..eead202 100644 (file)
@@ -46,10 +46,10 @@ void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data)
 
 static void rcar_du_group_setup_pins(struct rcar_du_group *rgrp)
 {
-       u32 defr6 = DEFR6_CODE | DEFR6_ODPM12_DISP;
+       u32 defr6 = DEFR6_CODE | DEFR6_ODPM02_DISP;
 
        if (rgrp->num_crtcs > 1)
-               defr6 |= DEFR6_ODPM22_DISP;
+               defr6 |= DEFR6_ODPM12_DISP;
 
        rcar_du_group_write(rgrp, DEFR6, defr6);
 }
index d5bae99..9dfd220 100644 (file)
 
 #define DEFR6                  0x000e8
 #define DEFR6_CODE             (0x7778 << 16)
-#define DEFR6_ODPM22_DSMR      (0 << 10)
-#define DEFR6_ODPM22_DISP      (2 << 10)
-#define DEFR6_ODPM22_CDE       (3 << 10)
-#define DEFR6_ODPM22_MASK      (3 << 10)
-#define DEFR6_ODPM12_DSMR      (0 << 8)
-#define DEFR6_ODPM12_DISP      (2 << 8)
-#define DEFR6_ODPM12_CDE       (3 << 8)
-#define DEFR6_ODPM12_MASK      (3 << 8)
+#define DEFR6_ODPM12_DSMR      (0 << 10)
+#define DEFR6_ODPM12_DISP      (2 << 10)
+#define DEFR6_ODPM12_CDE       (3 << 10)
+#define DEFR6_ODPM12_MASK      (3 << 10)
+#define DEFR6_ODPM02_DSMR      (0 << 8)
+#define DEFR6_ODPM02_DISP      (2 << 8)
+#define DEFR6_ODPM02_CDE       (3 << 8)
+#define DEFR6_ODPM02_MASK      (3 << 8)
 #define DEFR6_TCNE1            (1 << 6)
 #define DEFR6_TCNE0            (1 << 4)
 #define DEFR6_MLOS1            (1 << 2)