diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 12:34:16 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-04 12:34:16 -0500 |
commit | 4567c4a89693416ccca02d32109bce967e9c1ade (patch) | |
tree | 9d77cf02ce269ed5fc4b6e2ebddb9ad7fd504ad1 /drivers/video | |
parent | 602fd7c36728a04e61a442c9755e7d454501266c (diff) | |
parent | 19d6c13b56a78b3757e747f469285c2a546d634a (diff) |
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/da903x_bl.c | 7 | ||||
-rw-r--r-- | drivers/video/backlight/tdo24m.c | 1 | ||||
-rw-r--r-- | drivers/video/pxa168fb.c | 1 | ||||
-rw-r--r-- | drivers/video/pxafb.c | 23 |
4 files changed, 27 insertions, 5 deletions
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 701a1081e199..7fcb0eb54c60 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define DA9034_WLED_CONTROL1 0x3C | 26 | #define DA9034_WLED_CONTROL1 0x3C |
27 | #define DA9034_WLED_CONTROL2 0x3D | 27 | #define DA9034_WLED_CONTROL2 0x3D |
28 | #define DA9034_WLED_ISET(x) ((x) & 0x1f) | ||
28 | 29 | ||
29 | #define DA9034_WLED_BOOST_EN (1 << 5) | 30 | #define DA9034_WLED_BOOST_EN (1 << 5) |
30 | 31 | ||
@@ -101,6 +102,7 @@ static struct backlight_ops da903x_backlight_ops = { | |||
101 | 102 | ||
102 | static int da903x_backlight_probe(struct platform_device *pdev) | 103 | static int da903x_backlight_probe(struct platform_device *pdev) |
103 | { | 104 | { |
105 | struct da9034_backlight_pdata *pdata = pdev->dev.platform_data; | ||
104 | struct da903x_backlight_data *data; | 106 | struct da903x_backlight_data *data; |
105 | struct backlight_device *bl; | 107 | struct backlight_device *bl; |
106 | int max_brightness; | 108 | int max_brightness; |
@@ -127,6 +129,11 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
127 | data->da903x_dev = pdev->dev.parent; | 129 | data->da903x_dev = pdev->dev.parent; |
128 | data->current_brightness = 0; | 130 | data->current_brightness = 0; |
129 | 131 | ||
132 | /* adjust the WLED output current */ | ||
133 | if (pdata) | ||
134 | da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2, | ||
135 | DA9034_WLED_ISET(pdata->output_current)); | ||
136 | |||
130 | bl = backlight_device_register(pdev->name, data->da903x_dev, | 137 | bl = backlight_device_register(pdev->name, data->da903x_dev, |
131 | data, &da903x_backlight_ops); | 138 | data, &da903x_backlight_ops); |
132 | if (IS_ERR(bl)) { | 139 | if (IS_ERR(bl)) { |
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index bbfb502add67..4a3d46e08016 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c | |||
@@ -367,6 +367,7 @@ static int __devinit tdo24m_probe(struct spi_device *spi) | |||
367 | 367 | ||
368 | spi_message_init(m); | 368 | spi_message_init(m); |
369 | 369 | ||
370 | x->cs_change = 1; | ||
370 | x->tx_buf = &lcd->buf[0]; | 371 | x->tx_buf = &lcd->buf[0]; |
371 | spi_message_add_tail(x, m); | 372 | spi_message_add_tail(x, m); |
372 | 373 | ||
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index 84d8327e47db..75285d3f393c 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
@@ -687,6 +687,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev) | |||
687 | } | 687 | } |
688 | 688 | ||
689 | info->fix.smem_start = (unsigned long)fbi->fb_start_dma; | 689 | info->fix.smem_start = (unsigned long)fbi->fb_start_dma; |
690 | set_graphics_start(info, 0, 0); | ||
690 | 691 | ||
691 | /* | 692 | /* |
692 | * Set video mode according to platform data. | 693 | * Set video mode according to platform data. |
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 | |