summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-04-18 18:11:29 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-06 10:14:27 +0300
commit63871f713e7d20446ba751ece14a2ba8f3f97d1d (patch)
treebe4a742a3e6cda956a9f0f86042e8e79fe1746ba /drivers/gpu/drm/omapdrm/omap_drv.h
parent6e4c6e6011b7abd7a42e9c308b60838b151ad68e (diff)
downloadlinux-63871f713e7d20446ba751ece14a2ba8f3f97d1d.tar.bz2
drm/omap: remove unnecessary pitch round-up
omapdrm checks if the pixel stride is divisible by 8. This is meant to ensure that the byte stride is 32, which is required by SGX. The check is not correct, as it checks for pixels, not bytes, and thus needlessly increases the stride for, e.g., NV12. Also, SGX driver is not supported in the mainline, and the TI's SGX driver nowadays does the memory allocation itself and doesn't rely on omapdrm to figure out the correct pitch. So we can just remove the whole roundup. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.h')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 3f823c368912..edc796fc8279 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -244,10 +244,7 @@ static inline int align_pitch(int pitch, int width, int bpp)
int bytespp = (bpp + 7) / 8;
/* in case someone tries to feed us a completely bogus stride: */
pitch = max(pitch, width * bytespp);
- /* PVR needs alignment to 8 pixels.. right now that is the most
- * restrictive stride requirement..
- */
- return roundup(pitch, 8 * bytespp);
+ return pitch;
}
/* map crtc to vblank mask */