diff options
author | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-01-11 06:54:33 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-02-24 07:31:27 -0500 |
commit | 96adceceedefff9b849d25ff582bc6f516903994 (patch) | |
tree | 5479f5a04deb0d06dc9004ae596ab95adbbb1e2d /drivers/video/omap2/dss | |
parent | a2faee84f6d8e35150d60514c6638d223509fa13 (diff) |
OMAP: DSS2: move get_resolution()
Move get_resolution() from omap_dss_device to omap_dss_driver.
This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r-- | drivers/video/omap2/dss/core.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/display.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/overlay.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 2 |
5 files changed, 11 insertions, 5 deletions
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 | } |
816 | EXPORT_SYMBOL(omap_dss_register_driver); | 820 | EXPORT_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 | ||
306 | static void default_get_resolution(struct omap_dss_device *dssdev, | 306 | void 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 | } |
312 | EXPORT_SYMBOL(omapdss_default_get_resolution); | ||
312 | 313 | ||
313 | void default_get_overlay_fifo_thresholds(enum omap_plane plane, | 314 | void 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, |