summaryrefslogtreecommitdiff
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-11 14:54:33 +0300
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-24 15:31:27 +0300
commit96adceceedefff9b849d25ff582bc6f516903994 (patch)
tree5479f5a04deb0d06dc9004ae596ab95adbbb1e2d /drivers/video/omap2
parenta2faee84f6d8e35150d60514c6638d223509fa13 (diff)
downloadlinux-96adceceedefff9b849d25ff582bc6f516903994.tar.xz
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')
-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)
dev_set_drvdata(&dssdev->dev, td);
dssdev->get_timings = taal_get_timings;
- dssdev->get_resolution = taal_get_resolution;
/* if no platform set_backlight() defined, presume DSI backlight
* control */
@@ -990,6 +989,7 @@ static struct omap_dss_driver taal_driver = {
.resume = taal_resume,
.setup_update = taal_setup_update,
+ .get_resolution = taal_get_resolution,
.enable_te = taal_enable_te,
.wait_for_te = taal_wait_te,
.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)
dssdriver->driver.bus = &dss_bus_type;
dssdriver->driver.probe = dss_driver_probe;
dssdriver->driver.remove = dss_driver_remove;
+
+ if (dssdriver->get_resolution == NULL)
+ dssdriver->get_resolution = omapdss_default_get_resolution;
+
return driver_register(&dssdriver->driver);
}
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[] = {
NULL
};
-static void default_get_resolution(struct omap_dss_device *dssdev,
+void omapdss_default_get_resolution(struct omap_dss_device *dssdev,
u16 *xres, u16 *yres)
{
*xres = dssdev->panel.timings.x_res;
*yres = dssdev->panel.timings.y_res;
}
+EXPORT_SYMBOL(omapdss_default_get_resolution);
void default_get_overlay_fifo_thresholds(enum omap_plane plane,
u32 fifo_size, enum omap_burst_size *burst_size,
@@ -412,7 +413,6 @@ void dss_init_device(struct platform_device *pdev,
return;
}
- dssdev->get_resolution = default_get_resolution;
dssdev->get_recommended_bpp = default_get_recommended_bpp;
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,
DSSDBG("starting auto update\n");
- dssdev->get_resolution(dssdev, &w, &h);
+ dssdev->driver->get_resolution(dssdev, &w, &h);
dsi_set_update_region(dssdev, 0, 0, w, h);
@@ -3422,7 +3422,7 @@ static int dsi_display_update(struct omap_dss_device *dssdev,
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
goto end;
- dssdev->get_resolution(dssdev, &dw, &dh);
+ dssdev->driver->get_resolution(dssdev, &dw, &dh);
if (x > dw || y > dh)
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)
return -EINVAL;
}
- dssdev->get_resolution(dssdev, &dw, &dh);
+ dssdev->driver->get_resolution(dssdev, &dw, &dh);
DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
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 = {
.suspend = venc_panel_suspend,
.resume = venc_panel_resume,
+ .get_resolution = omapdss_default_get_resolution,
+
.driver = {
.name = "venc",
.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,
if (w == 0 || h == 0)
return 0;
- display->get_resolution(display, &dw, &dh);
+ display->driver->get_resolution(display, &dw, &dh);
if (x + w > dw || y + h > dh)
return -EINVAL;
@@ -752,7 +752,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
break;
}
- display->get_resolution(display, &xres, &yres);
+ display->driver->get_resolution(display, &xres, &yres);
p.display_info.xres = xres;
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:
if (r == 0 && do_update && display->update) {
u16 w, h;
- display->get_resolution(display, &w, &h);
+ display->driver->get_resolution(display, &w, &h);
r = display->update(display, 0, 0, w, h);
}
@@ -1427,7 +1427,7 @@ static int omapfb_alloc_fbmem_display(struct fb_info *fbi, unsigned long size,
if (!size) {
u16 w, h;
- display->get_resolution(display, &w, &h);
+ display->driver->get_resolution(display, &w, &h);
if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
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)
u16 w, h;
int rotation = (var->rotate + ofbi->rotation[0]) % 4;
- display->get_resolution(display, &w, &h);
+ display->driver->get_resolution(display, &w, &h);
if (rotation == FB_ROTATE_CW ||
rotation == FB_ROTATE_CCW) {
@@ -2197,7 +2197,8 @@ static int omapfb_probe(struct platform_device *pdev)
def_display->set_update_mode(def_display,
OMAP_DSS_UPDATE_MANUAL);
- def_display->get_resolution(def_display, &w, &h);
+ def_display->driver->get_resolution(def_display,
+ &w, &h);
def_display->update(def_display, 0, 0, w, h);
#endif
} else {