dumbfb: Fix pitch for tri-planar formats
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 6 Aug 2020 02:18:02 +0000 (05:18 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 10 Aug 2020 06:44:48 +0000 (09:44 +0300)
commite6babe71612cdb5e8d75dfcb8ad97e54e92b596d
treeaf89594d448e70e8f43a9d2b8b64b30b25c3f817
parent97aba6dc55aebf9ee61b71985cecc0ae90af756b
dumbfb: Fix pitch for tri-planar formats

The BO pitches are unconditionally set to the frame buffer pitch, for
all planes. This is correct for semiplanar YUV formats, as they
subsample chroma horizontally by two but combined U and V in a single
plane, cancelling each other. For fully planar YUV formats, however, the
horizontal subsampling need to be taken into account to compute the
pitch. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++/src/dumbframebuffer.cpp