Skip to content

Commit

Permalink
OMAP: DSS2: Fix crash when panel doesn't define enable_te()
Browse files Browse the repository at this point in the history
DSI driver didn't check if the panel driver actually implements
enable_te().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
  • Loading branch information
Tomi Valkeinen committed Jan 8, 2010
1 parent dfc0fd8 commit 7475e44
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2932,11 +2932,15 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev,

static int dsi_set_te(struct omap_dss_device *dssdev, bool enable)
{
int r;
r = dssdev->driver->enable_te(dssdev, enable);
/* XXX for some reason, DSI TE breaks if we don't wait here.
* Panel bug? Needs more studying */
msleep(100);
int r = 0;

if (dssdev->driver->enable_te) {
r = dssdev->driver->enable_te(dssdev, enable);
/* XXX for some reason, DSI TE breaks if we don't wait here.
* Panel bug? Needs more studying */
msleep(100);
}

return r;
}

Expand Down

0 comments on commit 7475e44

Please sign in to comment.