drm/omap: fix tiled buffer stride calculations
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 18 May 2017 08:51:51 +0000 (11:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:18 +0000 (19:48 +0200)
commit80c9698bd6a8f0385167c20eccd8d9dda25577a0
tree8bddedd5da6d5153758dab848a258c9bb2adc8cc
parent4581de2bfa6f8aeb03cd7bd28a2a4d6246b67c51
drm/omap: fix tiled buffer stride calculations

[ Upstream commit cc8dd7661ccc2d8dc88921da8e6cc7c2fcdb0341 ]

omap_gem uses page alignment for buffer stride. The related calculations
are a bit off, though, as byte stride of 4096 gets aligned to 8192,
instead of 4096.

This patch changes the code to use DIV_ROUND_UP(), which fixes those
calculations and makes them more readable.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/omapdrm/omap_gem.c