Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222882
b: refs/heads/master
c: 16cdd43
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Drake authored and Paul Mundt committed Dec 1, 2010
1 parent abff7cf commit 343591e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93c176f39fedaeff854ccb7681d626d65bdffe52
refs/heads/master: 16cdd4336fdca9b50f991b591005b5f6416f82c4
4 changes: 3 additions & 1 deletion trunk/drivers/video/geode/lxfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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];
Expand Down
20 changes: 15 additions & 5 deletions trunk/drivers/video/geode/lxfb_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 343591e

Please sign in to comment.