aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c2
-rw-r--r--drivers/video/omap2/dss/core.c4
-rw-r--r--drivers/video/omap2/dss/display.c4
-rw-r--r--drivers/video/omap2/dss/dsi.c4
-rw-r--r--drivers/video/omap2/dss/overlay.c2
-rw-r--r--drivers/video/omap2/dss/venc.c2
-rw-r--r--drivers/video/omap2/omapfb/omapfb-ioctl.c4
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c9
8 files changed, 19 insertions, 12 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 8f90de0d2b4b..11d69b67a903 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -517,7 +517,6 @@ static int taal_probe(struct omap_dss_device *dssdev)
517 dev_set_drvdata(&dssdev->dev, td); 517 dev_set_drvdata(&dssdev->dev, td);
518 518
519 dssdev->get_timings = taal_get_timings; 519 dssdev->get_timings = taal_get_timings;
520 dssdev->get_resolution = taal_get_resolution;
521 520
522 /* if no platform set_backlight() defined, presume DSI backlight 521 /* if no platform set_backlight() defined, presume DSI backlight
523 * control */ 522 * control */
@@ -990,6 +989,7 @@ static struct omap_dss_driver taal_driver = {
990 .resume = taal_resume, 989 .resume = taal_resume,
991 990
992 .setup_update = taal_setup_update, 991 .setup_update = taal_setup_update,
992 .get_resolution = taal_get_resolution,
993 .enable_te = taal_enable_te, 993 .enable_te = taal_enable_te,
994 .wait_for_te = taal_wait_te, 994 .wait_for_te = taal_wait_te,
995 .set_rotate = taal_rotate, 995 .set_rotate = taal_rotate,
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 39b1a20a298c..2e6ce835ae5c 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -811,6 +811,10 @@ int omap_dss_register_driver(struct omap_dss_driver *dssdriver)
811 dssdriver->driver.bus = &dss_bus_type; 811 dssdriver->driver.bus = &dss_bus_type;
812 dssdriver->driver.probe = dss_driver_probe; 812 dssdriver->driver.probe = dss_driver_probe;
813 dssdriver->driver.remove = dss_driver_remove; 813 dssdriver->driver.remove = dss_driver_remove;
814
815 if (dssdriver->get_resolution == NULL)
816 dssdriver->get_resolution = omapdss_default_get_resolution;
817
814 return driver_register(&dssdriver->driver); 818 return driver_register(&dssdriver->driver);
815} 819}
816EXPORT_SYMBOL(omap_dss_register_driver); 820EXPORT_SYMBOL(omap_dss_register_driver);
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 80b67d1c9d03..3888c191c8a7 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -303,12 +303,13 @@ static struct device_attribute *display_sysfs_attrs[] = {
303 NULL 303 NULL
304}; 304};
305 305
306static void default_get_resolution(struct omap_dss_device *dssdev, 306void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
307 u16 *xres, u16 *yres) 307 u16 *xres, u16 *yres)
308{ 308{
309 *xres = dssdev->panel.timings.x_res; 309 *xres = dssdev->panel.timings.x_res;
310 *yres = dssdev->panel.timings.y_res; 310 *yres = dssdev->panel.timings.y_res;
311} 311}
312EXPORT_SYMBOL(omapdss_default_get_resolution);
312 313
313void default_get_overlay_fifo_thresholds(enum omap_plane plane, 314void default_get_overlay_fifo_thresholds(enum omap_plane plane,
314 u32 fifo_size, enum omap_burst_size *burst_size, 315 u32 fifo_size, enum omap_burst_size *burst_size,
@@ -412,7 +413,6 @@ void dss_init_device(struct platform_device *pdev,
412 return; 413 return;
413 } 414 }
414 415
415 dssdev->get_resolution = default_get_resolution;
416 dssdev->get_recommended_bpp = default_get_recommended_bpp; 416 dssdev->get_recommended_bpp = default_get_recommended_bpp;
417 417
418 switch (dssdev->type) { 418 switch (dssdev->type) {
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index b478a506e038..abc66f2c0705 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2868,7 +2868,7 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev,
2868 2868
2869 DSSDBG("starting auto update\n"); 2869 DSSDBG("starting auto update\n");
2870 2870
2871 dssdev->get_resolution(dssdev, &w, &h); 2871 dssdev->driver->get_resolution(dssdev, &w, &h);
2872 2872
2873 dsi_set_update_region(dssdev, 0, 0, w, h); 2873 dsi_set_update_region(dssdev, 0, 0, w, h);
2874 2874
@@ -3422,7 +3422,7 @@ static int dsi_display_update(struct omap_dss_device *dssdev,
3422 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) 3422 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
3423 goto end; 3423 goto end;
3424 3424
3425 dssdev->get_resolution(dssdev, &dw, &dh); 3425 dssdev->driver->get_resolution(dssdev, &dw, &dh);
3426 3426
3427 if (x > dw || y > dh) 3427 if (x > dw || y > dh)
3428 goto end; 3428 goto end;
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index b7f9a7339842..0c5bea263ac6 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -350,7 +350,7 @@ int dss_check_overlay(struct omap_overlay *ovl, struct omap_dss_device *dssdev)
350 return -EINVAL; 350 return -EINVAL;
351 } 351 }
352 352
353 dssdev->get_resolution(dssdev, &dw, &dh); 353 dssdev->driver->get_resolution(dssdev, &dw, &dh);
354 354
355 DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n", 355 DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
356 ovl->id, 356 ovl->id,
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 4e6bd1dc8021..65514f0f52fd 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -459,6 +459,8 @@ static struct omap_dss_driver venc_driver = {
459 .suspend = venc_panel_suspend, 459 .suspend = venc_panel_suspend,
460 .resume = venc_panel_resume, 460 .resume = venc_panel_resume,
461 461
462 .get_resolution = omapdss_default_get_resolution,
463
462 .driver = { 464 .driver = {
463 .name = "venc", 465 .name = "venc",
464 .owner = THIS_MODULE, 466 .owner = THIS_MODULE,
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
index 36afab30921e..6deabb94fd31 100644
--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
@@ -167,7 +167,7 @@ static int omapfb_update_window_nolock(struct fb_info *fbi,
167 if (w == 0 || h == 0) 167 if (w == 0 || h == 0)
168 return 0; 168 return 0;
169 169
170 display->get_resolution(display, &dw, &dh); 170 display->driver->get_resolution(display, &dw, &dh);
171 171
172 if (x + w > dw || y + h > dh) 172 if (x + w > dw || y + h > dh)
173 return -EINVAL; 173 return -EINVAL;
@@ -752,7 +752,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
752 break; 752 break;
753 } 753 }
754 754
755 display->get_resolution(display, &xres, &yres); 755 display->driver->get_resolution(display, &xres, &yres);
756 756
757 p.display_info.xres = xres; 757 p.display_info.xres = xres;
758 p.display_info.yres = yres; 758 p.display_info.yres = yres;
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 6a383ab2bef2..212d2efb380c 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1254,7 +1254,7 @@ exit:
1254 1254
1255 if (r == 0 && do_update && display->update) { 1255 if (r == 0 && do_update && display->update) {
1256 u16 w, h; 1256 u16 w, h;
1257 display->get_resolution(display, &w, &h); 1257 display->driver->get_resolution(display, &w, &h);
1258 1258
1259 r = display->update(display, 0, 0, w, h); 1259 r = display->update(display, 0, 0, w, h);
1260 } 1260 }
@@ -1427,7 +1427,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
1427 if (!size) { 1427 if (!size) {
1428 u16 w, h; 1428 u16 w, h;
1429 1429
1430 display->get_resolution(display, &w, &h); 1430 display->driver->get_resolution(display, &w, &h);
1431 1431
1432 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) { 1432 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
1433 size = max(omap_vrfb_min_phys_size(w, h, bytespp), 1433 size = max(omap_vrfb_min_phys_size(w, h, bytespp),
@@ -1745,7 +1745,7 @@ static int omapfb_fb_init(struct omapfb2_device *fbdev, struct fb_info *fbi)
1745 u16 w, h; 1745 u16 w, h;
1746 int rotation = (var->rotate + ofbi->rotation[0]) % 4; 1746 int rotation = (var->rotate + ofbi->rotation[0]) % 4;
1747 1747
1748 display->get_resolution(display, &w, &h); 1748 display->driver->get_resolution(display, &w, &h);
1749 1749
1750 if (rotation == FB_ROTATE_CW || 1750 if (rotation == FB_ROTATE_CW ||
1751 rotation == FB_ROTATE_CCW) { 1751 rotation == FB_ROTATE_CCW) {
@@ -2197,7 +2197,8 @@ static int omapfb_probe(struct platform_device *pdev)
2197 def_display->set_update_mode(def_display, 2197 def_display->set_update_mode(def_display,
2198 OMAP_DSS_UPDATE_MANUAL); 2198 OMAP_DSS_UPDATE_MANUAL);
2199 2199
2200 def_display->get_resolution(def_display, &w, &h); 2200 def_display->driver->get_resolution(def_display,
2201 &w, &h);
2201 def_display->update(def_display, 0, 0, w, h); 2202 def_display->update(def_display, 0, 0, w, h);
2202#endif 2203#endif
2203 } else { 2204 } else {