OMAP: DSS2: move set/get_update_mode()
Move set/get_update_mode() 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>
This commit is contained in:
@@ -202,7 +202,7 @@ static int omapfb_set_update_mode(struct fb_info *fbi,
|
||||
enum omap_dss_update_mode um;
|
||||
int r;
|
||||
|
||||
if (!display || !display->set_update_mode)
|
||||
if (!display || !display->driver->set_update_mode)
|
||||
return -EINVAL;
|
||||
|
||||
switch (mode) {
|
||||
@@ -222,7 +222,7 @@ static int omapfb_set_update_mode(struct fb_info *fbi,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
r = display->set_update_mode(display, um);
|
||||
r = display->driver->set_update_mode(display, um);
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -233,10 +233,15 @@ static int omapfb_get_update_mode(struct fb_info *fbi,
|
||||
struct omap_dss_device *display = fb2display(fbi);
|
||||
enum omap_dss_update_mode m;
|
||||
|
||||
if (!display || !display->get_update_mode)
|
||||
if (!display)
|
||||
return -EINVAL;
|
||||
|
||||
m = display->get_update_mode(display);
|
||||
if (!display->driver->get_update_mode) {
|
||||
*mode = OMAPFB_AUTO_UPDATE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
m = display->driver->get_update_mode(display);
|
||||
|
||||
switch (m) {
|
||||
case OMAP_DSS_UPDATE_DISABLED:
|
||||
|
||||
@@ -1226,8 +1226,8 @@ static int omapfb_blank(int blank, struct fb_info *fbi)
|
||||
if (display->resume)
|
||||
r = display->resume(display);
|
||||
|
||||
if (r == 0 && display->get_update_mode &&
|
||||
display->get_update_mode(display) ==
|
||||
if (r == 0 && display->driver->get_update_mode &&
|
||||
display->driver->get_update_mode(display) ==
|
||||
OMAP_DSS_UPDATE_MANUAL)
|
||||
do_update = 1;
|
||||
|
||||
@@ -2193,6 +2193,7 @@ static int omapfb_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (def_display) {
|
||||
struct omap_dss_driver *dssdrv = def_display->driver;
|
||||
#ifndef CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE
|
||||
u16 w, h;
|
||||
#endif
|
||||
@@ -2206,25 +2207,25 @@ static int omapfb_probe(struct platform_device *pdev)
|
||||
/* set the update mode */
|
||||
if (def_display->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) {
|
||||
#ifdef CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE
|
||||
if (def_display->driver->enable_te)
|
||||
def_display->driver->enable_te(def_display, 1);
|
||||
if (def_display->set_update_mode)
|
||||
def_display->set_update_mode(def_display,
|
||||
if (dssdrv->enable_te)
|
||||
dssdrv->enable_te(def_display, 1);
|
||||
if (dssdrv->set_update_mode)
|
||||
dssdrv->set_update_mode(def_display,
|
||||
OMAP_DSS_UPDATE_AUTO);
|
||||
#else /* MANUAL_UPDATE */
|
||||
if (def_display->driver->enable_te)
|
||||
def_display->driver->enable_te(def_display, 0);
|
||||
if (def_display->set_update_mode)
|
||||
def_display->set_update_mode(def_display,
|
||||
if (dssdrv->enable_te)
|
||||
dssdrv->enable_te(def_display, 0);
|
||||
if (dssdrv->set_update_mode)
|
||||
dssdrv->set_update_mode(def_display,
|
||||
OMAP_DSS_UPDATE_MANUAL);
|
||||
|
||||
def_display->driver->get_resolution(def_display,
|
||||
dssdrv->get_resolution(def_display,
|
||||
&w, &h);
|
||||
def_display->update(def_display, 0, 0, w, h);
|
||||
#endif
|
||||
} else {
|
||||
if (def_display->set_update_mode)
|
||||
def_display->set_update_mode(def_display,
|
||||
if (dssdrv->set_update_mode)
|
||||
dssdrv->set_update_mode(def_display,
|
||||
OMAP_DSS_UPDATE_AUTO);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user