diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 22 | ||||
-rw-r--r-- | drivers/video/ep93xx-fb.c | 1 | ||||
-rw-r--r-- | drivers/video/mxsfb.c | 7 | ||||
-rw-r--r-- | drivers/video/omap/omapfb_main.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/displays/panel-tpo-td043mtea1.c | 13 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 6 |
6 files changed, 36 insertions, 15 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 12cf5f31ee8f..025428e04c33 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -422,17 +422,22 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, | |||
422 | = var->bits_per_pixel; | 422 | = var->bits_per_pixel; |
423 | break; | 423 | break; |
424 | case 16: | 424 | case 16: |
425 | /* Older SOCs use IBGR:555 rather than BGR:565. */ | ||
426 | if (sinfo->have_intensity_bit) | ||
427 | var->green.length = 5; | ||
428 | else | ||
429 | var->green.length = 6; | ||
430 | |||
425 | if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) { | 431 | if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB) { |
426 | /* RGB:565 mode */ | 432 | /* RGB:5X5 mode */ |
427 | var->red.offset = 11; | 433 | var->red.offset = var->green.length + 5; |
428 | var->blue.offset = 0; | 434 | var->blue.offset = 0; |
429 | } else { | 435 | } else { |
430 | /* BGR:565 mode */ | 436 | /* BGR:5X5 mode */ |
431 | var->red.offset = 0; | 437 | var->red.offset = 0; |
432 | var->blue.offset = 11; | 438 | var->blue.offset = var->green.length + 5; |
433 | } | 439 | } |
434 | var->green.offset = 5; | 440 | var->green.offset = 5; |
435 | var->green.length = 6; | ||
436 | var->red.length = var->blue.length = 5; | 441 | var->red.length = var->blue.length = 5; |
437 | break; | 442 | break; |
438 | case 32: | 443 | case 32: |
@@ -679,8 +684,7 @@ static int atmel_lcdfb_setcolreg(unsigned int regno, unsigned int red, | |||
679 | 684 | ||
680 | case FB_VISUAL_PSEUDOCOLOR: | 685 | case FB_VISUAL_PSEUDOCOLOR: |
681 | if (regno < 256) { | 686 | if (regno < 256) { |
682 | if (cpu_is_at91sam9261() || cpu_is_at91sam9263() | 687 | if (sinfo->have_intensity_bit) { |
683 | || cpu_is_at91sam9rl()) { | ||
684 | /* old style I+BGR:555 */ | 688 | /* old style I+BGR:555 */ |
685 | val = ((red >> 11) & 0x001f); | 689 | val = ((red >> 11) & 0x001f); |
686 | val |= ((green >> 6) & 0x03e0); | 690 | val |= ((green >> 6) & 0x03e0); |
@@ -870,6 +874,10 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
870 | } | 874 | } |
871 | sinfo->info = info; | 875 | sinfo->info = info; |
872 | sinfo->pdev = pdev; | 876 | sinfo->pdev = pdev; |
877 | if (cpu_is_at91sam9261() || cpu_is_at91sam9263() || | ||
878 | cpu_is_at91sam9rl()) { | ||
879 | sinfo->have_intensity_bit = true; | ||
880 | } | ||
873 | 881 | ||
874 | strcpy(info->fix.id, sinfo->pdev->name); | 882 | strcpy(info->fix.id, sinfo->pdev->name); |
875 | info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; | 883 | info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; |
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index 3f2519d30715..e06cd5d90c97 100644 --- a/drivers/video/ep93xx-fb.c +++ b/drivers/video/ep93xx-fb.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/fb.h> | 25 | #include <linux/fb.h> |
26 | #include <linux/io.h> | ||
26 | 27 | ||
27 | #include <linux/platform_data/video-ep93xx.h> | 28 | #include <linux/platform_data/video-ep93xx.h> |
28 | 29 | ||
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 755556ca5b2d..45169cbaba6e 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
@@ -169,6 +169,7 @@ struct mxsfb_info { | |||
169 | unsigned dotclk_delay; | 169 | unsigned dotclk_delay; |
170 | const struct mxsfb_devdata *devdata; | 170 | const struct mxsfb_devdata *devdata; |
171 | int mapped; | 171 | int mapped; |
172 | u32 sync; | ||
172 | }; | 173 | }; |
173 | 174 | ||
174 | #define mxsfb_is_v3(host) (host->devdata->ipversion == 3) | 175 | #define mxsfb_is_v3(host) (host->devdata->ipversion == 3) |
@@ -456,9 +457,9 @@ static int mxsfb_set_par(struct fb_info *fb_info) | |||
456 | vdctrl0 |= VDCTRL0_HSYNC_ACT_HIGH; | 457 | vdctrl0 |= VDCTRL0_HSYNC_ACT_HIGH; |
457 | if (fb_info->var.sync & FB_SYNC_VERT_HIGH_ACT) | 458 | if (fb_info->var.sync & FB_SYNC_VERT_HIGH_ACT) |
458 | vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH; | 459 | vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH; |
459 | if (fb_info->var.sync & FB_SYNC_DATA_ENABLE_HIGH_ACT) | 460 | if (host->sync & MXSFB_SYNC_DATA_ENABLE_HIGH_ACT) |
460 | vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; | 461 | vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; |
461 | if (fb_info->var.sync & FB_SYNC_DOTCLK_FAILING_ACT) | 462 | if (host->sync & MXSFB_SYNC_DOTCLK_FAILING_ACT) |
462 | vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING; | 463 | vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING; |
463 | 464 | ||
464 | writel(vdctrl0, host->base + LCDC_VDCTRL0); | 465 | writel(vdctrl0, host->base + LCDC_VDCTRL0); |
@@ -861,6 +862,8 @@ static int mxsfb_probe(struct platform_device *pdev) | |||
861 | 862 | ||
862 | INIT_LIST_HEAD(&fb_info->modelist); | 863 | INIT_LIST_HEAD(&fb_info->modelist); |
863 | 864 | ||
865 | host->sync = pdata->sync; | ||
866 | |||
864 | ret = mxsfb_init_fbinfo(host); | 867 | ret = mxsfb_init_fbinfo(host); |
865 | if (ret != 0) | 868 | if (ret != 0) |
866 | goto error_init_fb; | 869 | goto error_init_fb; |
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index e31f5b33b501..d40612c31a98 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #include <linux/omap-dma.h> | 33 | #include <linux/omap-dma.h> |
34 | 34 | ||
35 | #include <mach/hardware.h> | ||
36 | |||
35 | #include "omapfb.h" | 37 | #include "omapfb.h" |
36 | #include "lcdc.h" | 38 | #include "lcdc.h" |
37 | 39 | ||
diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c index 6b6643911d29..048c98381ef6 100644 --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c | |||
@@ -63,6 +63,9 @@ struct tpo_td043_device { | |||
63 | u32 power_on_resume:1; | 63 | u32 power_on_resume:1; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* used to pass spi_device from SPI to DSS portion of the driver */ | ||
67 | static struct tpo_td043_device *g_tpo_td043; | ||
68 | |||
66 | static int tpo_td043_write(struct spi_device *spi, u8 addr, u8 data) | 69 | static int tpo_td043_write(struct spi_device *spi, u8 addr, u8 data) |
67 | { | 70 | { |
68 | struct spi_message m; | 71 | struct spi_message m; |
@@ -403,7 +406,7 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev) | |||
403 | 406 | ||
404 | static int tpo_td043_probe(struct omap_dss_device *dssdev) | 407 | static int tpo_td043_probe(struct omap_dss_device *dssdev) |
405 | { | 408 | { |
406 | struct tpo_td043_device *tpo_td043 = dev_get_drvdata(&dssdev->dev); | 409 | struct tpo_td043_device *tpo_td043 = g_tpo_td043; |
407 | int nreset_gpio = dssdev->reset_gpio; | 410 | int nreset_gpio = dssdev->reset_gpio; |
408 | int ret = 0; | 411 | int ret = 0; |
409 | 412 | ||
@@ -440,6 +443,8 @@ static int tpo_td043_probe(struct omap_dss_device *dssdev) | |||
440 | if (ret) | 443 | if (ret) |
441 | dev_warn(&dssdev->dev, "failed to create sysfs files\n"); | 444 | dev_warn(&dssdev->dev, "failed to create sysfs files\n"); |
442 | 445 | ||
446 | dev_set_drvdata(&dssdev->dev, tpo_td043); | ||
447 | |||
443 | return 0; | 448 | return 0; |
444 | 449 | ||
445 | fail_gpio_req: | 450 | fail_gpio_req: |
@@ -505,6 +510,9 @@ static int tpo_td043_spi_probe(struct spi_device *spi) | |||
505 | return -ENODEV; | 510 | return -ENODEV; |
506 | } | 511 | } |
507 | 512 | ||
513 | if (g_tpo_td043 != NULL) | ||
514 | return -EBUSY; | ||
515 | |||
508 | spi->bits_per_word = 16; | 516 | spi->bits_per_word = 16; |
509 | spi->mode = SPI_MODE_0; | 517 | spi->mode = SPI_MODE_0; |
510 | 518 | ||
@@ -521,7 +529,7 @@ static int tpo_td043_spi_probe(struct spi_device *spi) | |||
521 | tpo_td043->spi = spi; | 529 | tpo_td043->spi = spi; |
522 | tpo_td043->nreset_gpio = dssdev->reset_gpio; | 530 | tpo_td043->nreset_gpio = dssdev->reset_gpio; |
523 | dev_set_drvdata(&spi->dev, tpo_td043); | 531 | dev_set_drvdata(&spi->dev, tpo_td043); |
524 | dev_set_drvdata(&dssdev->dev, tpo_td043); | 532 | g_tpo_td043 = tpo_td043; |
525 | 533 | ||
526 | omap_dss_register_driver(&tpo_td043_driver); | 534 | omap_dss_register_driver(&tpo_td043_driver); |
527 | 535 | ||
@@ -534,6 +542,7 @@ static int tpo_td043_spi_remove(struct spi_device *spi) | |||
534 | 542 | ||
535 | omap_dss_unregister_driver(&tpo_td043_driver); | 543 | omap_dss_unregister_driver(&tpo_td043_driver); |
536 | kfree(tpo_td043); | 544 | kfree(tpo_td043); |
545 | g_tpo_td043 = NULL; | ||
537 | 546 | ||
538 | return 0; | 547 | return 0; |
539 | } | 548 | } |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index d7d66ef5cb58..7f791aeda4d2 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -202,12 +202,10 @@ static const enum omap_dss_output_id omap3630_dss_supported_outputs[] = { | |||
202 | 202 | ||
203 | static const enum omap_dss_output_id omap4_dss_supported_outputs[] = { | 203 | static const enum omap_dss_output_id omap4_dss_supported_outputs[] = { |
204 | /* OMAP_DSS_CHANNEL_LCD */ | 204 | /* OMAP_DSS_CHANNEL_LCD */ |
205 | OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI | | 205 | OMAP_DSS_OUTPUT_DBI | OMAP_DSS_OUTPUT_DSI1, |
206 | OMAP_DSS_OUTPUT_DSI1, | ||
207 | 206 | ||
208 | /* OMAP_DSS_CHANNEL_DIGIT */ | 207 | /* OMAP_DSS_CHANNEL_DIGIT */ |
209 | OMAP_DSS_OUTPUT_VENC | OMAP_DSS_OUTPUT_HDMI | | 208 | OMAP_DSS_OUTPUT_VENC | OMAP_DSS_OUTPUT_HDMI, |
210 | OMAP_DSS_OUTPUT_DPI, | ||
211 | 209 | ||
212 | /* OMAP_DSS_CHANNEL_LCD2 */ | 210 | /* OMAP_DSS_CHANNEL_LCD2 */ |
213 | OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI | | 211 | OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI | |