Hi Caglar,

On Thu, Sep 02, 2010 at 02:11:17, Caglar Akyuz wrote:

[...]

> I think race is between irq_handler and fb_setcolreg. Registering irq_handler
> at the end of probe function solves the issue.(Patch is attached) I don't know
> da8xx lcd controller enough but one of your comments in the code says lcd
> raster controller should be disabled prior to any register update. So I think
> following sequence happens on my board:
>
> - raster controller is disabled
> - fb_setcolreg is called at boot time as you pointed out
> - irq fires-up, enables raster controller
> - fb_setcolreg calls lcd_blit which modifies LCD_RASTER_CTRL_REG while
>   raster controller is enabled
>
> printk delayed irq and the problem disappeared, registering irq at the end of
> probe function served the same purpose.

Do you plan to submit this patch upstream? Registering IRQ towards
the end of probe sounds like something which is useful in general
and (IMHO) should be easy to get upstream acceptance.

Thanks,
Sekhar

>
> > And, unfortunately, don't have a Hawkboard myself. If you or Roger
> > have a spare board I can take a more in-depth look but likely not until
> > beginning of Oct due to prior commits.
> >
>
> I never thought TIers would be in a short of development boards, I think
> I'm being harsh on my local TI representatives :)
>
> Thanks for all your help on this and for eventually pointing the source of
> the problem.
>
> Best Regards,
> Caglar
>
> ---
>
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 0ad6fe4..edb0616 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -1020,10 +1020,6 @@ static int __init fb_probe(struct platform_device 
> *device)
>               goto err_release_pl_mem;
>       }
>
> -     ret = request_irq(par->irq, lcdc_irq_handler, 0, DRIVER_NAME, par);
> -     if (ret)
> -             goto err_release_pl_mem;
> -
>       /* Initialize par */
>       da8xx_fb_info->var.bits_per_pixel = lcd_cfg->bpp;
>
> @@ -1051,7 +1047,7 @@ static int __init fb_probe(struct platform_device 
> *device)
>
>       ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
>       if (ret)
> -             goto err_free_irq;
> +             goto err_release_pl_mem;
>       da8xx_fb_info->cmap.len = par->palette_sz;
>
>       /* initialize var_screeninfo */
> @@ -1079,8 +1075,13 @@ static int __init fb_probe(struct platform_device 
> *device)
>               goto err_cpu_freq;
>       }
>  #endif
> +
> +     ret = request_irq(par->irq, lcdc_irq_handler, 0, DRIVER_NAME, par);
> +     if (ret)
> +             goto irq_freq;
>       return 0;
>
> +irq_freq:
>  #ifdef CONFIG_CPU_FREQ
>  err_cpu_freq:
>       unregister_framebuffer(da8xx_fb_info);
> @@ -1089,9 +1090,6 @@ err_cpu_freq:
>  err_dealloc_cmap:
>       fb_dealloc_cmap(&da8xx_fb_info->cmap);
>
> -err_free_irq:
> -     free_irq(par->irq, par);
> -
>  err_release_pl_mem:
>       dma_free_coherent(NULL, PALETTE_SIZE, par->v_palette_base,
>                         par->p_palette_base);
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>

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

Reply via email to