]> git.baikalelectronics.ru Git - kernel.git/commit
drm/omap: fix align_pitch() for 24 bits per pixel
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 8 May 2015 10:32:31 +0000 (13:32 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 2 Jul 2015 12:58:06 +0000 (15:58 +0300)
commitd5c8244def00b08d8ff07e026f054bcd7f56419d
tree0c0f7238f48796678d3c7203e4073d949c8bdefa
parent516edd0bd13441ba6bb613c3e10476b5aac7c988
drm/omap: fix align_pitch() for 24 bits per pixel

align_pitch() uses ALIGN() to ensure the pitch is aligned to SGX's
requirement of 8 pixels. However, ALIGN() expects the alignment value to
be a power of two, which is not the case for 24 bits per pixels.

Use roundup() instead, which works for all alignments.

This fixes the error seen with 24 bits per pixel modes:

"buffer pitch (2176 bytes) is not a multiple of pixel size (3 bytes)"

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_drv.h