dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org, inki.dae@samsung.com,
	jy0922.shim@samsung.com, t.figa@samsung.com,
	Tomasz Figa <tomasz.figa@gmail.com>
Subject: [PATCH 3/4] drm/exynos: fimd: Add support for FIMD variants with clock selection
Date: Wed,  1 May 2013 21:02:28 +0200	[thread overview]
Message-ID: <1367434949-14838-4-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1367434949-14838-1-git-send-email-tomasz.figa@gmail.com>

Some platforms that can be supported this driver has additional clock
source selection bits in VIDCON0 register that allows to select which
clock should be used to drive the pixel clock: bus clock or special
clock.

Since this driver assumes that special clock always drives the pixel
clock, this patch sets the selection bitfield to use the special clock.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index a5559f6..a2e385d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -65,6 +65,7 @@ struct fimd_driver_data {
 	unsigned int timing_base;
 
 	unsigned int has_shadowcon:1;
+	unsigned int has_clksel:1;
 };
 
 static struct fimd_driver_data exynos4_fimd_driver_data = {
@@ -278,6 +279,11 @@ static void fimd_commit(struct device *dev)
 	val = ctx->vidcon0;
 	val &= ~(VIDCON0_CLKVAL_F_MASK | VIDCON0_CLKDIR);
 
+	if (ctx->driver_data->has_clksel) {
+		val &= ~VIDCON0_CLKSEL_MASK;
+		val |= VIDCON0_CLKSEL_LCD;
+	}
+
 	if (ctx->clkdiv > 1)
 		val |= VIDCON0_CLKVAL_F(ctx->clkdiv - 1) | VIDCON0_CLKDIR;
 	else
-- 
1.8.2.1

  parent reply	other threads:[~2013-05-01 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-01 19:02 [PATCH 0/4] drm/exynos: fimd: Add support for S3C6400/S3C6410 Tomasz Figa
2013-05-01 19:02 ` [PATCH 1/4] drm/exynos: fimd: Hold pointer to driver data in context struct Tomasz Figa
2013-05-01 19:02 ` [PATCH 2/4] drm/exynos: fimd: Add support for FIMD versions without SHADOWCON register Tomasz Figa
2013-05-01 19:02 ` Tomasz Figa [this message]
2013-05-01 19:02 ` [PATCH 4/4] drm/exynos: fimd: Add support for S3C64xx SoCs Tomasz Figa
2013-05-19 11:26 ` [PATCH 0/4] drm/exynos: fimd: Add support for S3C6400/S3C6410 Tomasz Figa
2013-06-05 18:14   ` Tomasz Figa
2013-06-06  4:02     ` Joonyoung Shim
2013-06-10 12:18       ` Inki Dae

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=1367434949-14838-4-git-send-email-tomasz.figa@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=t.figa@samsung.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox