From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 17/24] drm/rcar-du: Move output routing configuration to group Date: Thu, 27 Jun 2013 09:49:27 +0000 [thread overview] Message-ID: <1372326574-4315-18-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1372326574-4315-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Output routing is configured in group registers, move the corresponding code from rcar_du_crtc.c to rcar_du_group.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 21 +-------------------- drivers/gpu/drm/rcar-du/rcar_du_group.c | 19 +++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_group.h | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 7784a3b..6a2b959 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -130,25 +130,6 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) rcar_du_crtc_write(rcrtc, DEWR, mode->hdisplay); } -static void rcar_du_crtc_set_routing(struct rcar_du_crtc *rcrtc) -{ - struct rcar_du_device *rcdu = rcrtc->group->dev; - u32 dorcr = rcar_du_read(rcdu, DORCR); - - dorcr &= ~(DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_MASK); - - /* Set the DU1 pins sources. Select CRTC 0 if explicitly requested and - * CRTC 1 in all other cases to avoid cloning CRTC 0 to DU0 and DU1 by - * default. - */ - if (rcrtc->outputs & (1 << 1) && rcrtc->index = 0) - dorcr |= DORCR_PG2D_DS1; - else - dorcr |= DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_DS2; - - rcar_du_write(rcdu, DORCR, dorcr); -} - void rcar_du_crtc_route_output(struct drm_crtc *crtc, unsigned int output) { struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); @@ -245,7 +226,7 @@ static void rcar_du_crtc_start(struct rcar_du_crtc *rcrtc) /* Configure display timings and output routing */ rcar_du_crtc_set_display_timing(rcrtc); - rcar_du_crtc_set_routing(rcrtc); + rcar_du_group_set_routing(rcrtc->group); mutex_lock(&rcrtc->group->planes.lock); rcrtc->plane->enabled = true; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c index 625b9f4..7e75451 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_group.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c @@ -125,3 +125,22 @@ void rcar_du_group_restart(struct rcar_du_group *rgrp) __rcar_du_group_start_stop(rgrp, false); __rcar_du_group_start_stop(rgrp, true); } + +void rcar_du_group_set_routing(struct rcar_du_group *rgrp) +{ + struct rcar_du_crtc *crtc0 = &rgrp->dev->crtcs[rgrp->index * 2]; + u32 dorcr = rcar_du_group_read(rgrp, DORCR); + + dorcr &= ~(DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_MASK); + + /* Set the DU1 pins sources. Select CRTC 0 if explicitly requested and + * CRTC 1 in all other cases to avoid cloning CRTC 0 to DU0 and DU1 by + * default. + */ + if (crtc0->outputs & (1 << 1)) + dorcr |= DORCR_PG2D_DS1; + else + dorcr |= DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_DS2; + + rcar_du_group_write(rgrp, DORCR, dorcr); +} diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.h b/drivers/gpu/drm/rcar-du/rcar_du_group.h index 748331b..180c739 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_group.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.h @@ -42,6 +42,6 @@ int rcar_du_group_get(struct rcar_du_group *rgrp); void rcar_du_group_put(struct rcar_du_group *rgrp); void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start); void rcar_du_group_restart(struct rcar_du_group *rgrp); - +void rcar_du_group_set_routing(struct rcar_du_group *rgrp); #endif /* __RCAR_DU_GROUP_H__ */ -- 1.8.1.5
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> To: dri-devel@lists.freedesktop.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 17/24] drm/rcar-du: Move output routing configuration to group Date: Thu, 27 Jun 2013 11:49:27 +0200 [thread overview] Message-ID: <1372326574-4315-18-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw) In-Reply-To: <1372326574-4315-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Output routing is configured in group registers, move the corresponding code from rcar_du_crtc.c to rcar_du_group.c. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 21 +-------------------- drivers/gpu/drm/rcar-du/rcar_du_group.c | 19 +++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_group.h | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 7784a3b..6a2b959 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -130,25 +130,6 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc) rcar_du_crtc_write(rcrtc, DEWR, mode->hdisplay); } -static void rcar_du_crtc_set_routing(struct rcar_du_crtc *rcrtc) -{ - struct rcar_du_device *rcdu = rcrtc->group->dev; - u32 dorcr = rcar_du_read(rcdu, DORCR); - - dorcr &= ~(DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_MASK); - - /* Set the DU1 pins sources. Select CRTC 0 if explicitly requested and - * CRTC 1 in all other cases to avoid cloning CRTC 0 to DU0 and DU1 by - * default. - */ - if (rcrtc->outputs & (1 << 1) && rcrtc->index == 0) - dorcr |= DORCR_PG2D_DS1; - else - dorcr |= DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_DS2; - - rcar_du_write(rcdu, DORCR, dorcr); -} - void rcar_du_crtc_route_output(struct drm_crtc *crtc, unsigned int output) { struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); @@ -245,7 +226,7 @@ static void rcar_du_crtc_start(struct rcar_du_crtc *rcrtc) /* Configure display timings and output routing */ rcar_du_crtc_set_display_timing(rcrtc); - rcar_du_crtc_set_routing(rcrtc); + rcar_du_group_set_routing(rcrtc->group); mutex_lock(&rcrtc->group->planes.lock); rcrtc->plane->enabled = true; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.c b/drivers/gpu/drm/rcar-du/rcar_du_group.c index 625b9f4..7e75451 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_group.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.c @@ -125,3 +125,22 @@ void rcar_du_group_restart(struct rcar_du_group *rgrp) __rcar_du_group_start_stop(rgrp, false); __rcar_du_group_start_stop(rgrp, true); } + +void rcar_du_group_set_routing(struct rcar_du_group *rgrp) +{ + struct rcar_du_crtc *crtc0 = &rgrp->dev->crtcs[rgrp->index * 2]; + u32 dorcr = rcar_du_group_read(rgrp, DORCR); + + dorcr &= ~(DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_MASK); + + /* Set the DU1 pins sources. Select CRTC 0 if explicitly requested and + * CRTC 1 in all other cases to avoid cloning CRTC 0 to DU0 and DU1 by + * default. + */ + if (crtc0->outputs & (1 << 1)) + dorcr |= DORCR_PG2D_DS1; + else + dorcr |= DORCR_PG2T | DORCR_DK2S | DORCR_PG2D_DS2; + + rcar_du_group_write(rgrp, DORCR, dorcr); +} diff --git a/drivers/gpu/drm/rcar-du/rcar_du_group.h b/drivers/gpu/drm/rcar-du/rcar_du_group.h index 748331b..180c739 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_group.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_group.h @@ -42,6 +42,6 @@ int rcar_du_group_get(struct rcar_du_group *rgrp); void rcar_du_group_put(struct rcar_du_group *rgrp); void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start); void rcar_du_group_restart(struct rcar_du_group *rgrp); - +void rcar_du_group_set_routing(struct rcar_du_group *rgrp); #endif /* __RCAR_DU_GROUP_H__ */ -- 1.8.1.5
next prev parent reply other threads:[~2013-06-27 9:49 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-06-27 9:49 [PATCH 00/24] R-Car DU DRM support for R8A7790 Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 01/24] drm/rcar-du: Add missing alpha plane register definitions Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 02/24] drm/rcar-du: Use devm_ioremap_resource() Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 13:04 ` Sergei Shtylyov 2013-06-27 13:04 ` Sergei Shtylyov 2013-07-01 14:30 ` Laurent Pinchart 2013-07-01 14:30 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 03/24] drm/rcar-du: Add platform module device table Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 04/24] drm/rcar-du: Don't ignore rcar_du_crtc_create() return value Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 05/24] drm/rcar-du: Support per-CRTC clock and IRQ Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 06/24] drm/rcar-du: Fix buffer pitch alignment Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 07/24] drm/rcar-du: Clarify comment regarding plane Y source coordinate Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 08/24] drm/rcar-du: Split LVDS encoder and connector Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 09/24] drm/rcar-du: Split VGA " Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 10/24] drm/rcar-du: Merge LVDS and VGA encoder code Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 11/24] drm/rcar-du: Rename platform data fields to match what they describe Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 12/24] drm/rcar-du: Create rcar_du_planes structure Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 13/24] drm/rcar-du: Rename rcar_du_plane_(init|register) to rcar_du_planes_* Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 14/24] drm/rcar-du: Introduce CRTCs groups Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 15/24] drm/rcar-du: Use dynamic number of CRTCs instead of CRTCs array size Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 16/24] drm/rcar-du: Remove register definitions for the second channel Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart [this message] 2013-06-27 9:49 ` [PATCH 17/24] drm/rcar-du: Move output routing configuration to group Laurent Pinchart 2013-06-27 9:49 ` [PATCH 18/24] drm/rcar-du: Add support for the R8A7790 DU Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 19/24] drm/rcar-du: Fix buffer pitch alignment for " Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 20/24] drm/rcar-du: Add support for multiple groups Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 21/24] drm/rcar-du: Add support for DEFR8 register Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 22/24] drm/rcar-du: Rework output routing support Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 23/24] drm/rcar-du: Configure RGB output routing to DPAD0 Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart 2013-06-27 9:49 ` [PATCH 24/24] drm/rcar-du: Add internal LVDS encoder support Laurent Pinchart 2013-06-27 9:49 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1372326574-4315-18-git-send-email-laurent.pinchart+renesas@ideasonboard.com \ --to=laurent.pinchart+renesas@ideasonboard.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-sh@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.