summaryrefslogtreecommitdiff
path: root/kms++/src/dumbframebuffer.cpp
AgeCommit message (Collapse)Author
2020-08-06dumbfb: Fix pitch for tri-planar formatsLaurent Pinchart
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>
2020-08-06dumbfb: Add support tri- or quadri-planar buffersLaurent Pinchart
The DumbFrameBuffer class supports up to 4 planes, as required by the DRM/KMS API, but only considers planes 0 and 1 when constructing the buffer. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-11-18fbs: use std::array and .at()Tomi Valkeinen
Use std::array and .at() to get bounds checking. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-11-06dumbfb: cleanup to avoid calls to virtual funcs via constructorTomi Valkeinen
2018-09-28Add include of <cerrno> to various filesAndrew F. Davis
This is needed for building with some version of some compilers where it is not automatically included with the existing include set (clang). Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-10-03Rework framebuffer classesTomi Valkeinen
Drop (I)MappedFramebuffer, as it doesn't really provide any value, and have most of the methods be present in IFramebuffer with default exception throwing implementation. This gives us simpler way to use the framebuffers, as almost always we can just use a pointer to IFramebuffer.
2016-11-21Add MappedFramebufferTomi Valkeinen
Add a base MappedFramebuffer class, which inherits Framebuffer and implements IMappedFramebuffer. This helps to implement platform specific framebuffer classes, like OmapFramebuffer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-11-03dumbfb: pass O_RDWR to drmPrimeHandleToFD()Tomi Valkeinen
This enables write access to the dumb fb with mmap(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-09-01Fix error printsTomi Valkeinen
2016-06-11kms++: organize into subdirsTomi Valkeinen