summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-01-05 09:43:18 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 15:36:43 (GMT)
commit2158f2c7fe7638040034135e934f89cb2e018625 (patch)
treeff03e1f2ccfe3fb2f758978d9ae4832acde133bc
parentd31966ffd123e4bc3426af26855f77c2d3a70d2b (diff)
downloadlinux-2158f2c7fe7638040034135e934f89cb2e018625.tar.xz
drm/omap: verify that display x-res is divisible by 8
DISPC requires the x resolution to be divisible by 8 when stall mode is not used. Add a check to the DPI driver to verify this. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
index 7953e6a..557cf3b 100644
--- a/drivers/gpu/drm/omapdrm/dss/dpi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
@@ -513,6 +513,9 @@ static int dpi_check_timings(struct omap_dss_device *dssdev,
struct dpi_clk_calc_ctx ctx;
bool ok;
+ if (timings->x_res % 8 != 0)
+ return -EINVAL;
+
if (mgr && !dispc_mgr_timings_ok(mgr->id, timings))
return -EINVAL;