diff options
-rw-r--r-- | drivers/video/geode/lxfb.h | 4 | ||||
-rw-r--r-- | drivers/video/geode/lxfb_ops.c | 20 |
2 files changed, 18 insertions, 6 deletions
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index e4c4d89b7860..be8ccb47ebe0 100644 --- a/drivers/video/geode/lxfb.h +++ b/drivers/video/geode/lxfb.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define DC_HFILT_COUNT 0x100 | 22 | #define DC_HFILT_COUNT 0x100 |
23 | #define DC_VFILT_COUNT 0x100 | 23 | #define DC_VFILT_COUNT 0x100 |
24 | #define VP_COEFF_SIZE 0x1000 | 24 | #define VP_COEFF_SIZE 0x1000 |
25 | #define VP_PAL_COUNT 0x100 | ||
25 | 26 | ||
26 | #define OUTPUT_CRT 0x01 | 27 | #define OUTPUT_CRT 0x01 |
27 | #define OUTPUT_PANEL 0x02 | 28 | #define OUTPUT_PANEL 0x02 |
@@ -48,7 +49,8 @@ struct lxfb_par { | |||
48 | uint64_t vp[VP_REG_COUNT]; | 49 | uint64_t vp[VP_REG_COUNT]; |
49 | uint64_t fp[FP_REG_COUNT]; | 50 | uint64_t fp[FP_REG_COUNT]; |
50 | 51 | ||
51 | uint32_t pal[DC_PAL_COUNT]; | 52 | uint32_t dc_pal[DC_PAL_COUNT]; |
53 | uint32_t vp_pal[VP_PAL_COUNT]; | ||
52 | uint32_t hcoeff[DC_HFILT_COUNT * 2]; | 54 | uint32_t hcoeff[DC_HFILT_COUNT * 2]; |
53 | uint32_t vcoeff[DC_VFILT_COUNT]; | 55 | uint32_t vcoeff[DC_VFILT_COUNT]; |
54 | uint32_t vp_coeff[VP_COEFF_SIZE / 4]; | 56 | uint32_t vp_coeff[VP_COEFF_SIZE / 4]; |
diff --git a/drivers/video/geode/lxfb_ops.c b/drivers/video/geode/lxfb_ops.c index 85ec7f64c42a..79e9abc72b83 100644 --- a/drivers/video/geode/lxfb_ops.c +++ b/drivers/video/geode/lxfb_ops.c | |||
@@ -610,10 +610,15 @@ static void lx_save_regs(struct lxfb_par *par) | |||
610 | memcpy(par->vp, par->vp_regs, sizeof(par->vp)); | 610 | memcpy(par->vp, par->vp_regs, sizeof(par->vp)); |
611 | memcpy(par->fp, par->vp_regs + VP_FP_START, sizeof(par->fp)); | 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 | write_dc(par, DC_PAL_ADDRESS, 0); | 614 | write_dc(par, DC_PAL_ADDRESS, 0); |
615 | for (i = 0; i < ARRAY_SIZE(par->pal); i++) | 615 | for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++) |
616 | par->pal[i] = read_dc(par, DC_PAL_DATA); | 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 | /* save the horizontal filter coefficients */ | 623 | /* save the horizontal filter coefficients */ |
619 | filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL; | 624 | 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) | |||
706 | 711 | ||
707 | /* restore the palette */ | 712 | /* restore the palette */ |
708 | write_dc(par, DC_PAL_ADDRESS, 0); | 713 | write_dc(par, DC_PAL_ADDRESS, 0); |
709 | for (i = 0; i < ARRAY_SIZE(par->pal); i++) | 714 | for (i = 0; i < ARRAY_SIZE(par->dc_pal); i++) |
710 | write_dc(par, DC_PAL_DATA, par->pal[i]); | 715 | write_dc(par, DC_PAL_DATA, par->dc_pal[i]); |
711 | 716 | ||
712 | /* restore the horizontal filter coefficients */ | 717 | /* restore the horizontal filter coefficients */ |
713 | filt = par->dc[DC_IRQ_FILT_CTL] | DC_IRQ_FILT_CTL_H_FILT_SEL; | 718 | 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) | |||
751 | } | 756 | } |
752 | } | 757 | } |
753 | 758 | ||
759 | /* restore video processor palette */ | ||
760 | write_vp(par, VP_PAR, 0); | ||
761 | for (i = 0; i < ARRAY_SIZE(par->vp_pal); i++) | ||
762 | write_vp(par, VP_PDR, par->vp_pal[i]); | ||
763 | |||
754 | /* restore video coeff ram */ | 764 | /* restore video coeff ram */ |
755 | memcpy(par->vp_regs + VP_VCR, par->vp_coeff, sizeof(par->vp_coeff)); | 765 | memcpy(par->vp_regs + VP_VCR, par->vp_coeff, sizeof(par->vp_coeff)); |
756 | } | 766 | } |