]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/omap: verify that display x-res is divisible by 8
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 5 Jan 2016 09:43:18 +0000 (11:43 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 3 Mar 2016 15:36:43 +0000 (17:36 +0200)
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>
drivers/gpu/drm/omapdrm/dss/dpi.c

index 7953e6a523463080fc22569bd89dc3f7918c6dc4..557cf3bdcc4e4e5ba3068217d3cc5d6c97155a93 100644 (file)
@@ -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;