提交 63871f71 编写于 作者: T Tomi Valkeinen

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: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
上级 6e4c6e60
...@@ -244,10 +244,7 @@ static inline int align_pitch(int pitch, int width, int bpp) ...@@ -244,10 +244,7 @@ static inline int align_pitch(int pitch, int width, int bpp)
int bytespp = (bpp + 7) / 8; int bytespp = (bpp + 7) / 8;
/* in case someone tries to feed us a completely bogus stride: */ /* in case someone tries to feed us a completely bogus stride: */
pitch = max(pitch, width * bytespp); pitch = max(pitch, width * bytespp);
/* PVR needs alignment to 8 pixels.. right now that is the most return pitch;
* restrictive stride requirement..
*/
return roundup(pitch, 8 * bytespp);
} }
/* map crtc to vblank mask */ /* map crtc to vblank mask */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册