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

+25 -14
+6 -8
drivers/video/da8xx-fb.c
··· 1029 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 1032 /* Initialize par */ 1037 1033 da8xx_fb_info->var.bits_per_pixel = lcd_cfg->bpp; 1038 1034 ··· 1056 1060 1057 1061 ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0); 1058 1062 if (ret) 1059 - goto err_free_irq; 1063 + goto err_release_pl_mem; 1060 1064 da8xx_fb_info->cmap.len = par->palette_sz; 1061 1065 1062 1066 /* initialize var_screeninfo */ ··· 1084 1088 goto err_cpu_freq; 1085 1089 } 1086 1090 #endif 1091 + 1092 + ret = request_irq(par->irq, lcdc_irq_handler, 0, DRIVER_NAME, par); 1093 + if (ret) 1094 + goto irq_freq; 1087 1095 return 0; 1088 1096 1097 + irq_freq: 1089 1098 #ifdef CONFIG_CPU_FREQ 1090 1099 err_cpu_freq: 1091 1100 unregister_framebuffer(da8xx_fb_info); ··· 1098 1097 1099 1098 err_dealloc_cmap: 1100 1099 fb_dealloc_cmap(&da8xx_fb_info->cmap); 1101 - 1102 - err_free_irq: 1103 - free_irq(par->irq, par); 1104 1100 1105 1101 err_release_pl_mem: 1106 1102 dma_free_coherent(NULL, PALETTE_SIZE, par->v_palette_base,
+1
drivers/video/fbcmap.c
··· 80 80 * @cmap: frame buffer colormap structure 81 81 * @len: length of @cmap 82 82 * @transp: boolean, 1 if there is transparency, 0 otherwise 83 + * @flags: flags for kmalloc memory allocation 83 84 * 84 85 * Allocates memory for a colormap @cmap. @len is the 85 86 * number of entries in the palette.
+3 -1
drivers/video/geode/lxfb.h
··· 22 22 #define DC_HFILT_COUNT 0x100 23 23 #define DC_VFILT_COUNT 0x100 24 24 #define VP_COEFF_SIZE 0x1000 25 + #define VP_PAL_COUNT 0x100 25 26 26 27 #define OUTPUT_CRT 0x01 27 28 #define OUTPUT_PANEL 0x02 ··· 49 48 uint64_t vp[VP_REG_COUNT]; 50 49 uint64_t fp[FP_REG_COUNT]; 51 50 52 - uint32_t pal[DC_PAL_COUNT]; 51 + uint32_t dc_pal[DC_PAL_COUNT]; 52 + uint32_t vp_pal[VP_PAL_COUNT]; 53 53 uint32_t hcoeff[DC_HFILT_COUNT * 2]; 54 54 uint32_t vcoeff[DC_VFILT_COUNT]; 55 55 uint32_t vp_coeff[VP_COEFF_SIZE / 4];
+15 -5
drivers/video/geode/lxfb_ops.c
··· 610 610 memcpy(par->vp, par->vp_regs, sizeof(par->vp)); 611 611 memcpy(par->fp, par->vp_regs + VP_FP_START, sizeof(par->fp)); 612 612 613 - /* save the palette */ 613 + /* save the display controller palette */ 614 614 write_dc(par, DC_PAL_ADDRESS, 0); 615 - for (i = 0; i < ARRAY_SIZE(par->pal); i++) 616 - par->pal[i] = read_dc(par, DC_PAL_DATA); 615 + for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++) 616 + par->dc_pal[i] = read_dc(par, DC_PAL_DATA); 617 + 618 + /* save the video processor palette */ 619 + write_vp(par, VP_PAR, 0); 620 + for (i = 0; i < ARRAY_SIZE(par->vp_pal); i++) 621 + par->vp_pal[i] = read_vp(par, VP_PDR); 617 622 618 623 /* save the horizontal filter coefficients */ 619 624 filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL; ··· 711 706 712 707 /* restore the palette */ 713 708 write_dc(par, DC_PAL_ADDRESS, 0); 714 - for (i = 0; i < ARRAY_SIZE(par->pal); i++) 715 - write_dc(par, DC_PAL_DATA, par->pal[i]); 709 + for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++) 710 + write_dc(par, DC_PAL_DATA, par->dc_pal[i]); 716 711 717 712 /* restore the horizontal filter coefficients */ 718 713 filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL; ··· 755 750 write_vp(par, i, par->vp[i]); 756 751 } 757 752 } 753 + 754 + /* restore video processor palette */ 755 + write_vp(par, VP_PAR, 0); 756 + for (i = 0; i < ARRAY_SIZE(par->vp_pal); i++) 757 + write_vp(par, VP_PDR, par->vp_pal[i]); 758 758 759 759 /* restore video coeff ram */ 760 760 memcpy(par->vp_regs + VP_VCR, par->vp_coeff, sizeof(par->vp_coeff));