renesas/kmsxx.git
4 months agoutils: Add a dump_framebuffer() method master
Laurent Pinchart [Sun, 16 Jun 2019 23:34:29 +0000 (02:34 +0300)]
utils: Add a dump_framebuffer() method

Add a new method to write the contents of a framebuffer to a file
descriptor. This can be used to capture frames from writeback
connectors.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 months agocard: Add support for writeback connectors
Laurent Pinchart [Sun, 16 Jun 2019 23:31:28 +0000 (02:31 +0300)]
card: Add support for writeback connectors

Enable enumeration of writeback connectors if both libdrm and the device
support it. The new Card::has_writeback() method report if the card
support writeback connectors.

Existing code that expect all connectors to model an output may be
confused by the sudden availability of new connectors. To handle this
issue,

- add a KMSXX_DISABLE_WRITEBACK_CONNECTORS environment variable to
  disable enumeration of writeback connectors, similarly to universal
  planes ; and

- ignore writeback connectors where no specific connector is requested
  (Card::get_first_connected_connector(),
  ResourceManager::reserve_connector() if no connector name is
  specified, and applications that use all connected outputs).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 months agomeson: drop unused system-pybind11 option
Tomi Valkeinen [Sun, 8 Aug 2021 18:10:08 +0000 (21:10 +0300)]
meson: drop unused system-pybind11 option

system-pybind11 is no longer used and can be removed.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
5 months agomeson: simplify pybind dependency handling
Tomi Valkeinen [Fri, 6 Aug 2021 10:06:14 +0000 (13:06 +0300)]
meson: simplify pybind dependency handling

6 months agoMerge pull request #63 from notro/gud
Tomi Valkeinen [Mon, 26 Jul 2021 07:42:48 +0000 (10:42 +0300)]
Merge pull request #63 from notro/gud

Add partial fb flushing and expose some more properties in the python bindings

6 months agopy: Property: Add type, enums, values, and __repr__
Noralf Trønnes [Mon, 19 Jul 2021 16:20:58 +0000 (18:20 +0200)]
py: Property: Add type, enums, values, and __repr__

Also add PropertyType which is used by the type property.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
6 months agopy: Card: Add .properties
Noralf Trønnes [Mon, 19 Jul 2021 16:18:46 +0000 (18:18 +0200)]
py: Card: Add .properties

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
6 months agopy: Framebuffer: Add flush and __repr__
Noralf Trønnes [Mon, 19 Jul 2021 16:17:54 +0000 (18:17 +0200)]
py: Framebuffer: Add flush and __repr__

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
6 months agoframebuffer: Support partial flushing
Noralf Trønnes [Mon, 19 Jul 2021 16:13:09 +0000 (18:13 +0200)]
framebuffer: Support partial flushing

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
10 months agoAdd so version numbers to libraries
Tomi Valkeinen [Fri, 26 Mar 2021 07:00:47 +0000 (09:00 +0200)]
Add so version numbers to libraries

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
12 months agopy: add fourcc_to_pixelformat
Tomi Valkeinen [Thu, 14 Jan 2021 06:49:01 +0000 (08:49 +0200)]
py: add fourcc_to_pixelformat

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
13 months agomeson: split "utils" option into libutils and utils
Tomi Valkeinen [Fri, 18 Dec 2020 13:01:45 +0000 (15:01 +0200)]
meson: split "utils" option into libutils and utils

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
13 months agoRemove CMake support
Tomi Valkeinen [Wed, 16 Dec 2020 13:14:13 +0000 (15:14 +0200)]
Remove CMake support

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
13 months agoRemove pybind11 git submodule
Tomi Valkeinen [Wed, 16 Dec 2020 07:08:18 +0000 (09:08 +0200)]
Remove pybind11 git submodule

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agomeson: add option to use system pybind11 or subproject
Tomi Valkeinen [Wed, 16 Dec 2020 07:18:24 +0000 (09:18 +0200)]
meson: add option to use system pybind11 or subproject

Add 'system-pybind11' option.

enabled = use pybind11 from the system
disabled = use pybind11 from meson subproject
auto = use pybind11 from the system, or, if not available, subproject

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agoAdd meson subproject wrap for pybind 2.6.0
Tomi Valkeinen [Wed, 16 Dec 2020 07:07:33 +0000 (09:07 +0200)]
Add meson subproject wrap for pybind 2.6.0

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agomeson_options: add descriptions and reorganize
Tomi Valkeinen [Wed, 16 Dec 2020 08:05:37 +0000 (10:05 +0200)]
meson_options: add descriptions and reorganize

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agoUse system libfmt
Tomi Valkeinen [Tue, 1 Dec 2020 09:25:52 +0000 (11:25 +0200)]
Use system libfmt

libfmt is available on standard PC distros and on buildroot, so lets
just use the system provided libfmt instead of a git submodule.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agogamma.py: support legacy & non-legacy gamma
Tomi Valkeinen [Thu, 3 Dec 2020 09:32:35 +0000 (11:32 +0200)]
gamma.py: support legacy & non-legacy gamma

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agocrtc: add legacy gamma set
Tomi Valkeinen [Thu, 3 Dec 2020 09:31:24 +0000 (11:31 +0200)]
crtc: add legacy gamma set

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agoatomicreq: throw on non-existing property
Tomi Valkeinen [Thu, 3 Dec 2020 09:10:52 +0000 (11:10 +0200)]
atomicreq: throw on non-existing property

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 months agoFix clang-tidy reported issues
Tomi Valkeinen [Tue, 1 Dec 2020 07:14:19 +0000 (09:14 +0200)]
Fix clang-tidy reported issues

13 months agoAdd .clang-tidy
Tomi Valkeinen [Tue, 1 Dec 2020 07:00:54 +0000 (09:00 +0200)]
Add .clang-tidy

15 months agopy: add -fvisibility=hidden
Tomi Valkeinen [Tue, 20 Oct 2020 17:28:29 +0000 (20:28 +0300)]
py: add -fvisibility=hidden

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agomeson: fix build with thread support
Tomi Valkeinen [Tue, 20 Oct 2020 13:50:55 +0000 (16:50 +0300)]
meson: fix build with thread support

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agomeson: add 'util' option to disable kms++util and utils
Tomi Valkeinen [Tue, 20 Oct 2020 13:34:57 +0000 (16:34 +0300)]
meson: add 'util' option to disable kms++util and utils

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agorename omap wb utils to omap-wb
Tomi Valkeinen [Wed, 7 Oct 2020 12:29:39 +0000 (15:29 +0300)]
rename omap wb utils to omap-wb

15 months agoBulk format of all files
Tomi Valkeinen [Wed, 7 Oct 2020 05:58:35 +0000 (08:58 +0300)]
Bulk format of all files

15 months agoAdd .clang-format and format-all script
Tomi Valkeinen [Wed, 7 Oct 2020 05:49:33 +0000 (08:49 +0300)]
Add .clang-format and format-all script

15 months agogitignore: add *.pyc
Tomi Valkeinen [Wed, 7 Oct 2020 05:49:17 +0000 (08:49 +0300)]
gitignore: add *.pyc

15 months agodmabuffb: add constructor which takes in string fourcc
Tomi Valkeinen [Wed, 7 Oct 2020 05:43:10 +0000 (08:43 +0300)]
dmabuffb: add constructor which takes in string fourcc

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agoMerge pull request #59 from virusxp/gcc10_compability
Tomi Valkeinen [Fri, 9 Oct 2020 07:04:52 +0000 (10:04 +0300)]
Merge pull request #59 from virusxp/gcc10_compability

added #include <string> to card.h to follow gcc10 porting guide

15 months agoadded #include <string> to card.h to follow gcc10 porting guide
Tobias Off [Thu, 8 Oct 2020 20:37:55 +0000 (22:37 +0200)]
added #include <string> to card.h to follow gcc10 porting guide

15 months agopy: move framebuffer functions to correct place
Tomi Valkeinen [Sat, 3 Oct 2020 07:33:14 +0000 (10:33 +0300)]
py: move framebuffer functions to correct place

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agoSmall Property improvements
Tomi Valkeinen [Fri, 2 Oct 2020 11:46:33 +0000 (14:46 +0300)]
Small Property improvements

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agomeson.build: add static-libc option
Tomi Valkeinen [Tue, 29 Sep 2020 13:43:35 +0000 (16:43 +0300)]
meson.build: add static-libc option

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
15 months agoFix Plane::get_possible_crtcs
Tomi Valkeinen [Tue, 29 Sep 2020 12:42:09 +0000 (15:42 +0300)]
Fix Plane::get_possible_crtcs

Looks like RPi gives 0xff as possible_crtcs, even if there's only one
crtc. The current code throws an exception in that case.

Fix this by just ignoring non-existent possible crtcs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoUpdate README for meson build
Tomi Valkeinen [Mon, 7 Sep 2020 06:04:58 +0000 (09:04 +0300)]
Update README for meson build

16 months agoChange travis to use meson
Tomi Valkeinen [Sat, 5 Sep 2020 13:31:33 +0000 (16:31 +0300)]
Change travis to use meson

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoAdd meson build
Tomi Valkeinen [Sat, 5 Sep 2020 07:54:18 +0000 (10:54 +0300)]
Add meson build

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoRename esTransform.c to .cpp
Tomi Valkeinen [Mon, 14 Sep 2020 08:07:09 +0000 (11:07 +0300)]
Rename esTransform.c to .cpp

This was the only C file in the project, so now we're "pure" c++.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoTravis: add llvm-dev packages to add gold linker
Tomi Valkeinen [Sat, 5 Sep 2020 17:18:30 +0000 (20:18 +0300)]
Travis: add llvm-dev packages to add gold linker

16 months agoMove to c++17
Tomi Valkeinen [Sat, 5 Sep 2020 06:04:30 +0000 (09:04 +0300)]
Move to c++17

It's time.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoUpdate travis to ubuntu 20.04
Tomi Valkeinen [Sat, 5 Sep 2020 14:24:06 +0000 (17:24 +0300)]
Update travis to ubuntu 20.04

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agoDrop python2
Tomi Valkeinen [Sat, 5 Sep 2020 06:06:04 +0000 (09:06 +0300)]
Drop python2

I don't think python2 even works with kms++.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
16 months agokmscapture: remove unneeded xf86drm.h include
Tomi Valkeinen [Sat, 5 Sep 2020 07:11:14 +0000 (10:11 +0300)]
kmscapture: remove unneeded xf86drm.h include

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agokms++: Add support for missing 8 -and 16-bit RGB formats
Laurent Pinchart [Thu, 6 Aug 2020 02:18:06 +0000 (05:18 +0300)]
kms++: Add support for missing 8 -and 16-bit RGB formats

Add support for the RGB332, XRGB1555 and XRGB4444 formats to the
PixelFormat class, the Python API, and the drawing utilities.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agokms++: Add support for the planar YUV formats
Laurent Pinchart [Thu, 6 Aug 2020 02:18:05 +0000 (05:18 +0300)]
kms++: Add support for the planar YUV formats

Add support for the 6 planar YUV formats (YUV and YVU, combined with
420, 422 or 444 subsampling) to the PixelFormat class, the Python API,
and the drawing utilities.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agokms++: Add support for semiplanar YUV422 formats (NV16 and NV61)
Laurent Pinchart [Thu, 6 Aug 2020 02:18:04 +0000 (05:18 +0300)]
kms++: Add support for semiplanar YUV422 formats (NV16 and NV61)

Add support for the NV16 and NV61 pixel formats to the PixelFormat
class, the Python API, and the drawing utilities.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agopykmsbase: Add missing pixel formats
Laurent Pinchart [Thu, 6 Aug 2020 02:18:03 +0000 (05:18 +0300)]
pykmsbase: Add missing pixel formats

Several pixel formats defined in the C++ PixelFormat class are missing
from the Python API. Add them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agodumbfb: Fix pitch for tri-planar formats
Laurent Pinchart [Thu, 6 Aug 2020 02:18:02 +0000 (05:18 +0300)]
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>
17 months agodumbfb: Add support tri- or quadri-planar buffers
Laurent Pinchart [Thu, 6 Aug 2020 02:18:01 +0000 (05:18 +0300)]
dumbfb: Add support tri- or quadri-planar buffers

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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agocard: Rename has_has_universal_planes to has_universal_planes
Laurent Pinchart [Thu, 6 Aug 2020 02:18:00 +0000 (05:18 +0300)]
card: Rename has_has_universal_planes to has_universal_planes

The has_has_universal_planes() method name includes a typo, fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agocard: Add a method to retrieve the device minor
Laurent Pinchart [Thu, 6 Aug 2020 02:17:59 +0000 (05:17 +0300)]
card: Add a method to retrieve the device minor

The device minor number is needed to access the debugfs directory
corresponding to the device. Make it available to users through a
dev_minor() method on the Card object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
17 months agoMerge pull request #57 from dreamer-dead/videodevice-unique-ptr
Tomi Valkeinen [Tue, 4 Aug 2020 08:30:56 +0000 (11:30 +0300)]
Merge pull request #57 from dreamer-dead/videodevice-unique-ptr

Use unique_ptr to prevent memory leaks in VideoDevice class

18 months agoUse unique_ptr to prevent memory leaks in VideoDevice class
dreamer.dead [Fri, 24 Jul 2020 07:20:31 +0000 (07:20 +0000)]
Use unique_ptr to prevent memory leaks in VideoDevice class

20 months agoMerge pull request #56 from matthoosier-garmin/more-card-constructors
Tomi Valkeinen [Thu, 28 May 2020 19:18:22 +0000 (22:18 +0300)]
Merge pull request #56 from matthoosier-garmin/more-card-constructors

More card constructors

20 months agocard: add factory function for selecting card by name
Matt Hoosier [Wed, 27 May 2020 20:29:00 +0000 (15:29 -0500)]
card: add factory function for selecting card by name

Uses drmOpen() to do the heavy lifting.

20 months agocard: add constructor for pre-opened FD
Matt Hoosier [Wed, 27 May 2020 20:28:23 +0000 (15:28 -0500)]
card: add constructor for pre-opened FD

This is an escape hatch to let the user do whatever crazy thing he
wants to obtain the DRM fd. This could be from a DRM lease, an FD
passed across a Wayland protocol request, something calculated by
manually walking across the set of DRI cards and selecting specific
criteria, etc.

20 months agoMerge pull request #54 from ilteroi/gcc10
Tomi Valkeinen [Sun, 17 May 2020 18:39:15 +0000 (21:39 +0300)]
Merge pull request #54 from ilteroi/gcc10

fix compiler errors with gcc 10

20 months agoMerge pull request #53 from matthoosier-garmin/resmgr-release-methods
Tomi Valkeinen [Sun, 17 May 2020 18:36:59 +0000 (21:36 +0300)]
Merge pull request #53 from matthoosier-garmin/resmgr-release-methods

resmgr: add release() methods

20 months agofix compiler errors with gcc 10
Peter Trompeter [Fri, 15 May 2020 13:20:47 +0000 (15:20 +0200)]
fix compiler errors with gcc 10

20 months agoresmgr: add release() methods
Matt Hoosier [Tue, 12 May 2020 19:49:40 +0000 (14:49 -0500)]
resmgr: add release() methods

This makes the ResourceManager class much more functional
for uses where the set of resources used to scan out a
scene changes from frame to frame. The atomic modesetting
API discipline requires a brute-force search to find a
compatible pairing of planes/etc, and being able to reserve
bits incrementally is much simpler than throwing out the
entire resourcemanager and make a new one each time a
resource reserved in a tentative attempt to probe its
compatibility with an test-mode atomic commit, turns out not
to pan out.

20 months agokmstest: allow enabling output without anything connected
Tomi Valkeinen [Fri, 15 May 2020 08:08:03 +0000 (11:08 +0300)]
kmstest: allow enabling output without anything connected

Allow kmstest to enable an output without anything connected, if the
user gives a videomode. DRM framework allows this, and is needed for
testing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
21 months agopy/cam.py: get w & h from cmdline
Tomi Valkeinen [Wed, 11 Mar 2020 07:48:10 +0000 (09:48 +0200)]
py/cam.py: get w & h from cmdline

21 months agokmstest: add crc16 print
Tomi Valkeinen [Mon, 28 Oct 2019 12:01:52 +0000 (14:01 +0200)]
kmstest: add crc16 print

Add an option to print crc16 for the framebuffer contents.

21 months agoAdd simple kmstouch test tool
Tomi Valkeinen [Mon, 25 Jun 2018 08:48:30 +0000 (11:48 +0300)]
Add simple kmstouch test tool

Only single touch supported, and pretty naive implementation.

21 months agokmsprint: use Videomode::to_string_long
Tomi Valkeinen [Fri, 17 Apr 2020 06:45:48 +0000 (09:45 +0300)]
kmsprint: use Videomode::to_string_long

21 months agovideodevice: use exception to catch bad fd
Tomi Valkeinen [Wed, 11 Mar 2020 07:56:36 +0000 (09:56 +0200)]
videodevice: use exception to catch bad fd

21 months agoMerge pull request #52 from hhb/master
Tomi Valkeinen [Tue, 7 Apr 2020 05:39:46 +0000 (08:39 +0300)]
Merge pull request #52 from hhb/master

Include array

21 months agoInclude array
Haibo Huang [Thu, 2 Apr 2020 21:37:17 +0000 (14:37 -0700)]
Include array

22 months agoMerge pull request #51 from matthoosier-garmin/make-pkgconfig-files
Tomi Valkeinen [Wed, 4 Mar 2020 17:50:58 +0000 (19:50 +0200)]
Merge pull request #51 from matthoosier-garmin/make-pkgconfig-files

Supply pkg-config files

22 months agoSupply pkg-config files
Matt Hoosier [Tue, 3 Mar 2020 15:25:25 +0000 (09:25 -0600)]
Supply pkg-config files

These are customary, and pretty straightforward to offer.

23 months agoMerge pull request #50 from jsarha/py-tests-tidss-updates-v3
Tomi Valkeinen [Fri, 14 Feb 2020 11:29:43 +0000 (13:29 +0200)]
Merge pull request #50 from jsarha/py-tests-tidss-updates-v3

Py tests tidss updates v3

23 months agoglobal_alpha_test.py: Updates for tidss
Jyri Sarha [Mon, 10 Feb 2020 10:16:45 +0000 (12:16 +0200)]
global_alpha_test.py: Updates for tidss

23 months agoalpha-test.py: Updates for tidss
Jyri Sarha [Mon, 10 Feb 2020 10:15:09 +0000 (12:15 +0200)]
alpha-test.py: Updates for tidss

23 months agoctm_test.py: Updates for tidss
Jyri Sarha [Tue, 26 Feb 2019 12:44:33 +0000 (14:44 +0200)]
ctm_test.py: Updates for tidss

23 months agoPixelFormats: cast to uin32_t
Tomi Valkeinen [Tue, 10 Dec 2019 07:56:29 +0000 (09:56 +0200)]
PixelFormats: cast to uin32_t

PixelFormat is an uint32_t underneath, so use that type instead of int
when casting.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
23 months agoimprove hpd.py
Tomi Valkeinen [Mon, 9 Dec 2019 13:07:48 +0000 (15:07 +0200)]
improve hpd.py

2 years agoMerge pull request #47 from matthoosier-garmin/libfmt-headers-only
Tomi Valkeinen [Sun, 19 Jan 2020 17:00:20 +0000 (19:00 +0200)]
Merge pull request #47 from matthoosier-garmin/libfmt-headers-only

Link libfmt in header-only mode

2 years agoLink libfmt in header-only mode
Matt Hoosier [Thu, 16 Jan 2020 19:31:38 +0000 (13:31 -0600)]
Link libfmt in header-only mode

This saves us the trouble of having a copy of its shared library
installed into the target filesystem, which would conflict with
an independently packaged copy.

Only the headers are needed to accomplish the usages that Kms++
makes.

2 years agoAdd configure-time option to disable libdrm-omap usage
Matt Hoosier [Tue, 19 Nov 2019 12:28:07 +0000 (06:28 -0600)]
Add configure-time option to disable libdrm-omap usage

Add an build option to allow explicitly shutting off libdrm-omap
features. This is useful for packaging situations to prevent
accidental unexpected features.

To deactivate the drm-omap specific functionality that was activated
unconditionally if present until now, use:

    cmake -DKMSXX_ENABLE_LIBDRMOMAP=OFF

Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
2 years agoSet a dummy version number on the shared libraries
Matt Hoosier [Tue, 19 Nov 2019 10:51:05 +0000 (04:51 -0600)]
Set a dummy version number on the shared libraries

This makes package managers happier when the software is built
as a dynamic-library.

Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
2 years agoAllow making extframebuffer and dmabufframebuffer with modifiers
Matt Hoosier [Fri, 15 Nov 2019 20:35:50 +0000 (14:35 -0600)]
Allow making extframebuffer and dmabufframebuffer with modifiers

Many GPUs use bandwidth compression or tiling, and this information
must be passed along to KMS when constructing the framebuffer object
around the GEM handle or prime filedescriptor.

Add an vector of modifiers as an optional parameter to both of these
classes.

Bump the minimum required version of libdrm to 2.4.17 to ensure
drmModeAddFB2WithModifiers() is available.

Signed-off-by: Matt Hoosier <matt.hoosier@garmin.com>
2 years agofbs: use std::array and .at()
Tomi Valkeinen [Mon, 18 Nov 2019 10:07:36 +0000 (12:07 +0200)]
fbs: use std::array and .at()

Use std::array and .at() to get bounds checking.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2 years agofbs: check params and ensure drmModeAddFB2 is passed correctly sized arrays
Tomi Valkeinen [Mon, 18 Nov 2019 10:07:11 +0000 (12:07 +0200)]
fbs: check params and ensure drmModeAddFB2 is passed correctly sized arrays

Check that parameter vectors are of the same size, and match the number
of planes.

Extend the vectors to 4, as drmModeAddFB2() expects to get arrays of 4
elements.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Matt Hoosier <matt.hoosier@garmin.com>
2 years agoMerge pull request #40 from tomba/work
Tomi Valkeinen [Wed, 6 Nov 2019 15:28:56 +0000 (17:28 +0200)]
Merge pull request #40 from tomba/work

Misc improvements

2 years agokms++: modernize deprecated headers
Tomi Valkeinen [Wed, 6 Nov 2019 13:51:39 +0000 (15:51 +0200)]
kms++: modernize deprecated headers

2 years agokms++: use 'override' all around
Tomi Valkeinen [Wed, 6 Nov 2019 13:43:19 +0000 (15:43 +0200)]
kms++: use 'override' all around

2 years agocard: remove useless consts
Tomi Valkeinen [Wed, 6 Nov 2019 13:31:32 +0000 (15:31 +0200)]
card: remove useless consts

2 years agopykmsbase: upgrade Blob __init__ to fix deprecation warning
Tomi Valkeinen [Wed, 6 Nov 2019 13:26:15 +0000 (15:26 +0200)]
pykmsbase: upgrade Blob __init__ to fix deprecation warning

2 years agodumbfb: cleanup to avoid calls to virtual funcs via constructor
Tomi Valkeinen [Wed, 6 Nov 2019 13:13:41 +0000 (15:13 +0200)]
dumbfb: cleanup to avoid calls to virtual funcs via constructor

2 years agofb: add begin_cpu_access & end_cpu_access
Tomi Valkeinen [Wed, 6 Nov 2019 09:38:37 +0000 (11:38 +0200)]
fb: add begin_cpu_access & end_cpu_access

2 years agoSplit dmabuf support from ExtFramebuffer into DmabufFramebuffer
Tomi Valkeinen [Wed, 6 Nov 2019 09:29:32 +0000 (11:29 +0200)]
Split dmabuf support from ExtFramebuffer into DmabufFramebuffer

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2 years agoextframebuffer: add missing include
Tomi Valkeinen [Wed, 6 Nov 2019 09:04:21 +0000 (11:04 +0200)]
extframebuffer: add missing include

2 years agoMerge pull request #39 from dreamer-dead/fix-delete-operator-upstream
Tomi Valkeinen [Wed, 6 Nov 2019 14:03:31 +0000 (16:03 +0200)]
Merge pull request #39 from dreamer-dead/fix-delete-operator-upstream

Use correct operator delete[] to free buffers in CPUFramebuffer

2 years agoUse [] operator delete to free CPUFramebuffer buffers
dreamer.dead [Wed, 6 Nov 2019 12:04:54 +0000 (15:04 +0300)]
Use [] operator delete to free CPUFramebuffer buffers

2 years agokmsmodeview.py: update to current kms++ api
Tomi Valkeinen [Mon, 28 Oct 2019 11:31:30 +0000 (13:31 +0200)]
kmsmodeview.py: update to current kms++ api

2 years agokmstest: convert to fmt::print
Tomi Valkeinen [Mon, 28 Oct 2019 12:16:13 +0000 (14:16 +0200)]
kmstest: convert to fmt::print

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2 years agocard: move DRM version data to CardVersion
Tomi Valkeinen [Tue, 27 Aug 2019 14:33:57 +0000 (17:33 +0300)]
card: move DRM version data to CardVersion

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>