diff options
author | Caglar Akyuz <caglar@bilkon-kontrol.com.tr> | 2010-11-30 15:04:14 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-12-01 04:18:52 -0500 |
commit | 93c176f39fedaeff854ccb7681d626d65bdffe52 (patch) | |
tree | 71beb067554e1cd0a73d3e92c0baead2e1b5b579 /drivers/video | |
parent | 22a95949d03548cb346d81d71ce6c64dc273f421 (diff) |
video: da8xx: Register IRQ as last thing in driver probing.
Following commit exposed a bug in driver:
"fbdev: da8xx/omap-l1xx: implement double buffering"
Bug is, if interrupt handler is called before initialization is
finished, raster controller is enabled and following register
modifications causes hardware to stay in a broken state.
By looking at this one may say that proper locking is missing in
this driver, and a more proper fix should be prepared. However,
aformentioned commit causes a regression in the driver and some
fix to current one should be applied first.
Signed-off-by: Caglar Akyuz <caglar@bilkon-kontrol.com.tr>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/da8xx-fb.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index cad7d45c8bac..c265aed09e04 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c | |||
@@ -1029,10 +1029,6 @@ static int __init fb_probe(struct platform_device *device) | |||
1029 | goto err_release_pl_mem; | 1029 | goto err_release_pl_mem; |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | ret = request_irq(par->irq, lcdc_irq_handler, 0, DRIVER_NAME, par); | ||
1033 | if (ret) | ||
1034 | goto err_release_pl_mem; | ||
1035 | |||
1036 | /* Initialize par */ | 1032 | /* Initialize par */ |
1037 | da8xx_fb_info->var.bits_per_pixel = lcd_cfg->bpp; | 1033 | da8xx_fb_info->var.bits_per_pixel = lcd_cfg->bpp; |
1038 | 1034 | ||
@@ -1060,7 +1056,7 @@ static int __init fb_probe(struct platform_device *device) | |||
1060 | 1056 | ||
1061 | ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0); | 1057 | ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0); |
1062 | if (ret) | 1058 | if (ret) |
1063 | goto err_free_irq; | 1059 | goto err_release_pl_mem; |
1064 | da8xx_fb_info->cmap.len = par->palette_sz; | 1060 | da8xx_fb_info->cmap.len = par->palette_sz; |
1065 | 1061 | ||
1066 | /* initialize var_screeninfo */ | 1062 | /* initialize var_screeninfo */ |
@@ -1088,8 +1084,13 @@ static int __init fb_probe(struct platform_device *device) | |||
1088 | goto err_cpu_freq; | 1084 | goto err_cpu_freq; |
1089 | } | 1085 | } |
1090 | #endif | 1086 | #endif |
1087 | |||
1088 | ret = request_irq(par->irq, lcdc_irq_handler, 0, DRIVER_NAME, par); | ||
1089 | if (ret) | ||
1090 | goto irq_freq; | ||
1091 | return 0; | 1091 | return 0; |
1092 | 1092 | ||
1093 | irq_freq: | ||
1093 | #ifdef CONFIG_CPU_FREQ | 1094 | #ifdef CONFIG_CPU_FREQ |
1094 | err_cpu_freq: | 1095 | err_cpu_freq: |
1095 | unregister_framebuffer(da8xx_fb_info); | 1096 | unregister_framebuffer(da8xx_fb_info); |
@@ -1098,9 +1099,6 @@ err_cpu_freq: | |||
1098 | err_dealloc_cmap: | 1099 | err_dealloc_cmap: |
1099 | fb_dealloc_cmap(&da8xx_fb_info->cmap); | 1100 | fb_dealloc_cmap(&da8xx_fb_info->cmap); |
1100 | 1101 | ||
1101 | err_free_irq: | ||
1102 | free_irq(par->irq, par); | ||
1103 | |||
1104 | err_release_pl_mem: | 1102 | err_release_pl_mem: |
1105 | dma_free_coherent(NULL, PALETTE_SIZE, par->v_palette_base, | 1103 | dma_free_coherent(NULL, PALETTE_SIZE, par->v_palette_base, |
1106 | par->p_palette_base); | 1104 | par->p_palette_base); |