diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/Kconfig | 3 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 38 | ||||
-rw-r--r-- | drivers/video/mx3fb.c | 3 | ||||
-rw-r--r-- | drivers/video/xen-fbfront.c | 5 |
4 files changed, 39 insertions, 10 deletions
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index c101697a4ba7..765a945f8ea1 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig | |||
@@ -60,7 +60,8 @@ config LCD_LTV350QV | |||
60 | The LTV350QV panel is present on all ATSTK1000 boards. | 60 | The LTV350QV panel is present on all ATSTK1000 boards. |
61 | 61 | ||
62 | config LCD_ILI9320 | 62 | config LCD_ILI9320 |
63 | tristate | 63 | tristate "ILI Technology ILI9320 controller support" |
64 | depends on SPI | ||
64 | help | 65 | help |
65 | If you have a panel based on the ILI9320 controller chip | 66 | If you have a panel based on the ILI9320 controller chip |
66 | then say y to include a power driver for it. | 67 | then say y to include a power driver for it. |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index cf2688de0832..e501dbc966b3 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/math64.h> | 33 | #include <linux/math64.h> |
34 | 34 | ||
35 | #include <linux/platform_data/video-imxfb.h> | 35 | #include <linux/platform_data/video-imxfb.h> |
36 | #include <mach/hardware.h> | ||
37 | 36 | ||
38 | /* | 37 | /* |
39 | * Complain if VAR is out of range. | 38 | * Complain if VAR is out of range. |
@@ -53,8 +52,8 @@ | |||
53 | #define LCDC_SIZE 0x04 | 52 | #define LCDC_SIZE 0x04 |
54 | #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) | 53 | #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) |
55 | 54 | ||
56 | #define YMAX_MASK (cpu_is_mx1() ? 0x1ff : 0x3ff) | 55 | #define YMAX_MASK_IMX1 0x1ff |
57 | #define SIZE_YMAX(y) ((y) & YMAX_MASK) | 56 | #define YMAX_MASK_IMX21 0x3ff |
58 | 57 | ||
59 | #define LCDC_VPW 0x08 | 58 | #define LCDC_VPW 0x08 |
60 | #define VPW_VPW(x) ((x) & 0x3ff) | 59 | #define VPW_VPW(x) ((x) & 0x3ff) |
@@ -128,12 +127,18 @@ struct imxfb_rgb { | |||
128 | struct fb_bitfield transp; | 127 | struct fb_bitfield transp; |
129 | }; | 128 | }; |
130 | 129 | ||
130 | enum imxfb_type { | ||
131 | IMX1_FB, | ||
132 | IMX21_FB, | ||
133 | }; | ||
134 | |||
131 | struct imxfb_info { | 135 | struct imxfb_info { |
132 | struct platform_device *pdev; | 136 | struct platform_device *pdev; |
133 | void __iomem *regs; | 137 | void __iomem *regs; |
134 | struct clk *clk_ipg; | 138 | struct clk *clk_ipg; |
135 | struct clk *clk_ahb; | 139 | struct clk *clk_ahb; |
136 | struct clk *clk_per; | 140 | struct clk *clk_per; |
141 | enum imxfb_type devtype; | ||
137 | 142 | ||
138 | /* | 143 | /* |
139 | * These are the addresses we mapped | 144 | * These are the addresses we mapped |
@@ -168,6 +173,24 @@ struct imxfb_info { | |||
168 | void (*backlight_power)(int); | 173 | void (*backlight_power)(int); |
169 | }; | 174 | }; |
170 | 175 | ||
176 | static struct platform_device_id imxfb_devtype[] = { | ||
177 | { | ||
178 | .name = "imx1-fb", | ||
179 | .driver_data = IMX1_FB, | ||
180 | }, { | ||
181 | .name = "imx21-fb", | ||
182 | .driver_data = IMX21_FB, | ||
183 | }, { | ||
184 | /* sentinel */ | ||
185 | } | ||
186 | }; | ||
187 | MODULE_DEVICE_TABLE(platform, imxfb_devtype); | ||
188 | |||
189 | static inline int is_imx1_fb(struct imxfb_info *fbi) | ||
190 | { | ||
191 | return fbi->devtype == IMX1_FB; | ||
192 | } | ||
193 | |||
171 | #define IMX_NAME "IMX" | 194 | #define IMX_NAME "IMX" |
172 | 195 | ||
173 | /* | 196 | /* |
@@ -366,7 +389,7 @@ static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
366 | break; | 389 | break; |
367 | case 16: | 390 | case 16: |
368 | default: | 391 | default: |
369 | if (cpu_is_mx1()) | 392 | if (is_imx1_fb(fbi)) |
370 | pcr |= PCR_BPIX_12; | 393 | pcr |= PCR_BPIX_12; |
371 | else | 394 | else |
372 | pcr |= PCR_BPIX_16; | 395 | pcr |= PCR_BPIX_16; |
@@ -596,6 +619,7 @@ static struct fb_ops imxfb_ops = { | |||
596 | static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info) | 619 | static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info) |
597 | { | 620 | { |
598 | struct imxfb_info *fbi = info->par; | 621 | struct imxfb_info *fbi = info->par; |
622 | u32 ymax_mask = is_imx1_fb(fbi) ? YMAX_MASK_IMX1 : YMAX_MASK_IMX21; | ||
599 | 623 | ||
600 | pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n", | 624 | pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n", |
601 | var->xres, var->hsync_len, | 625 | var->xres, var->hsync_len, |
@@ -617,7 +641,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
617 | if (var->right_margin > 255) | 641 | if (var->right_margin > 255) |
618 | printk(KERN_ERR "%s: invalid right_margin %d\n", | 642 | printk(KERN_ERR "%s: invalid right_margin %d\n", |
619 | info->fix.id, var->right_margin); | 643 | info->fix.id, var->right_margin); |
620 | if (var->yres < 1 || var->yres > YMAX_MASK) | 644 | if (var->yres < 1 || var->yres > ymax_mask) |
621 | printk(KERN_ERR "%s: invalid yres %d\n", | 645 | printk(KERN_ERR "%s: invalid yres %d\n", |
622 | info->fix.id, var->yres); | 646 | info->fix.id, var->yres); |
623 | if (var->vsync_len > 100) | 647 | if (var->vsync_len > 100) |
@@ -645,7 +669,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
645 | VCR_V_WAIT_2(var->upper_margin), | 669 | VCR_V_WAIT_2(var->upper_margin), |
646 | fbi->regs + LCDC_VCR); | 670 | fbi->regs + LCDC_VCR); |
647 | 671 | ||
648 | writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres), | 672 | writel(SIZE_XMAX(var->xres) | (var->yres & ymax_mask), |
649 | fbi->regs + LCDC_SIZE); | 673 | fbi->regs + LCDC_SIZE); |
650 | 674 | ||
651 | writel(fbi->pcr, fbi->regs + LCDC_PCR); | 675 | writel(fbi->pcr, fbi->regs + LCDC_PCR); |
@@ -765,6 +789,7 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
765 | return -ENOMEM; | 789 | return -ENOMEM; |
766 | 790 | ||
767 | fbi = info->par; | 791 | fbi = info->par; |
792 | fbi->devtype = pdev->id_entry->driver_data; | ||
768 | 793 | ||
769 | if (!fb_mode) | 794 | if (!fb_mode) |
770 | fb_mode = pdata->mode[0].mode.name; | 795 | fb_mode = pdata->mode[0].mode.name; |
@@ -939,6 +964,7 @@ static struct platform_driver imxfb_driver = { | |||
939 | .driver = { | 964 | .driver = { |
940 | .name = DRIVER_NAME, | 965 | .name = DRIVER_NAME, |
941 | }, | 966 | }, |
967 | .id_table = imxfb_devtype, | ||
942 | }; | 968 | }; |
943 | 969 | ||
944 | static int imxfb_setup(void) | 970 | static int imxfb_setup(void) |
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c index ce1d452464ed..736887208574 100644 --- a/drivers/video/mx3fb.c +++ b/drivers/video/mx3fb.c | |||
@@ -26,10 +26,9 @@ | |||
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
29 | #include <linux/dma/ipu-dma.h> | ||
29 | 30 | ||
30 | #include <linux/platform_data/dma-imx.h> | 31 | #include <linux/platform_data/dma-imx.h> |
31 | #include <mach/hardware.h> | ||
32 | #include <mach/ipu.h> | ||
33 | #include <linux/platform_data/video-mx3fb.h> | 32 | #include <linux/platform_data/video-mx3fb.h> |
34 | 33 | ||
35 | #include <asm/io.h> | 34 | #include <asm/io.h> |
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c index b7f5173ff9e9..917bb5681684 100644 --- a/drivers/video/xen-fbfront.c +++ b/drivers/video/xen-fbfront.c | |||
@@ -641,7 +641,6 @@ static void xenfb_backend_changed(struct xenbus_device *dev, | |||
641 | case XenbusStateReconfiguring: | 641 | case XenbusStateReconfiguring: |
642 | case XenbusStateReconfigured: | 642 | case XenbusStateReconfigured: |
643 | case XenbusStateUnknown: | 643 | case XenbusStateUnknown: |
644 | case XenbusStateClosed: | ||
645 | break; | 644 | break; |
646 | 645 | ||
647 | case XenbusStateInitWait: | 646 | case XenbusStateInitWait: |
@@ -670,6 +669,10 @@ InitWait: | |||
670 | info->feature_resize = val; | 669 | info->feature_resize = val; |
671 | break; | 670 | break; |
672 | 671 | ||
672 | case XenbusStateClosed: | ||
673 | if (dev->state == XenbusStateClosed) | ||
674 | break; | ||
675 | /* Missed the backend's CLOSING state -- fallthrough */ | ||
673 | case XenbusStateClosing: | 676 | case XenbusStateClosing: |
674 | xenbus_frontend_closed(dev); | 677 | xenbus_frontend_closed(dev); |
675 | break; | 678 | break; |