mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: lxfb: Maintain video processor palette through suspend/resume video: da8xx: Register IRQ as last thing in driver probing. framebuffer: fix fbcmap.c kernel-doc warning
This commit is contained in:
commit
47337ad65f
4 changed files with 25 additions and 14 deletions
|
@ -1029,10 +1029,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;
|
||||
|
||||
|
@ -1060,7 +1056,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 */
|
||||
|
@ -1088,8 +1084,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);
|
||||
|
@ -1098,9 +1099,6 @@ static int __init fb_probe(struct platform_device *device)
|
|||
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);
|
||||
|
|
|
@ -80,6 +80,7 @@ static const struct fb_cmap default_16_colors = {
|
|||
* @cmap: frame buffer colormap structure
|
||||
* @len: length of @cmap
|
||||
* @transp: boolean, 1 if there is transparency, 0 otherwise
|
||||
* @flags: flags for kmalloc memory allocation
|
||||
*
|
||||
* Allocates memory for a colormap @cmap. @len is the
|
||||
* number of entries in the palette.
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define DC_HFILT_COUNT 0x100
|
||||
#define DC_VFILT_COUNT 0x100
|
||||
#define VP_COEFF_SIZE 0x1000
|
||||
#define VP_PAL_COUNT 0x100
|
||||
|
||||
#define OUTPUT_CRT 0x01
|
||||
#define OUTPUT_PANEL 0x02
|
||||
|
@ -48,7 +49,8 @@ struct lxfb_par {
|
|||
uint64_t vp[VP_REG_COUNT];
|
||||
uint64_t fp[FP_REG_COUNT];
|
||||
|
||||
uint32_t pal[DC_PAL_COUNT];
|
||||
uint32_t dc_pal[DC_PAL_COUNT];
|
||||
uint32_t vp_pal[VP_PAL_COUNT];
|
||||
uint32_t hcoeff[DC_HFILT_COUNT * 2];
|
||||
uint32_t vcoeff[DC_VFILT_COUNT];
|
||||
uint32_t vp_coeff[VP_COEFF_SIZE / 4];
|
||||
|
|
|
@ -610,10 +610,15 @@ static void lx_save_regs(struct lxfb_par *par)
|
|||
memcpy(par->vp, par->vp_regs, sizeof(par->vp));
|
||||
memcpy(par->fp, par->vp_regs + VP_FP_START, sizeof(par->fp));
|
||||
|
||||
/* save the palette */
|
||||
/* save the display controller palette */
|
||||
write_dc(par, DC_PAL_ADDRESS, 0);
|
||||
for (i = 0; i < ARRAY_SIZE(par->pal); i++)
|
||||
par->pal[i] = read_dc(par, DC_PAL_DATA);
|
||||
for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++)
|
||||
par->dc_pal[i] = read_dc(par, DC_PAL_DATA);
|
||||
|
||||
/* save the video processor palette */
|
||||
write_vp(par, VP_PAR, 0);
|
||||
for (i = 0; i < ARRAY_SIZE(par->vp_pal); i++)
|
||||
par->vp_pal[i] = read_vp(par, VP_PDR);
|
||||
|
||||
/* save the horizontal filter coefficients */
|
||||
filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL;
|
||||
|
@ -706,8 +711,8 @@ static void lx_restore_display_ctlr(struct lxfb_par *par)
|
|||
|
||||
/* restore the palette */
|
||||
write_dc(par, DC_PAL_ADDRESS, 0);
|
||||
for (i = 0; i < ARRAY_SIZE(par->pal); i++)
|
||||
write_dc(par, DC_PAL_DATA, par->pal[i]);
|
||||
for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++)
|
||||
write_dc(par, DC_PAL_DATA, par->dc_pal[i]);
|
||||
|
||||
/* restore the horizontal filter coefficients */
|
||||
filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL;
|
||||
|
@ -751,6 +756,11 @@ static void lx_restore_video_proc(struct lxfb_par *par)
|
|||
}
|
||||
}
|
||||
|
||||
/* restore video processor palette */
|
||||
write_vp(par, VP_PAR, 0);
|
||||
for (i = 0; i < ARRAY_SIZE(par->vp_pal); i++)
|
||||
write_vp(par, VP_PDR, par->vp_pal[i]);
|
||||
|
||||
/* restore video coeff ram */
|
||||
memcpy(par->vp_regs + VP_VCR, par->vp_coeff, sizeof(par->vp_coeff));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue