]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: Make pitch even for GEM dumb alloc as per hardware constraint
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 23 Nov 2018 09:25:01 +0000 (10:25 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 27 Nov 2018 09:01:49 +0000 (10:01 +0100)
commitf5f8d1f8eaf59c95cc39a189c21fbb6f00b90330
treef3109cde15ba08e36b3b216f7fcdac22022c81a7
parentff484671a95eae8ef16c896eedb88e70bb34611a
drm/sun4i: Make pitch even for GEM dumb alloc as per hardware constraint

Our hardware requires the pitch to be an even number when using YUV
formats with the frontend. Implement a driver-specific callback for GEM
dumb allocation that sets the pitch accordingly.

Since only the bpp is passed (and not the format), we cannot really
distinguish if this alignment is really required. Since it doesn't hurt
to align the pitch anyway, always do it.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-30-paul.kocialkowski@bootlin.com
drivers/gpu/drm/sun4i/sun4i_drv.c