diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-09-07 17:34:26 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-02-23 10:34:29 +0300 |
commit | 2427b3037710d4aa71c9c1cdfcd542805e0c53f3 (patch) | |
tree | 810b6fb9005f3471e65acbace0453f10a4faf1da /drivers/gpu/drm/rcar-du/rcar_du_vsp.c | |
parent | a5e18b2b7d5d9486c27142f0a76565954160ab3b (diff) | |
download | linux-2427b3037710d4aa71c9c1cdfcd542805e0c53f3.tar.xz |
drm: rcar-du: Add R8A7795 device support
Document the R8A7795-specific DT bindings and support them in the
driver. The HDMI and LVDS outputs are currently not supported.
Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_vsp.c')
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 7c7d6f265a09..24acee1633e9 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -31,6 +31,7 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) { const struct drm_display_mode *mode = &crtc->crtc.state->adjusted_mode; + struct rcar_du_device *rcdu = crtc->group->dev; struct rcar_du_plane_state state = { .state = { .crtc = &crtc->crtc, @@ -44,13 +45,17 @@ void rcar_du_vsp_enable(struct rcar_du_crtc *crtc) .src_h = mode->vdisplay << 16, }, .format = rcar_du_format_info(DRM_FORMAT_ARGB8888), - .hwindex = crtc->index % 2, .source = RCAR_DU_PLANE_VSPD1, .alpha = 255, .colorkey = 0, .zpos = 0, }; + if (rcdu->info->gen >= 3) + state.hwindex = (crtc->index % 2) ? 2 : 0; + else + state.hwindex = crtc->index % 2; + __rcar_du_plane_setup(crtc->group, &state); /* Ensure that the plane source configuration takes effect by requesting @@ -329,10 +334,9 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp) return ret; /* The VSP2D (Gen3) has 5 RPFs, but the VSP1D (Gen2) is limited to - * 4 RPFs. Hardcode the number of planes to 4 as Gen3 isn't supported - * yet. + * 4 RPFs. */ - vsp->num_planes = 4; + vsp->num_planes = rcdu->info->gen >= 3 ? 5 : 4; vsp->planes = devm_kcalloc(rcdu->dev, vsp->num_planes, sizeof(*vsp->planes), GFP_KERNEL); |