aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-05 05:35:33 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-05 05:35:33 -0500
commit0719dc341389882cc834ed18fc9b7fc6006b2b85 (patch)
tree794480ac62c07ea8cc4e69c2cb3d2b83bb7f36b7 /drivers/video
parente28edb723e64200554194da17617ee6e82de6690 (diff)
parent677f4f64e4b2336682f0e15c69b206ade6f6b131 (diff)
Merge branch 'devel-stable' into devel
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig5
-rw-r--r--drivers/video/backlight/da903x_bl.c7
-rw-r--r--drivers/video/backlight/tdo24m.c1
-rw-r--r--drivers/video/pxa168fb.c1
-rw-r--r--drivers/video/pxafb.c23
5 files changed, 31 insertions, 6 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 188e1ba3b69f..6b89eb55ed32 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -5,6 +5,9 @@
5menu "Graphics support" 5menu "Graphics support"
6 depends on HAS_IOMEM 6 depends on HAS_IOMEM
7 7
8config HAVE_FB_ATMEL
9 bool
10
8source "drivers/char/agp/Kconfig" 11source "drivers/char/agp/Kconfig"
9 12
10source "drivers/gpu/vga/Kconfig" 13source "drivers/gpu/vga/Kconfig"
@@ -937,7 +940,7 @@ config FB_S1D13XXX
937 940
938config FB_ATMEL 941config FB_ATMEL
939 tristate "AT91/AT32 LCD Controller support" 942 tristate "AT91/AT32 LCD Controller support"
940 depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9G10 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45 || ARCH_AT91CAP9 || AVR32) 943 depends on FB && HAVE_FB_ATMEL
941 select FB_CFB_FILLRECT 944 select FB_CFB_FILLRECT
942 select FB_CFB_COPYAREA 945 select FB_CFB_COPYAREA
943 select FB_CFB_IMAGEBLIT 946 select FB_CFB_IMAGEBLIT
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
102static int da903x_backlight_probe(struct platform_device *pdev) 103static 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 @@
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
@@ -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
1055static void setup_base_frame(struct pxafb_info *fbi, int branch) 1067static 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 |