From: Gary Jennejohn <gary.jennejohn@freenet.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Modifications to video-related files for RRvision.
Date: Mon, 23 Jun 2008 16:54:38 +0200 [thread overview]
Message-ID: <20080623165438.2bb5d337@peedub.jennejohn.org> (raw)
Note that the LOGO_X/LOG_Y macros are defined in RRvision.h to center
the logo on the screen and might be useful for other boards.
Signed-off-by: Gary Jennejohn <garyj@denx.de>
---
common/lcd.c | 9 +++-
cpu/mpc8xx/lcd.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++---
cpu/mpc8xx/video.c | 22 ++++++++-
3 files changed, 159 insertions(+), 10 deletions(-)
diff --git a/common/lcd.c b/common/lcd.c
index ebf377a..e54d4f5 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -70,6 +70,13 @@
# if (CONSOLE_COLOR_WHITE >= BMP_LOGO_OFFSET)
# error Default Color Map overlaps with Logo Color Map
# endif
+
+# ifndef CONFIG_LCD_LOGO_X
+# define CONFIG_LCD_LOGO_X 0
+# endif
+# ifndef CONFIG_LCD_LOGO_Y
+# define CONFIG_LCD_LOGO_Y 0
+# endif
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -768,7 +775,7 @@ static void *lcd_logo (void)
#endif /* CONFIG_SPLASH_SCREEN */
#ifdef CONFIG_LCD_LOGO
- bitmap_plot (0, 0);
+ bitmap_plot (CONFIG_LCD_LOGO_X, CONFIG_LCD_LOGO_Y);
#endif /* CONFIG_LCD_LOGO */
#ifdef CONFIG_MPC823
diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c
index 3c64a9b..aff5465 100644
--- a/cpu/mpc8xx/lcd.c
+++ b/cpu/mpc8xx/lcd.c
@@ -55,6 +55,10 @@
#undef CONFIG_LCD_INFO
#endif
+#if defined(CONFIG_RRVISION) && defined(TTTECH_NO_SCREEN_INFO)
+#undef CONFIG_LCD_INFO
+#endif
+
/*----------------------------------------------------------------------*/
#ifdef CONFIG_KYOCERA_KCS057QV1AJ
/*
@@ -114,7 +118,7 @@ vidinfo_t panel_info = {
*/
vidinfo_t panel_info = {
640, 480, 212, 158, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
- 3, 0, 0, 1, 1, 144, 2, 0, 33
+ 3, 0, 0, 1, 1, 88, 2, 0, 33
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_NEC_NL6448BC33_54 */
@@ -122,16 +126,83 @@ vidinfo_t panel_info = {
#ifdef CONFIG_SHARP_LQ104V7DS01
/*
- * SHARP LQ104V7DS01. 6.5", 640x480. Active, color, single scan.
+ * SHARP LQ104V7DS01. 10", 640x480. Active, color, single scan.
*/
vidinfo_t panel_info = {
- 640, 480, 132, 99, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_LOW,
- 3, 0, 0, 1, 1, 25, 1, 0, 33
+ 660, 480, 0, 0, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 0, 0, 1, 1, 99, 30, 0, 20
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_SHARP_LQ104V7DS01 */
/*----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_SHARP_LQ104V1DG61
+/*
+ * SHARP LQ104V1DG61. 10", 640x480. Active, color, single scan.
+ */
+vidinfo_t panel_info = {
+ 640, 480, 0, 0, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 0, 0, 1, 1, 80, 30, 0, 20
+
+};
+#endif /* CONFIG_SHARP_LQ104V1DG61 */
+/*----------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_NEC_NL8060BC26
+#undef LCD_DF
+#define LCD_DF 4
+/*
+ * NEC_NL8060BC26. 10.4"", 800x600. Active, color, single scan.
+ */
+vidinfo_t panel_info = {
+ 800, 600, 211, 158, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 0, 0, 1, 1, 80, 30, 0, 20
+};
+#endif /* CONFIG_NEC_NL8060BC26 */
+/*----------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_PM070WL3
+#undef LCD_DF
+#define LCD_DF 4
+/*
+ * PM070-WL3. 7"", 800x480. Active, color, single scan.
+ */
+vidinfo_t panel_info = {
+ 800, 480, 153, 92, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 0, 0, 1, 1, 80, 30, 0, 20
+};
+#endif /* CONFIG_PM070WL3 */
+/*----------------------------------------------------------------------*/
+
+
+#ifdef CONFIG_HLD1045AE1
+vidinfo_t panel_info = {
+ 640, 480, 0, 0, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 0, 0, 1, 1, 80, 3, 0, 33
+ /* wbl, vpw, lcdac, wbf */
+};
+#endif /* CONFIG_HLD1045AE1 */
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_AUO_T070W1D1
+#undef LCD_DF
+#define LCD_DF 12
+
+vidinfo_t panel_info = {
+ 480, 240, 0, 0, CFG_HIGH, CFG_HIGH, CFG_LOW, CFG_LOW, CFG_HIGH,
+ 3, 1, 0, 1, 1, 80, 4, 0, 16
+ /* wbl, vpw, lcdac, wbf */
+};
+#define CONFIG_LCD_INFO_BELOW_LOGO
+#endif /* CONFIG_AUO_T070W1D1 */
+/*----------------------------------------------------------------------*/
+
#ifdef CONFIG_SHARP_16x9
/*
* Sharp 320x240. Active, color, single scan. It isn't 16x9, and I am
@@ -144,6 +215,44 @@ vidinfo_t panel_info = {
#endif /* CONFIG_SHARP_16x9 */
/*----------------------------------------------------------------------*/
+#ifdef CONFIG_SHARP_LQ050Q5DR01
+/*
+ * Sharp LQ050Q5DR01 display. Active, color, single scan.
+ */
+#undef LCD_DF
+#define LCD_DF 12
+
+vidinfo_t panel_info = {
+ 320, 241, 0, 0, CFG_HIGH, CFG_HIGH, CFG_HIGH, CFG_HIGH, CFG_HIGH,
+ 3, 1, 0, 1, 1, 15, 4, 0, 3
+ /* wbl, vpw, lcdac, wbf */
+};
+#define CONFIG_LCD_INFO_BELOW_LOGO
+#endif /* CONFIG_SHARP_LQ050Q5DR01 */
+/*----------------------------------------------------------------------*/
+
+#ifdef CONFIG_SHARP_LQ070Q5TR01
+/*
+ * Sharp LQ070Q5DR01 display. Active, color, single scan.
+ * !!! The actual screen size is only 480x240, but the HSYNC period has to
+ * be at least 680 pixels. The HSYNC period is given by 4 + vl_width + wbl.
+ * Changing wbl moves the picture on the screen. The only parameter to change
+ * is the screen width. Therefore we need a bitplane wider than the screen.
+ * The same holds for the VSYNC period. This is given byx VPW + WBF + vl_height.
+ * Changing VPW or WBF moves the picture up/down. Therefore we can only
+ * change vl_height. As a consequence the bitplane needs to be higher
+ * than the screen as well.
+ */
+
+vidinfo_t panel_info = {
+ 680, 246, 0, 0, CFG_HIGH, CFG_HIGH, CFG_HIGH, CFG_HIGH, CFG_HIGH,
+ 3, 0, 0, 1, 1, 7, 4, 0, 3
+ /* wbl, vpw, lcdac, wbf */
+};
+#define CONFIG_LCD_INFO_BELOW_LOGO
+#endif /* CONFIG_SHARP_LQ070Q5TR01 */
+/*----------------------------------------------------------------------*/
+
#ifdef CONFIG_SHARP_LQ057Q3DC02
/*
* Sharp LQ057Q3DC02 display. Active, color, single scan.
@@ -170,6 +279,7 @@ vidinfo_t panel_info = {
/* wbl, vpw, lcdac, wbf */
};
#endif /* CONFIG_SHARP_LQ64D341 */
+/*-----------------------------------------------------------------*/
#ifdef CONFIG_SHARP_LQ065T9DR51U
/*
@@ -396,6 +506,23 @@ void lcd_ctrl_init (void *lcdbase)
immr->im_ioport.iop_pddat |= 0x0200;
#endif
+/*
+ * Workaround for RRVision with 10" LCD Display. see issue26199.
+ * This Workaround works with the Displays SHARP LQ104V7DS01 and SHARP
+ * LQ104V1DG61
+ */
+#if defined(CONFIG_RRVISION) && (defined(CONFIG_SHARP_LQ104V7DS01) || \
+ defined(CONFIG_SHARP_LQ104V1DG61))
+ /* PDPAR Bit 6 - DD6 => 0 */
+ immr->im_ioport.iop_pdpar &= ~0x0200;
+
+ /* PDDIR Bit 6 - DR6 => 1 */
+ immr->im_ioport.iop_pddir |= 0x0200;
+
+ /* PDDAT Bit 6 - D6 => 0 */
+ immr->im_ioport.iop_pddat &= ~0x0200;
+#endif /* CONFIG_SHARP_LQ104V7DS01 */
+
/* Load the physical address of the linear frame buffer
* into the LCD controller.
* BIG NOTE: This has to be modified to load A and B depending
@@ -483,7 +610,6 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
/*----------------------------------------------------------------------*/
#if LCD_BPP == LCD_MONOCHROME
-static
void lcd_initcolregs (void)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
@@ -564,12 +690,10 @@ void lcd_enable (void)
#endif
#ifdef CONFIG_RRVISION
debug ("PC4->Output(1): enable LVDS\n");
- debug ("PC5->Output(0): disable PAL clock\n");
immr->im_ioport.iop_pddir |= 0x1000;
immr->im_ioport.iop_pcpar &= ~(0x0C00);
immr->im_ioport.iop_pcdir |= 0x0C00 ;
immr->im_ioport.iop_pcdat |= 0x0800 ;
- immr->im_ioport.iop_pcdat &= ~(0x0400);
debug ("PDPAR=0x%04X PDDIR=0x%04X PDDAT=0x%04X\n",
immr->im_ioport.iop_pdpar,
immr->im_ioport.iop_pddir,
diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
index 8bf8e46..5bbd693 100644
--- a/cpu/mpc8xx/video.c
+++ b/cpu/mpc8xx/video.c
@@ -68,6 +68,10 @@ DECLARE_GLOBAL_DATA_PTR;
#define VIDEO_INFO_X VIDEO_LOGO_WIDTH+8
#define VIDEO_INFO_Y 16
+#if defined(CONFIG_RRVISION) && defined(TTTECH_NO_SCREEN_INFO)
+#undef VIDEO_INFO
+#endif
+
/************************************************************************/
/* ** VIDEO ENCODER CONSTANTS */
/************************************************************************/
@@ -115,10 +119,15 @@ DECLARE_GLOBAL_DATA_PTR;
#define VIDEO_BURST_LEN (VIDEO_COLS/8)
#ifdef VIDEO_MODE_YUYV
+
+#if defined(CONFIG_RRVISION)
+#define VIDEO_BG_COL 0x80108010 /* Background color in YUYV format */
+#else
#define VIDEO_BG_COL 0x80D880D8 /* Background color in YUYV format */
+#endif /* CONFIG_RRVISION */
#else
#define VIDEO_BG_COL 0xF8F8F8F8 /* Background color in RGB format */
-#endif
+#endif /* VIDEO_MODE_YUYV */
/************************************************************************/
/* ** FONT AND LOGO DATA */
@@ -132,6 +141,14 @@ DECLARE_GLOBAL_DATA_PTR;
#define VIDEO_LOGO_WIDTH DEF_U_BOOT_LOGO_WIDTH
#define VIDEO_LOGO_HEIGHT DEF_U_BOOT_LOGO_HEIGHT
#define VIDEO_LOGO_ADDR &u_boot_logo
+
+#ifndef CONFIG_VIDEO_LOGO_X
+#define CONFIG_VIDEO_LOGO_X 0
+#endif
+#ifndef CONFIG_VIDEO_LOGO_Y
+#define CONFIG_VIDEO_LOGO_Y 0
+#endif
+
#endif
/************************************************************************/
@@ -1171,7 +1188,8 @@ static void *video_logo (void)
char info[80];
#endif /* VIDEO_INFO */
- easylogo_plot (VIDEO_LOGO_ADDR, screen, width, 0, 0);
+ easylogo_plot (VIDEO_LOGO_ADDR, screen, width, CONFIG_VIDEO_LOGO_X,
+ CONFIG_VIDEO_LOGO_Y);
#ifdef VIDEO_INFO
sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
--
1.5.4.3
---
Gary Jennejohn
next reply other threads:[~2008-06-23 14:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-23 14:54 Gary Jennejohn [this message]
2008-06-24 12:14 ` [U-Boot-Users] [PATCH] Modifications to video-related files for RRvision Rodolfo Giometti
2008-06-24 15:05 ` Gary Jennejohn
2008-06-24 19:59 ` Rodolfo Giometti
2008-06-27 16:49 ` Detlev Zundel
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=20080623165438.2bb5d337@peedub.jennejohn.org \
--to=gary.jennejohn@freenet.de \
--cc=u-boot@lists.denx.de \
/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 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.