diff options
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r-- | drivers/video/pxafb.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 1820c4a24434..f58a3aae6ea6 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -80,7 +80,8 @@ | |||
80 | static int pxafb_activate_var(struct fb_var_screeninfo *var, | 80 | static int pxafb_activate_var(struct fb_var_screeninfo *var, |
81 | struct pxafb_info *); | 81 | struct pxafb_info *); |
82 | static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); | 82 | static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); |
83 | static void setup_base_frame(struct pxafb_info *fbi, int branch); | 83 | static void setup_base_frame(struct pxafb_info *fbi, |
84 | struct fb_var_screeninfo *var, int branch); | ||
84 | static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | 85 | static 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 | ||
@@ -397,6 +398,7 @@ static void pxafb_setmode(struct fb_var_screeninfo *var, | |||
397 | var->lower_margin = mode->lower_margin; | 398 | var->lower_margin = mode->lower_margin; |
398 | var->sync = mode->sync; | 399 | var->sync = mode->sync; |
399 | var->grayscale = mode->cmap_greyscale; | 400 | var->grayscale = mode->cmap_greyscale; |
401 | var->transp.length = mode->transparency; | ||
400 | 402 | ||
401 | /* set the initial RGBA bitfields */ | 403 | /* set the initial RGBA bitfields */ |
402 | pxafb_set_pixfmt(var, mode->depth); | 404 | pxafb_set_pixfmt(var, mode->depth); |
@@ -531,12 +533,22 @@ static int pxafb_pan_display(struct fb_var_screeninfo *var, | |||
531 | struct fb_info *info) | 533 | struct fb_info *info) |
532 | { | 534 | { |
533 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 535 | struct pxafb_info *fbi = (struct pxafb_info *)info; |
536 | struct fb_var_screeninfo newvar; | ||
534 | int dma = DMA_MAX + DMA_BASE; | 537 | int dma = DMA_MAX + DMA_BASE; |
535 | 538 | ||
536 | if (fbi->state != C_ENABLE) | 539 | if (fbi->state != C_ENABLE) |
537 | return 0; | 540 | return 0; |
538 | 541 | ||
539 | setup_base_frame(fbi, 1); | 542 | /* Only take .xoffset, .yoffset and .vmode & FB_VMODE_YWRAP from what |
543 | * was passed in and copy the rest from the old screeninfo. | ||
544 | */ | ||
545 | memcpy(&newvar, &fbi->fb.var, sizeof(newvar)); | ||
546 | newvar.xoffset = var->xoffset; | ||
547 | newvar.yoffset = var->yoffset; | ||
548 | newvar.vmode &= ~FB_VMODE_YWRAP; | ||
549 | newvar.vmode |= var->vmode & FB_VMODE_YWRAP; | ||
550 | |||
551 | setup_base_frame(fbi, &newvar, 1); | ||
540 | 552 | ||
541 | if (fbi->lccr0 & LCCR0_SDS) | 553 | if (fbi->lccr0 & LCCR0_SDS) |
542 | lcd_writel(fbi, FBR1, fbi->fdadr[dma + 1] | 0x1); | 554 | lcd_writel(fbi, FBR1, fbi->fdadr[dma + 1] | 0x1); |
@@ -1052,9 +1064,10 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | |||
1052 | return 0; | 1064 | return 0; |
1053 | } | 1065 | } |
1054 | 1066 | ||
1055 | static void setup_base_frame(struct pxafb_info *fbi, int branch) | 1067 | static void setup_base_frame(struct pxafb_info *fbi, |
1068 | struct fb_var_screeninfo *var, | ||
1069 | int branch) | ||
1056 | { | 1070 | { |
1057 | struct fb_var_screeninfo *var = &fbi->fb.var; | ||
1058 | struct fb_fix_screeninfo *fix = &fbi->fb.fix; | 1071 | struct fb_fix_screeninfo *fix = &fbi->fb.fix; |
1059 | int nbytes, dma, pal, bpp = var->bits_per_pixel; | 1072 | int nbytes, dma, pal, bpp = var->bits_per_pixel; |
1060 | unsigned long offset; | 1073 | unsigned long offset; |
@@ -1332,7 +1345,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, | |||
1332 | #endif | 1345 | #endif |
1333 | setup_parallel_timing(fbi, var); | 1346 | setup_parallel_timing(fbi, var); |
1334 | 1347 | ||
1335 | setup_base_frame(fbi, 0); | 1348 | setup_base_frame(fbi, var, 0); |
1336 | 1349 | ||
1337 | fbi->reg_lccr0 = fbi->lccr0 | | 1350 | fbi->reg_lccr0 = fbi->lccr0 | |
1338 | (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | | 1351 | (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | |