]> git.baikalelectronics.ru Git - kernel.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)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 08:09:34 +0000 (11:09 +0300)
commit58b07ad4dce2e315d6809871b47ec2c1375a942c
tree3e9ab4618982c864b93d0aadac8cfed39961c0e0
parent13f4a56d77b2f28cad35fa43e6ed9481b4472331
drm/omap: fix tiled buffer stride calculations

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>
drivers/gpu/drm/omapdrm/omap_gem.c