linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jason Jin <Jason.Jin@freescale.com>
To: <b07421@freescale.com>, <timur@tabi.org>
Cc: linux-fbdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	r58472@freescale.com
Subject: [PATCH 1/2] video/fsl: make the diu driver work without platform hooks
Date: Thu, 27 Mar 2014 01:41:43 +0800	[thread overview]
Message-ID: <1395855704-19908-1-git-send-email-Jason.Jin@freescale.com> (raw)

make the diu driver work without platform hooks.

So far the DIU driver does not have a mechanism to do the
board specific initialization. So on some platforms,
such as P1022, 8610 and 5121, The board specific initialization
is implmented in the platform file such p10222_ds.

This board sepecific initialization mechanism is not feasible i
for corenet platform as the corenet platform file is a
abstraction of serveral platforms.

However, the DIU is already initialized in u-boot and we can
rely on the settings in u-boot for corenet platform, the only
issue is that when DIU wake up from the deepsleep, some of the
board specific initialization will lost, such as the pixel clock
setting.

This patch try to make the diu work on the platform without board
specific initialization such as corenet(T1040 so far), and rely on
the board initialization in u-boot. The following patch will try to
fix the pixel clock saving issue for deepsleep.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
---
 drivers/video/fsl-diu-fb.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index e8758b9..4640846 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -479,7 +479,10 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
 			port = FSL_DIU_PORT_DLVDS;
 	}
 
-	return diu_ops.valid_monitor_port(port);
+	if (diu_ops.valid_monitor_port)
+		return diu_ops.valid_monitor_port(port);
+	else
+		return port;
 }
 
 /*
@@ -846,7 +849,11 @@ static void update_lcdc(struct fb_info *info)
 
 	out_be32(&hw->vsyn_para, temp);
 
-	diu_ops.set_pixel_clock(var->pixclock);
+	/*if there is platform function for pixel clock setting, use it.
+	 * otherwise we rely on the settings in u-boot.
+	 */
+	if (diu_ops.set_pixel_clock)
+		diu_ops.set_pixel_clock(var->pixclock);
 
 #ifndef CONFIG_PPC_MPC512x
 	/*
-- 
1.8.0

             reply	other threads:[~2014-03-26 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 17:41 Jason Jin [this message]
2014-03-26 17:41 ` [PATCH 2/2] video/fsl: Fix the sleep function for FSL DIU module Jason Jin
2014-03-26 18:50   ` Timur Tabi
2014-03-27  3:42     ` Jason.Jin
2014-03-27  3:46       ` Timur Tabi
2014-03-27  3:57         ` Jason.Jin
2014-03-26 18:46 ` [PATCH 1/2] video/fsl: make the diu driver work without platform hooks Timur Tabi
2014-03-27  3:30   ` Jason.Jin
2014-03-27  3:35     ` Timur Tabi
2014-03-27  3:38       ` Jason.Jin

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=1395855704-19908-1-git-send-email-Jason.Jin@freescale.com \
    --to=jason.jin@freescale.com \
    --cc=b07421@freescale.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@freescale.com \
    --cc=timur@tabi.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: 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;
as well as URLs for NNTP newsgroup(s).