aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/pxafb.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 1820c4a24434..33a6aacfcbe3 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -80,7 +80,8 @@
80static int pxafb_activate_var(struct fb_var_screeninfo *var, 80static int pxafb_activate_var(struct fb_var_screeninfo *var,
81 struct pxafb_info *); 81 struct pxafb_info *);
82static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); 82static void set_ctrlr_state(struct pxafb_info *fbi, u_int state);
83static void setup_base_frame(struct pxafb_info *fbi, int branch); 83static void setup_base_frame(struct pxafb_info *fbi,
84 struct fb_var_screeninfo *var, int branch);
84static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, 85static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal,
85 unsigned long offset, size_t size); 86 unsigned long offset, size_t size);
86 87
@@ -531,12 +532,22 @@ static int pxafb_pan_display(struct fb_var_screeninfo *var,
531 struct fb_info *info) 532 struct fb_info *info)
532{ 533{
533 struct pxafb_info *fbi = (struct pxafb_info *)info; 534 struct pxafb_info *fbi = (struct pxafb_info *)info;
535 struct fb_var_screeninfo newvar;
534 int dma = DMA_MAX + DMA_BASE; 536 int dma = DMA_MAX + DMA_BASE;
535 537
536 if (fbi->state != C_ENABLE) 538 if (fbi->state != C_ENABLE)
537 return 0; 539 return 0;
538 540
539 setup_base_frame(fbi, 1); 541 /* Only take .xoffset, .yoffset and .vmode & FB_VMODE_YWRAP from what
542 * was passed in and copy the rest from the old screeninfo.
543 */
544 memcpy(&newvar, &fbi->fb.var, sizeof(newvar));
545 newvar.xoffset = var->xoffset;
546 newvar.yoffset = var->yoffset;
547 newvar.vmode &= ~FB_VMODE_YWRAP;
548 newvar.vmode |= var->vmode & FB_VMODE_YWRAP;
549
550 setup_base_frame(fbi, &newvar, 1);
540 551
541 if (fbi->lccr0 & LCCR0_SDS) 552 if (fbi->lccr0 & LCCR0_SDS)
542 lcd_writel(fbi, FBR1, fbi->fdadr[dma + 1] | 0x1); 553 lcd_writel(fbi, FBR1, fbi->fdadr[dma + 1] | 0x1);
@@ -1052,9 +1063,10 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal,
1052 return 0; 1063 return 0;
1053} 1064}
1054 1065
1055static void setup_base_frame(struct pxafb_info *fbi, int branch) 1066static void setup_base_frame(struct pxafb_info *fbi,
1067 struct fb_var_screeninfo *var,
1068 int branch)
1056{ 1069{
1057 struct fb_var_screeninfo *var = &fbi->fb.var;
1058 struct fb_fix_screeninfo *fix = &fbi->fb.fix; 1070 struct fb_fix_screeninfo *fix = &fbi->fb.fix;
1059 int nbytes, dma, pal, bpp = var->bits_per_pixel; 1071 int nbytes, dma, pal, bpp = var->bits_per_pixel;
1060 unsigned long offset; 1072 unsigned long offset;
@@ -1332,7 +1344,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var,
1332#endif 1344#endif
1333 setup_parallel_timing(fbi, var); 1345 setup_parallel_timing(fbi, var);
1334 1346
1335 setup_base_frame(fbi, 0); 1347 setup_base_frame(fbi, var, 0);
1336 1348
1337 fbi->reg_lccr0 = fbi->lccr0 | 1349 fbi->reg_lccr0 = fbi->lccr0 |
1338 (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | 1350 (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM |