summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01ff57a)
raw | patch | inline | side by side (parent: 01ff57a)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Fri, 3 Oct 2014 15:14:09 +0000 (15:14 +0000) | ||
committer | Darren Etheridge <detheridge@ti.com> | |
Fri, 3 Oct 2014 13:09:39 +0000 (08:09 -0500) |
omapdrm doesn't always configure the overlays correctly, causing the
overlay setup functions to be called with zero timings. This leads to
division by zero error.
This happens, for example, when a HDMI cable is not connected, but a
user tries to setup a plane with scaling.
Fixing omapdrm is a big job, so for now let's check for the bad timings
in DISPC and return an error.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
overlay setup functions to be called with zero timings. This leads to
division by zero error.
This happens, for example, when a HDMI cable is not connected, but a
user tries to setup a plane with scaling.
Fixing omapdrm is a big job, so for now let's check for the bad timings
in DISPC and return an error.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
drivers/video/fbdev/omap2/dss/dispc.c | patch | blob | history |
index 5aea698b8ad76c941187c982edc28a18f1135ba6..5f2bc849770bac4e459e93584a909b580b160e24 100644 (file)
if (width == out_width && height == out_height)
return 0;
+ if (pclk == 0 || mgr_timings->pixelclock == 0) {
+ DSSERR("cannot calculate scaling settings: pclk is zero\n");
+ return -EINVAL;
+ }
+
if ((caps & OMAP_DSS_OVL_CAP_SCALE) == 0)
return -EINVAL;