aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-03-13 19:42:34 -0400
committerDave Airlie <airlied@redhat.com>2016-03-13 19:46:02 -0400
commit9b61c0fcdf0cfd20a85d9856d46142e7f297de0a (patch)
treed4abe6aa3f4e1e088f9da1d0597e078b1fe58912 /drivers/video/fbdev
parent550e3b23a53c88adfa46e64f9d442743e65d47da (diff)
parent125234dc8b1cc862f52d8bd5b37c36cc59b2cb86 (diff)
Merge drm-fixes into drm-next.
Nouveau wanted this to avoid some worse conflicts when I merge that.
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/da8xx-fb.c6
-rw-r--r--drivers/video/fbdev/exynos/s6e8ax0.c13
-rw-r--r--drivers/video/fbdev/imxfb.c15
-rw-r--r--drivers/video/fbdev/mmp/hw/mmp_ctrl.c3
-rw-r--r--drivers/video/fbdev/ocfb.c4
5 files changed, 25 insertions, 16 deletions
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 0081725c6b5b..6b2a06d09f2b 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -152,7 +152,7 @@ static void lcdc_write(unsigned int val, unsigned int addr)
152 152
153struct da8xx_fb_par { 153struct da8xx_fb_par {
154 struct device *dev; 154 struct device *dev;
155 resource_size_t p_palette_base; 155 dma_addr_t p_palette_base;
156 unsigned char *v_palette_base; 156 unsigned char *v_palette_base;
157 dma_addr_t vram_phys; 157 dma_addr_t vram_phys;
158 unsigned long vram_size; 158 unsigned long vram_size;
@@ -1428,7 +1428,7 @@ static int fb_probe(struct platform_device *device)
1428 1428
1429 par->vram_virt = dma_alloc_coherent(NULL, 1429 par->vram_virt = dma_alloc_coherent(NULL,
1430 par->vram_size, 1430 par->vram_size,
1431 (resource_size_t *) &par->vram_phys, 1431 &par->vram_phys,
1432 GFP_KERNEL | GFP_DMA); 1432 GFP_KERNEL | GFP_DMA);
1433 if (!par->vram_virt) { 1433 if (!par->vram_virt) {
1434 dev_err(&device->dev, 1434 dev_err(&device->dev,
@@ -1448,7 +1448,7 @@ static int fb_probe(struct platform_device *device)
1448 1448
1449 /* allocate palette buffer */ 1449 /* allocate palette buffer */
1450 par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE, 1450 par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
1451 (resource_size_t *)&par->p_palette_base, 1451 &par->p_palette_base,
1452 GFP_KERNEL | GFP_DMA); 1452 GFP_KERNEL | GFP_DMA);
1453 if (!par->v_palette_base) { 1453 if (!par->v_palette_base) {
1454 dev_err(&device->dev, 1454 dev_err(&device->dev,
diff --git a/drivers/video/fbdev/exynos/s6e8ax0.c b/drivers/video/fbdev/exynos/s6e8ax0.c
index 95873f26e39c..de2f3e793786 100644
--- a/drivers/video/fbdev/exynos/s6e8ax0.c
+++ b/drivers/video/fbdev/exynos/s6e8ax0.c
@@ -829,8 +829,7 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev)
829 return 0; 829 return 0;
830} 830}
831 831
832#ifdef CONFIG_PM 832static int __maybe_unused s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev)
833static int s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev)
834{ 833{
835 struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev); 834 struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev);
836 835
@@ -843,7 +842,7 @@ static int s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev)
843 return 0; 842 return 0;
844} 843}
845 844
846static int s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev) 845static int __maybe_unused s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev)
847{ 846{
848 struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev); 847 struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev);
849 848
@@ -855,10 +854,6 @@ static int s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev)
855 854
856 return 0; 855 return 0;
857} 856}
858#else
859#define s6e8ax0_suspend NULL
860#define s6e8ax0_resume NULL
861#endif
862 857
863static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = { 858static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = {
864 .name = "s6e8ax0", 859 .name = "s6e8ax0",
@@ -867,8 +862,8 @@ static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = {
867 .power_on = s6e8ax0_power_on, 862 .power_on = s6e8ax0_power_on,
868 .set_sequence = s6e8ax0_set_sequence, 863 .set_sequence = s6e8ax0_set_sequence,
869 .probe = s6e8ax0_probe, 864 .probe = s6e8ax0_probe,
870 .suspend = s6e8ax0_suspend, 865 .suspend = IS_ENABLED(CONFIG_PM) ? s6e8ax0_suspend : NULL,
871 .resume = s6e8ax0_resume, 866 .resume = IS_ENABLED(CONFIG_PM) ? s6e8ax0_resume : NULL,
872}; 867};
873 868
874static int s6e8ax0_init(void) 869static int s6e8ax0_init(void)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index cee88603efc9..bb2f1e866020 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -902,6 +902,21 @@ static int imxfb_probe(struct platform_device *pdev)
902 goto failed_getclock; 902 goto failed_getclock;
903 } 903 }
904 904
905 /*
906 * The LCDC controller does not have an enable bit. The
907 * controller starts directly when the clocks are enabled.
908 * If the clocks are enabled when the controller is not yet
909 * programmed with proper register values (enabled at the
910 * bootloader, for example) then it just goes into some undefined
911 * state.
912 * To avoid this issue, let's enable and disable LCDC IPG clock
913 * so that we force some kind of 'reset' to the LCDC block.
914 */
915 ret = clk_prepare_enable(fbi->clk_ipg);
916 if (ret)
917 goto failed_getclock;
918 clk_disable_unprepare(fbi->clk_ipg);
919
905 fbi->clk_ahb = devm_clk_get(&pdev->dev, "ahb"); 920 fbi->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
906 if (IS_ERR(fbi->clk_ahb)) { 921 if (IS_ERR(fbi->clk_ahb)) {
907 ret = PTR_ERR(fbi->clk_ahb); 922 ret = PTR_ERR(fbi->clk_ahb);
diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
index de54a4748065..b6f83d5df9fd 100644
--- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
+++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c
@@ -503,8 +503,7 @@ static int mmphw_probe(struct platform_device *pdev)
503 ctrl->reg_base = devm_ioremap_nocache(ctrl->dev, 503 ctrl->reg_base = devm_ioremap_nocache(ctrl->dev,
504 res->start, resource_size(res)); 504 res->start, resource_size(res));
505 if (ctrl->reg_base == NULL) { 505 if (ctrl->reg_base == NULL) {
506 dev_err(ctrl->dev, "%s: res %x - %x map failed\n", __func__, 506 dev_err(ctrl->dev, "%s: res %pR map failed\n", __func__, res);
507 res->start, res->end);
508 ret = -ENOMEM; 507 ret = -ENOMEM;
509 goto failed; 508 goto failed;
510 } 509 }
diff --git a/drivers/video/fbdev/ocfb.c b/drivers/video/fbdev/ocfb.c
index c9293aea8ec3..a970edc2a6f8 100644
--- a/drivers/video/fbdev/ocfb.c
+++ b/drivers/video/fbdev/ocfb.c
@@ -123,11 +123,11 @@ static int ocfb_setupfb(struct ocfb_dev *fbdev)
123 123
124 /* Horizontal timings */ 124 /* Horizontal timings */
125 ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 | 125 ocfb_writereg(fbdev, OCFB_HTIM, (var->hsync_len - 1) << 24 |
126 (var->right_margin - 1) << 16 | (var->xres - 1)); 126 (var->left_margin - 1) << 16 | (var->xres - 1));
127 127
128 /* Vertical timings */ 128 /* Vertical timings */
129 ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 | 129 ocfb_writereg(fbdev, OCFB_VTIM, (var->vsync_len - 1) << 24 |
130 (var->lower_margin - 1) << 16 | (var->yres - 1)); 130 (var->upper_margin - 1) << 16 | (var->yres - 1));
131 131
132 /* Total length of frame */ 132 /* Total length of frame */
133 hlen = var->left_margin + var->right_margin + var->hsync_len + 133 hlen = var->left_margin + var->right_margin + var->hsync_len +