summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-01-05 11:43:18 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 17:36:43 +0200
commit2158f2c7fe7638040034135e934f89cb2e018625 (patch)
treeff03e1f2ccfe3fb2f758978d9ae4832acde133bc /drivers/gpu/drm/omapdrm/dss/dpi.c
parentd31966ffd123e4bc3426af26855f77c2d3a70d2b (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dpi.c')
-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 7953e6a52346..557cf3bdcc4e 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;