From: Tomi Valkeinen Date: Tue, 5 Jan 2016 09:43:18 +0000 (+0200) Subject: drm/omap: verify that display x-res is divisible by 8 X-Git-Tag: next-20160307~69^2^2~49 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2158f2c7fe7638040034135e934f89cb2e018625;p=karo-tx-linux.git 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 Acked-by: Laurent Pinchart --- 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;