* [PATCH] video:da8xx-fb: Disable and reset sequence on version2 of LCDC
@ 2011-11-15 12:14 Manjunathappa, Prakash
2011-11-23 6:51 ` [PATCH] video:da8xx-fb: Disable and reset sequence on version2 Florian Tobias Schandinat
0 siblings, 1 reply; 2+ messages in thread
From: Manjunathappa, Prakash @ 2011-11-15 12:14 UTC (permalink / raw)
To: linux-fbdev
Patch follows the disable and software reset sequence specified
in version2 to LCDC functional specification.
Without this flicker is observed on re-enabling the LCDC.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
drivers/video/da8xx-fb.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index e111971..6b27751 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -118,6 +118,7 @@
/* Clock registers available only on Version 2 */
#define LCD_CLK_ENABLE_REG 0x6c
#define LCD_CLK_RESET_REG 0x70
+#define LCD_CLK_MAIN_RESET BIT(3)
#define LCD_NUM_BUFFERS 2
@@ -246,6 +247,10 @@ static inline void lcd_enable_raster(void)
{
u32 reg;
+ /* Bring LCDC out of reset */
+ if (lcd_revision = LCD_VERSION_2)
+ lcdc_write(0, LCD_CLK_RESET_REG);
+
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (!(reg & LCD_RASTER_ENABLE))
lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
@@ -259,6 +264,10 @@ static inline void lcd_disable_raster(void)
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (reg & LCD_RASTER_ENABLE)
lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
+
+ if (lcd_revision = LCD_VERSION_2)
+ /* Write 1 to reset LCDC */
+ lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
}
static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
@@ -618,8 +627,12 @@ static void lcd_reset(struct da8xx_fb_par *par)
lcdc_write(0, LCD_DMA_CTRL_REG);
lcdc_write(0, LCD_RASTER_CTRL_REG);
- if (lcd_revision = LCD_VERSION_2)
+ if (lcd_revision = LCD_VERSION_2) {
lcdc_write(0, LCD_INT_ENABLE_SET_REG);
+ /* Write 1 to reset */
+ lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
+ lcdc_write(0, LCD_CLK_RESET_REG);
+ }
}
static void lcd_calc_clk_divider(struct da8xx_fb_par *par)
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] video:da8xx-fb: Disable and reset sequence on version2
2011-11-15 12:14 [PATCH] video:da8xx-fb: Disable and reset sequence on version2 of LCDC Manjunathappa, Prakash
@ 2011-11-23 6:51 ` Florian Tobias Schandinat
0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2011-11-23 6:51 UTC (permalink / raw)
To: linux-fbdev
On 11/15/2011 12:02 PM, Manjunathappa, Prakash wrote:
> Patch follows the disable and software reset sequence specified
> in version2 to LCDC functional specification.
> Without this flicker is observed on re-enabling the LCDC.
>
> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Applied.
Thanks,
Florian Tobias Schandinat
> ---
> drivers/video/da8xx-fb.c | 15 ++++++++++++++-
> 1 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index e111971..6b27751 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -118,6 +118,7 @@
> /* Clock registers available only on Version 2 */
> #define LCD_CLK_ENABLE_REG 0x6c
> #define LCD_CLK_RESET_REG 0x70
> +#define LCD_CLK_MAIN_RESET BIT(3)
>
> #define LCD_NUM_BUFFERS 2
>
> @@ -246,6 +247,10 @@ static inline void lcd_enable_raster(void)
> {
> u32 reg;
>
> + /* Bring LCDC out of reset */
> + if (lcd_revision = LCD_VERSION_2)
> + lcdc_write(0, LCD_CLK_RESET_REG);
> +
> reg = lcdc_read(LCD_RASTER_CTRL_REG);
> if (!(reg & LCD_RASTER_ENABLE))
> lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
> @@ -259,6 +264,10 @@ static inline void lcd_disable_raster(void)
> reg = lcdc_read(LCD_RASTER_CTRL_REG);
> if (reg & LCD_RASTER_ENABLE)
> lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
> +
> + if (lcd_revision = LCD_VERSION_2)
> + /* Write 1 to reset LCDC */
> + lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
> }
>
> static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
> @@ -618,8 +627,12 @@ static void lcd_reset(struct da8xx_fb_par *par)
> lcdc_write(0, LCD_DMA_CTRL_REG);
> lcdc_write(0, LCD_RASTER_CTRL_REG);
>
> - if (lcd_revision = LCD_VERSION_2)
> + if (lcd_revision = LCD_VERSION_2) {
> lcdc_write(0, LCD_INT_ENABLE_SET_REG);
> + /* Write 1 to reset */
> + lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
> + lcdc_write(0, LCD_CLK_RESET_REG);
> + }
> }
>
> static void lcd_calc_clk_divider(struct da8xx_fb_par *par)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-23 6:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 12:14 [PATCH] video:da8xx-fb: Disable and reset sequence on version2 of LCDC Manjunathappa, Prakash
2011-11-23 6:51 ` [PATCH] video:da8xx-fb: Disable and reset sequence on version2 Florian Tobias Schandinat
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.