On Wednesday 01 September 2010 09:30:53 pm Ambrose, Martin wrote:
> On Wed, Sep 01, 2010 at 11:57:32, Caglar Akyuz wrote:
> > Forget add LCDC register values:
> >
> > not working:
> > *** 4: 0x601 ***
> > *** 8: 0x4 ***
> > *** 40: 0x2ff0c1 ***
> > *** 44: 0x3030fe70 ***
> > *** 48: 0x1f0b05df ***
> > *** 52: 0x270ff00 ***
> > *** 64: 0x45 ***
> > *** 68: 0xc7a00000 ***
> > *** 72: 0xc7a95ffc ***
> > *** 76: 0xc7a00000 ***
> > *** 80: 0xc7a95ffc ***
> >
> > working:
> > *** 4: 0x601 ***
> > *** 8: 0x145 ***
> > *** 40: 0xff0c1 ***
> > *** 44: 0x3030fe70 ***
> > *** 48: 0x1f0b05df ***
> > *** 52: 0x270ff00 ***
> > *** 64: 0x40 ***
> > *** 68: 0xc7a00fe0 ***
> > *** 72: 0xc7a96ffc ***
> 
> If I am interpreting the above correctly then "*** 8" corresponds to
>  LCD_STAT. 

Correct.

>  In the working case bit 6 is set indicating the palette has been
>  loaded whereas this is not set in the failure case.
>
> This was definitely an area of change in the double buffer patch. Prior the
> palette was loaded explicitly in the fb_probe function. In the double
>  buffer case this is loaded by the setcolreg function. Normally this is
>  called during kernel boot (I think) when the display is configured for the
>  boot logo.
> 
> If it is not then I believe you can force a call through a user space ioctl
>  but I'm not sure what that is atm.
> 
> Now if could be that the palette is being loaded but then there is an error
> afterwards. Can you add a debug print to the lcd_blit function to see if
> it is being called with LOAD_PALETTE?
>

It seems like there is a race in the driver. Attached patch makes the 
problem go away. Any ideas for a proper fix?

Thanks for the help,
Caglar

---

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 309269f..ffc2f43 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -246,6 +246,7 @@ static void lcd_blit(int load_mode, struct da8xx_fb_par 
*par)
                lcdc_write(start, LCD_DMA_FRM_BUF_BASE_ADDR_1_REG);
                lcdc_write(end, LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
        } else if (load_mode == LOAD_PALETTE) {
+         printk("*** %s: LOAD_PALETTE ***\n", __func__);
                start    = par->p_palette_base;
                end      = start + par->palette_sz - 1;

 
> Regards,
> Martin
> 
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to