]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/omap: fix tiled buffer stride calculations
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 18 May 2017 08:51:51 +0000 (11:51 +0300)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:27 +0000 (21:36 -0400)
commitee434ab0065be95732a42d30bbcafed8910820a4
tree36930b4ae67d48d99331131591977c41b784a785
parentaba8f24a05d113f87c67d760ba1085e57d8f1417
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>
drivers/gpu/drm/omapdrm/omap_gem.c