diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-01-05 12:43:18 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-03-03 18:36:43 +0300 |
commit | 2158f2c7fe7638040034135e934f89cb2e018625 (patch) | |
tree | ff03e1f2ccfe3fb2f758978d9ae4832acde133bc /drivers | |
parent | d31966ffd123e4bc3426af26855f77c2d3a70d2b (diff) | |
download | linux-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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dpi.c | 3 |
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; |