drm/rcar-du: Add support for DEFR8 register
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 15 Jun 2013 00:40:57 +0000 (02:40 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 9 Aug 2013 21:17:51 +0000 (23:17 +0200)
The R8A7790 DU has a new extended function control register. Support it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_drv.c
drivers/gpu/drm/rcar-du/rcar_du_drv.h
drivers/gpu/drm/rcar-du/rcar_du_group.c

index 8694a4648860e22a1f6a6a2379518a16d5b96fb1..f8785357b5992eee41807899b4dc8a9da99b44a5 100644 (file)
@@ -222,7 +222,8 @@ static const struct rcar_du_device_info rcar_du_r8a7779_info = {
 };
 
 static const struct rcar_du_device_info rcar_du_r8a7790_info = {
-       .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_ALIGN_128B,
+       .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK | RCAR_DU_FEATURE_ALIGN_128B
+                 | RCAR_DU_FEATURE_DEFR8,
        .num_crtcs = 3,
 };
 
index 160e5eb8f29d5bb4a96203668b1652f11b6034fd..70c335f51136738e654b2c2226328eba805bc71c 100644 (file)
@@ -27,6 +27,7 @@ struct rcar_du_device;
 
 #define RCAR_DU_FEATURE_CRTC_IRQ_CLOCK (1 << 0)        /* Per-CRTC IRQ and clock */
 #define RCAR_DU_FEATURE_ALIGN_128B     (1 << 1)        /* Align pitches to 128 bytes */
+#define RCAR_DU_FEATURE_DEFR8          (1 << 2)        /* Has DEFR8 register */
 
 /*
  * struct rcar_du_device_info - DU model-specific information
index 0eb106efffc91ec545e342282172931982c807ec..f3ba0ca845e20044d0e8d794842df82090115841 100644 (file)
@@ -51,6 +51,8 @@ static void rcar_du_group_setup(struct rcar_du_group *rgrp)
        rcar_du_group_write(rgrp, DEFR3, DEFR3_CODE | DEFR3_DEFE3);
        rcar_du_group_write(rgrp, DEFR4, DEFR4_CODE);
        rcar_du_group_write(rgrp, DEFR5, DEFR5_CODE | DEFR5_DEFE5);
+       if (rcar_du_has(rgrp->dev, RCAR_DU_FEATURE_DEFR8))
+               rcar_du_group_write(rgrp, DEFR8, DEFR8_CODE | DEFR8_DEFE8);
 
        /* Use DS1PR and DS2PR to configure planes priorities and connects the
         * superposition 0 to DU0 pins. DU1 pins will be configured dynamically.