kmscube: fix X11 fullscreen
cmake: set C_FLAGS too
py: Add OmapCard & OmapFramebuffer support
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py: Add MappedFramebuffer and use it
Add MappedFramebuffer to python bindings and use it for the draw
functions.
Looks like recent pybind11 versions have better multi-inheritance
support, so all this need to be revisited after updating pybind11.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add MappedFramebuffer to python bindings and use it for the draw
functions.
Looks like recent pybind11 versions have better multi-inheritance
support, so all this need to be revisited after updating pybind11.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add OmapCard and OmapFramebuffer
Add OmapCard and OmapFramebuffer classes to utilize omap_bos. Only
non-tiled framebuffer is implemented for now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add OmapCard and OmapFramebuffer classes to utilize omap_bos. Only
non-tiled framebuffer is implemented for now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmstest: use MappedFramebuffer
Use MappedFramebuffer instead of DumbFramebuffer in kmstest, except when
creating the object. This change makes it possible to easily use other
framebuffer objects in kmstest than DumbFramebuffer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Use MappedFramebuffer instead of DumbFramebuffer in kmstest, except when
creating the object. This change makes it possible to easily use other
framebuffer objects in kmstest than DumbFramebuffer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add MappedFramebuffer
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>
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>
dumbfb: pass O_RDWR to drmPrimeHandleToFD()
This enables write access to the dumb fb with mmap().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This enables write access to the dumb fb with mmap().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
modedb_dmt: update table
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add DMT script
Add script to auto-generate DMT tables.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add script to auto-generate DMT tables.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmstest: be explicit about mode selection
Instead of searching through the dmt and cea tables (if user has given
the option), lets be more explicit about it. Only look for the mode from
a single source, and fail if not found there.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Instead of searching through the dmt and cea tables (if user has given
the option), lets be more explicit about it. Only look for the mode from
a single source, and fail if not found there.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmstest: add --cvt option
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++: add videomode_from_cvt()
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add comment about ilace
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Travis: only build master & travis
Travis: use VERBOSE=1
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Travis: set -Wno-maybe-uninitialized for gcc-4.9
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Travis: treat warnings as errors
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add cmake option for -Werror
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
travis: add my email
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
remove -rdynamic gcc flag
This reduces the exe sizes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This reduces the exe sizes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
travis: improve .travis.yml
Travis: test different gcc versions
kmstest: enable display even if crtc doesn't have fb
With atomic modesetting we can enable the crtc without a primary plane.
This allows enabling only a plane on the screen.
Change set_crtcs_n_planes() to allow this.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
With atomic modesetting we can enable the crtc without a primary plane.
This allows enabling only a plane on the screen.
Change set_crtcs_n_planes() to allow this.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
README: travis icon
travis: enable kmscube
Add Travis CI
Improve mode finding
Change calculated_vrefresh to round to 2 decimals, and do two rounds
when looking for a mode: first look for exact vrefresh match, then look
for rounded match.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Change calculated_vrefresh to round to 2 decimals, and do two rounds
when looking for a mode: first look for exact vrefresh match, then look
for rounded match.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Improve LTO detection code
Split LTO detection into separate func and file, and create a cached
LTO_WORKS variable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Split LTO detection into separate func and file, and create a cached
LTO_WORKS variable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Fix LTO detection
Catch gcc-ar and gcc-ranlib versions compiled without plugin support and
disable LTO in that case.
Also do the LTO check only once by checking if HAS_LTO_FLAG has been set.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Catch gcc-ar and gcc-ranlib versions compiled without plugin support and
disable LTO in that case.
Also do the LTO check only once by checking if HAS_LTO_FLAG has been set.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmsprint: fix prints
Card: virtual destructor
Add virtual destructor so Card can be inherited.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add virtual destructor so Card can be inherited.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmatest: add custom videomode support
Support custom videomodes when specifying a crtc.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Support custom videomodes when specifying a crtc.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
kmatest: split regex strings to multiple lines
Split regex strings to multiple lines to make them slightly more
readable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Split regex strings to multiple lines to make them slightly more
readable.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Improve struct Videomode
Enable set/get for sync polarities and interlace. Add
videomode_from_timings() helper to construct Videomode from non-X
timings.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Enable set/get for sync polarities and interlace. Add
videomode_from_timings() helper to construct Videomode from non-X
timings.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmsprint: improve property enum prints
Fix error prints
Fix LTO support for cross-compilation.
When cross-compiling, the ar and ranlib to be used for LTO are prefixed
by the cross-tuple. gcc-ar and gcc-ranlib may not exist. Cfr.
http://autobuild.buildroot.net/results/f3c/f3c48da3a9706cd366c0e0a96c3cd0ff959f2a78/
Therefore, search for an appropriate lto-ar and lto-ranlib before
enabling LTO.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
When cross-compiling, the ar and ranlib to be used for LTO are prefixed
by the cross-tuple. gcc-ar and gcc-ranlib may not exist. Cfr.
http://autobuild.buildroot.net/results/f3c/f3c48da3a9706cd366c0e0a96c3cd0ff959f2a78/
Therefore, search for an appropriate lto-ar and lto-ranlib before
enabling LTO.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
kmstest: rename remaining references to testpat
rename testpat and fbtestpat
Merge branch 'master' of git://github.com/jsarha/kmsxx
Fix byte order of 24-bit formats.
Add missing BGR color formats to draw_test_pattern_part().
AtomicReq: add add_display() helper
ResourceManager: add card()
support finding fractional vrefresh
modedb: fix vrefresh for ilace
testpat & kmsprint: improve mode prints
ExtCPUFramebuffer: add size and offset params
Add size and offset params to ExtCPUFramebuffer, so that we can fix
fbtestpat's test pattern size on larger virtual fbdevs.
Add size and offset params to ExtCPUFramebuffer, so that we can fix
fbtestpat's test pattern size on larger virtual fbdevs.
fbtestpat: remove extra leftover memcpy
add basic cmake install system
Merge branch 'master' of git://github.com/jsarha/kmsxx
Add BGR888 (BG24) and BGR565 (BG16) pixelformats.
Note colorbar does not support 24 bit modes (RGB888 or BGR888) yet.
Note colorbar does not support 24 bit modes (RGB888 or BGR888) yet.
Merge branch 'yem/musl' of git://github.com/yann-morin-1998/kmsxx
utils: select() et al. need <sys/select.h>
Although indirectly included by way of other headers with glibc and
uClibc, using any of the select()-class familly of functions or macros
requires including <sys/select.h>.
This fixes the build under musl, which is way more conservative in the
ehaders that are included one-from-the-others (k.e. as few as possible).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Although indirectly included by way of other headers with glibc and
uClibc, using any of the select()-class familly of functions or macros
requires including <sys/select.h>.
This fixes the build under musl, which is way more conservative in the
ehaders that are included one-from-the-others (k.e. as few as possible).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
kms++-util: portability fix
__STRING(x) is a glibcism (i.e. it is non-standard), that happens to be
also available with uClibc, but is not with musl.
Define it if not already defined, using the same trivial definition as
is done by both glibg and uClibc.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
__STRING(x) is a glibcism (i.e. it is non-standard), that happens to be
also available with uClibc, but is not with musl.
Define it if not already defined, using the same trivial definition as
is done by both glibg and uClibc.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
fbtestpat: draw "/dev/fb0" text
Fix property name lookup
Object types can have different properties with the same name, so we
need to move name-based property lookup from Card to DrmPropObject.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Object types can have different properties with the same name, so we
need to move name-based property lookup from Card to DrmPropObject.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
README: add notes about custom toolchainfile
kms++: fix AtomicReq compilation
4fb69b7d20e90746855de122422ac9cabd78f66f ("kms++: use DrmPropObject in
AtomicReq") made AtomicReq::add() use a not-yet-implemented method.
Fix this by changing that line back.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
4fb69b7d20e90746855de122422ac9cabd78f66f ("kms++: use DrmPropObject in
AtomicReq") made AtomicReq::add() use a not-yet-implemented method.
Fix this by changing that line back.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Add missing <system_error> includes
Missing <system_error> breaks compliation on gcc 4.9.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Missing <system_error> breaks compliation on gcc 4.9.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py: fix AtomicReq's add()
"kms++: use DrmPropObject in AtomicReq" forgot to update py bindings.
Fix this.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
"kms++: use DrmPropObject in AtomicReq" forgot to update py bindings.
Fix this.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kmsprint: Include cinttypes instead of inttypes.h
cinttypes is the right C++ header, and doesn't require source files to
define __STDC_FORMAT_MACROS to get the integer type format macros.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
cinttypes is the right C++ header, and doesn't require source files to
define __STDC_FORMAT_MACROS to get the integer type format macros.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++: use DrmPropObject in AtomicReq
The objects to which we set properties with AtomicReq must have
properties, so they are DrmPropObjects instead of DrmObjects.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
The objects to which we set properties with AtomicReq must have
properties, so they are DrmPropObjects instead of DrmObjects.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++: update decls.h
Sort the declarations and add DrmPropObject.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Sort the declarations and add DrmPropObject.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
py: Expose the Connector::get_mode methods
Those methods are useful in Python scripts, expose them through the
bindings.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Those methods are useful in Python scripts, expose them through the
bindings.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Merge V4L2 related work
Framebuffer: don't crash is drmModeGetFB() returns 0
Add Framebuffer::flush()
kmscube: use drmModeAddFB2 version of ExtFB
utils: add wbm2m
utils: add wbcap
py: add cam.py
py: add pyvid
kmsutils: add VideoDevice
kmsview: use resman
py: use ResourceManager
add ResourceManager
Support RGB888
draw_text: support YUV modes
py: add missing pixelformats
py: PixelFormat & DumbFB impro
gitignore: add pycache
kms++util: split to subdirs
kms++: organize into subdirs
cmake: results to bin & lib dirs
rename libkms to kms++
cmake: add option to build shared libs
rename dirs
kmsprint: print plane formats
py: fix scripts when there's no current crtc
util: add simple text drawing
util: refactor drawing functions
kmsview: small improvements
Make py/gamma.py executable.
py/gamma.py: Make gamma table calculations more generic
testpat: use new id/idx resolving
Property: remove now unused to_str()
kmsprint: rewrite kmsprint
add kmsblank app