]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/omap: fix pitch round-up
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 19 Apr 2016 06:06:32 +0000 (09:06 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 6 Jun 2016 07:14:27 +0000 (10:14 +0300)
commitce481edad41098b535c15661e2e47a0934a24a7a
tree1bd71d6eb40430fbffe0e1975e354b807ffd9b45
parent6a5228fdf0a4636fdf5ce616c35264e0c0b26c7c
drm/omap: fix pitch round-up

At the moment we calculate the buffer's pitch with:

  pitch = width * DIV_ROUND_UP(bpp, 8)

For CLUT modes with bpp of 1/2/4/8 this gives wrong result, and the
correct pitch is:

  pitch = DIV_ROUND_UP(width * bpp, 8)

In practice this doesn't change anything, as we don't support CLUT
modes, but it's better to have the pitch calculation correct.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/omapdrm/omap_fbdev.c
drivers/gpu/drm/omapdrm/omap_gem.c