platform/upstream/libdrm.git
5 months agopackaging: Disable etnaviv features in meson build accepted/tizen_base accepted/tizen_base_asan accepted/tizen_base_riscv accepted/tizen_base_toolchain tizen_base accepted/tizen/base/20231204.085446 accepted/tizen/base/asan/20231206.052346 accepted/tizen/base/riscv/20231204.084122 accepted/tizen/base/toolchain/20240124.003909
Hoegeun Kwon [Mon, 5 Dec 2022 23:54:25 +0000 (08:54 +0900)]
packaging: Disable etnaviv features in meson build

Disable unnecessary etnaviv features on Tizen.

Change-Id: I3b48fd87e871e87d2fefc49de1f1fd111c8ebffa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 months agopackaging: add freedreno package
Seung-Woo Kim [Thu, 18 Feb 2021 06:30:06 +0000 (15:30 +0900)]
packaging: add freedreno package

To support freedreno in mesa, it is reuqired to build freedreno.
Add freedreno packages.

To remove build warning, add -fno-strict-aliasing to CFLAGS.

Change-Id: Ia52c06a2e5ad8260e2b6534d890f7ef51b2074d6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 months agolibdrm : add vigs api
jinhyung.jo [Thu, 26 Sep 2013 05:58:40 +0000 (14:58 +0900)]
libdrm : add vigs api

Change-Id: Ie67c19bdb4a6f9e2190dbb4d3f825e878fca3635
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
[sw0312.kim: remove direct config.h include]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
vigs: Add meson build system

Change-Id: I263e91fece8336c6f530b49402e9e839519a855c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
packaging: Enable vigs

Change-Id: I06c54a9cca66f23aaad2c9142b0d6c839be8c8b2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
libdrm_vigs: Fence support added

VIGS kernel driver now supports fences, so
update libdrm to expose them to user space

Change-Id: I9c07084a357c0a8dc87c049e01238f9049ca0828
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
libdrm_vigs: Scanout flag added to surfaces

Change-Id: Ib6f96d2542c3df0b78f7ef1b610bcc3fa0b678d6
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
libdrm_vigs: Support plane z-pos setting

Change-Id: I2e1418425f1b4a17f49f19fabb8c4a2bdc84e5ef
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
VIGS: Support DP memory

DP memory is used by some of the tizen
gstreamer plugins, TBM and X.Org video driver.
Its main purpose is to share GEM buffers between
media decoding and presentation layers

Change-Id: Ie377119b46d6033355bf6ce00adc01e36096742a
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
VIGS: Implement plane flip/rotate

Planes can now be horizontally/vertically flipped
and rotated by 90, 180 or 270 degrees

Change-Id: I3db7dc3854add2b777e41aed54039a0d2323e0b1
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
VIGS: add PRIME functions

Change-Id: I488c4529c1fb1f52aec9081cb6eb82c40d256dc3
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
VIGS: Add surface convert ioctl

Change-Id: Ic7fcb69be2a2fcc58363647278c0be62ac48766e
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
VIGS: fix always to check return of drmIoctl()

Fix to check return value of drmIoctl().

Change-Id: I0aae8953ebcb0b2b580638c1c730e2a4833df9f2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
vigs: add drm_public macro to vigs api

For visibility, public api should have drm_public macro.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
 Conflicts:
meson.build

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 months agosupport drm_user_handler to handle vendor events
Boram Park [Sun, 22 Nov 2015 04:06:49 +0000 (13:06 +0900)]
support drm_user_handler to handle vendor events

Add drm_user_hander to handle vendor drm events like ipp events.

Note: From tizen, this is used from libtdm vendor layer.

Change-Id: I23149a08d9f9f66f9929d95dcfe6a96c1c897404
Signed-off-by: Boram Park <boram1288.park@samsung.com>
check if user_handler_list inited

Change-Id: I95abd7e8cc8d0485a7cc06dca54bfa46775eb8aa
Signed-off-by: Boram Park <boram1288.park@samsung.com>
[inki.dae: add omitted patch from tizen libdrm-2.4.75]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
[sw0312.kim: squash user_handler patches]
Signed-off-by: Seung-Woo Kim <sw0312.kim>
5 months agoexynos: add support kernel userspace api for IPPv2 calls
Marek Szyprowski [Fri, 9 Feb 2018 15:33:30 +0000 (16:33 +0100)]
exynos: add support kernel userspace api for IPPv2 calls

Add kernel header defines for Exynos DRM IPPv2 API.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I1f0e8d957829b85808b5332c4e0e9bf4ddec65df

5 months agoexynos: Add kernel userspace api for v1
Hoegeun Kwon [Tue, 8 Dec 2020 07:21:09 +0000 (16:21 +0900)]
exynos: Add kernel userspace api for v1

Change-Id: Ic2bbde341316924bc3c9bf3af8cd206c6f3f8f6b
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drm: ipptest: support ipp dynamic color range

This patch supports dynamic range for color space conversion.
COLOR_RANGE_LIMITED: selects narrow -> Y(16 to 235), Cb/Cr(16 to 240)
COLOR_RANGE_FULL: selects wide -> Y/Cb/Cr(0 to 255), Wide default

Change-Id: I94190ac3f3630904d2461e226d34378ac2b82b9d
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
libdrm/exynos: add support for IPP blending, dithering, and colorfill

This patch adds the fields for IPP bleding, dithering, and colorfill.

Change-Id: Ib9cd7c7b22ee9f1017d1db3ae34d39dea342ffec
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
ipptest: added M2M to screen on fimc_m2m_set_mode

This patch added for the function outputing the M2M to a screen.
So, you can check for Image Post processing dirver to screen.
Also you can select the degree about (0, 90, 180, 270).

I will briefly explain the process of the function:
 - Memory(YUV422) ---> IPP ---> Memory(RGB888) ---> Screen
   - Create four DMA memory.
   - Draw the image of the YUV422 format on three DMA memories.
   - Rotate the relevant image by using IPP driver.
   - The rotated image is stored in one DMA memory as the RGB888 format.
   - The one DMA memory output screen.

I referred to the modetest code.

Change-Id: I2bf5738d98a457ced274dc8237df8ef108153e61
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
exynos/drm: sync with v4.1.36 rebased tree for exynos_ipp_prop_list

There is a problem using the IPP_GET_RPOPERTY ioctl because the
structure exynos_ipp_prop_list is not synchronized. Synchronize with
exynos_ipp_prop_list structure of tizen kernel v4.1.36

Refer below commit of tizen kernel:
- Commit id: 60f8b78 (drm/exynos/gsc: Add rotation hardware limits of gscaler)
- https://review.tizen.org/git/?p=platform/kernel/linux-exynos.git;a=commit;h=60f8b78ad8b75c5c3a52f2ad66897da628153eec

Change-Id: Id1989f571c989afb2c73bd4d654f560c3be4067c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 months agoexynos: support DRM_IOCTL_EXYNOS_GEM_MAP
Joonyoung Shim [Tue, 6 Oct 2015 10:09:16 +0000 (19:09 +0900)]
exynos: support DRM_IOCTL_EXYNOS_GEM_MAP

The commit d41b7a3a745a("exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/
MMAP} ioctls") removed it same with the ioctl that this patch adds. The
reason that removed DRM_IOCTL_EXYNOS_GEM_MAP_OFFSET was we could use
DRM_IOCTL_MODE_MAP_DUMB. Both did exactly same thing.

Now exynos-drm driver of linux kernel revives it as DRM_EXYNOS_GEM_MAP
because of render node. DRM_IOCTL_MODE_MAP_DUMB isn't permitted in
render node, so this patch also supports DRM_IOCTL_EXYNOS_GEM_MAP.

Change-Id: Ib548dc8a6bea076375465f64ee2fdd658a90e435
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
exynos: fix build warnings

Fix build warnings to exynos_fimg2d module.

This patch fixes below two build warnings,

exynos_fimg2d.c: In function 'g2d_scale_and_blend':
exynos_fimg2d.c:978:3: warning: 'scale_y' may be used uninitialized in this function [-Wmaybe-uninitialized]
   g2d_add_cmd(ctx, SRC_YSCALE_REG, scale_y);
   ^
exynos_fimg2d.c:977:3: warning: 'scale_x' may be used uninitialized in this function [-Wmaybe-uninitialized]
   g2d_add_cmd(ctx, SRC_XSCALE_REG, scale_x);

Change-Id: I70908088c61b85570aec6e3ec19b405df4820d37
Signed-off-by: Inki Dae <inki.dae@samsung.com>
 Conflicts:
libkms/exynos.c

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 months agoadd packaging
Anas Nashif [Tue, 13 Nov 2012 15:03:45 +0000 (07:03 -0800)]
add packaging

do not install libdrm_intel on ARM

added baselibs for multi lib supporta for intel drm

Fixed package groups

Fixed groups, dependencies and rpmlint warnings

resetting manifest requested domain to floor

Remove dependency on xorg-macros

libdrm didn't use any macros from xorg-macros, so remove it.

Change-Id: I37cda1f7bc48a2d0f98c9a319c78f8dca6b0f90c
Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
packaging: build using upstream tags

Change-Id: I1587634bfdd59172b7032cd968d0005261f1ad77
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
fixed arch check for libdrm-intel requires.
Currently we have invalid requires for libdrm-intel for non-arm and non-intel arches.

Change-Id: I19c90a272da284f63c6d862a2e67e94f110a2807
Signed-off-by: Andriy Prystupa <andriy.prystupa@globallogic.com>
packaging: add libdrm-tools

This patch adds libdrm-tools package which includes test utilities such
as modetest/modeprint.

Change-Id: Icc10b1c56625af7954823664156cfec8b7b57c3e
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
clean spec file

 - allow build for yocto
 - improve rpmlint score

Change-Id: I1d563567b30914925e67fd3aebf3a6cc5e65026a
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
packaging: depend on the same release

Change-Id: I02c7ff42eb688c6a6b03532966f2a16daad8910f
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
packaging: add tools-exynos for testing exynos_drm

This patch adds tools-exynos package to test exynos.

Change-Id: I8dbd821f056ac3f7e2a043a97d0c39bec7f75b40
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
remove manifest for security domain policy

Change-Id: I556117f4dca6c11e3477b3404244f5a8c17b1ede
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Add manifest for security domain policy

Change-Id: I18f14262475041b2f1e919923907f998a8f12d87

packaging: Clean up kmstest

There is no reason to remove kmstest from package.

Change-Id: I772c21ca005f7edb23bb832a2ae3f8b3259d7a08
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Update to 2.4.75

Change-Id: I54ef37f9be4c03a7502b2e0cc8b93e46efe87a8a
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
packaging: notice license of libdrm package

This patch copies license file to /usr/share/licenses/libdrm/.
The licenses of all packages should be noticed when released.

Change-Id: I0224046d19ff73b44ec825c2b2327836e55b44c2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Update to 2.4.90 / Update to 2.4.97 / Update to 2.4.98 / Update to 2.4.100

Add drmdevice tool packaging.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
add COPYING file

Add COPYING file with MIT license.

Change-Id: I5ce242bea2bdd74f8c58d30da82e987eeb9a5c55
Signed-off-by: Boram Park <boram1288.park@samsung.com>
[sw0312.kim: replaces xf86free license as proper MIT license copying]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
packaging: spec: Fix to meson build system

Change-Id: Ib1b454a96750600cdcd7c76dbb87f7bde48f54c6
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
package: Fix to enable intel api

Change-Id: I475f56afe71073174f867dc8d13d1d7121672481
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
[sw0312.kim: bump up to v2.4.109]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
packaging: Change the libdrm version of the spec file

Change the libdrm version to 2.4.114

Change-Id: I69636bc3057f36e316a0ebd7ff0be0c6cd78d3f4
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
packaging: Remove libkms

Removed libkms from libdrm v2.4.111, remove libkms from spec file.

Change-Id: I61a588dea869a5c00769b130ba919070db49263a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
packaging: Bump version to v2.4.118

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 months agovbltest: add option to use high pipe
Hoegeun Kwon [Mon, 16 Jan 2023 08:18:04 +0000 (17:18 +0900)]
vbltest: add option to use high pipe

Add option to use high pipe.

Change-Id: I028f305a5dac877bd4ec925ed11295ec4d319c1a
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
5 months agoxf86drm: check return value of asprintf()
Seung-Woo Kim [Tue, 18 Jan 2022 02:34:41 +0000 (11:34 +0900)]
xf86drm: check return value of asprintf()

Check return value of asprintf() to fix build warning about not
checked return.

Change-Id: Iae8da56e7f743aa249869c58f6557148f799bd4c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 months agofreedreno/msm: fix __u64 printing format
Seung-Woo Kim [Mon, 22 Feb 2021 11:13:59 +0000 (20:13 +0900)]
freedreno/msm: fix __u64 printing format

__u64 is always unsigned long long, so print with %llu instead
of PRIu64 for uint64_t.

Note: fix build warning in upstream.

Change-Id: Ic88578b626cb7e05fb5829955e0d10cb77b1be2b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 months agobuild: bump version to 2.4.118 upstream libdrm-2.4.118
Simon Ser [Mon, 20 Nov 2023 13:03:51 +0000 (14:03 +0100)]
build: bump version to 2.4.118

Signed-off-by: Simon Ser <contact@emersion.fr>
5 months agoxf86drmMode: add drmModeCloseFB()
Simon Ser [Fri, 27 Oct 2023 11:58:12 +0000 (13:58 +0200)]
xf86drmMode: add drmModeCloseFB()

Add a wrapper for the new CLOSEFB IOCTL, to close a framebuffer
without implicitly disabling planes or CRTCs.

See https://lore.kernel.org/dri-devel/20231020101926.145327-2-contact@emersion.fr/

Signed-off-by: Simon Ser <contact@emersion.fr>
5 months agoSync headers with drm-next
Simon Ser [Mon, 20 Nov 2023 10:12:35 +0000 (11:12 +0100)]
Sync headers with drm-next

Synchronize drm.h, drm_mode.h and drm_fourcc.h to drm-next.

Generated using make headers_install.
Generated from drm-next branch commit c79b972eb88b077d2765e7790d0902b3dc94d55c

Signed-off-by: Simon Ser <contact@emersion.fr>
5 months agoxf86drm: add drmGetNodeTypeFromDevId
Simon Ser [Wed, 4 Oct 2023 09:21:34 +0000 (11:21 +0200)]
xf86drm: add drmGetNodeTypeFromDevId

This is useful to figure out whether the dev_t refers to a primary
node or a render node. Indeed, drmGetDeviceFromDevId returns a
drmDevice, which holds both the primary and render nodes.

Signed-off-by: Simon Ser <contact@emersion.fr>
5 months agomodetest: switch usage to proper options grammar
Neil Armstrong [Wed, 18 Jan 2023 13:28:35 +0000 (14:28 +0100)]
modetest: switch usage to proper options grammar

It was unclear how #mode could be used, so fixup the usage string and print
the struct grammar of the -s and -P options to clarify the usage.

The following grammar was compiled:
<plane_topology> ::= <plane_id> "@" <crtc_id> ":" <width> "x" <height> ( <plane_offsets> )?
<plane_offsets> ::= "+" <x_offset> "+" <y_offset> ( <plane_scale> )?
<plane_scale> ::= "*" <scale> ( <plane_format> )?
<plane_format> ::= "@" <format>

<mode_topology> ::= <connector_id> ( "," <connector_id> )* ( "@" <crtc_id> )? ":" <mode_selection> ( "@" <format> )?
<mode_selection> ::=  <indexed_mode> | <named_mode> | <custom_mode>
<indexed_mode> ::=  "#" <mode_index>
<named_mode> ::=  <width> "x" <height> ( "-" <vrefresh> )?
<custom_mode> ::=  <hdisplay> "," <hsyncstart> "," <hsyncend> "," <htotal> "," <vdisplay> "," <vsyncstart> "," <vsyncend> "," <vtotal>  "-" <vrefresh>
<property>  ::= <object_id> ":" <property_name> ":" <value>

<plane_id> ::= [0-9]+
<crtc_id> ::= [0-9]+
<width> ::= [0-9]+
<height> ::= [0-9]+
<x_offset> ::= [0-9]+
<y_offset> ::= [0-9]+
<scale> ::= [0-9]+ ( "." [0-9]+ )
<format> ::= ( [A-Z] | [0-9] )+
<connector_id> ::= [0-9]+
<mode_index> ::= [0-9]+
<hdisplay> ::= [0-9]+
<hsyncstart> ::= [0-9]+
<hsyncend> ::= [0-9]+
<htotal> ::= [0-9]+
<vdisplay> ::= [0-9]+
<vsyncstart> ::= [0-9]+
<vsyncend> ::= [0-9]+
<vtotal> ::= [0-9]+
<object_id> ::= [0-9]+
<vrefresh> ::= [0-9]+
<property_name> ::= ( [A-Z] | [0-9] | "_" )+
<value> ::= [0-9]+

with the https://bnfplayground.pauliankline.com/ service

Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
6 months agomodetest: add support for big-endian XRGB1555/RGB565
Geert Uytterhoeven [Sun, 3 Jul 2022 13:31:26 +0000 (15:31 +0200)]
modetest: add support for big-endian XRGB1555/RGB565

Add support for creating buffers using big-endian formats.

For now this is limited to XRGB1555 and RGB565, which are the most
common big-endian formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - No changes,

v2:
  - New.

6 months agoutil: add pwetty support for big-endian RGB565
Geert Uytterhoeven [Thu, 7 Jul 2022 13:52:33 +0000 (15:52 +0200)]
util: add pwetty support for big-endian RGB565

Add support for rendering the crosshairs in a buffer using the
big-endian RGB565 format.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - No changes,

v2:
  - New.

6 months agoutil: fix pwetty on big-endian
Geert Uytterhoeven [Thu, 7 Jul 2022 13:33:04 +0000 (15:33 +0200)]
util: fix pwetty on big-endian

Cairo always uses native byte order for rendering.

Hence if the byte order of the frame buffer differs from the byte order
of the CPU, the frame buffer contents need to be byteswapped twice: once
before rendering, to convert to native byte order, and a second time
after rendering, to restore the frame buffer format's byte order.

Note that byte swapping is not done for ARGB32 formats, as for these
formats, byte order only affects the order of the red, green, and blue
channels, which we do not care about here.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Wrap byteswap_buffer{16,32}() implementation inside #if HAVE_CAIRO
    to avoid defined-but-not-used compiler warnings,

v2:
  - RGB30 is untested.

6 months agoutil: add test pattern support for big-endian XRGB1555/RGB565
Geert Uytterhoeven [Sun, 3 Jul 2022 13:25:58 +0000 (15:25 +0200)]
util: add test pattern support for big-endian XRGB1555/RGB565

Add support for drawing the SMPTE and tiles test patterns in buffers
using big-endian formats.

For now this is limited to XRGB1555 and RGB565, which are the most
common big-endian formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Increase indentation after definition of cpu_to_be16(),

v2:
  - New.

6 months agomodetest: add support for parsing big-endian formats
Geert Uytterhoeven [Sun, 3 Jul 2022 12:35:49 +0000 (14:35 +0200)]
modetest: add support for parsing big-endian formats

When specifying a frame buffer format like "RG16_BE" (big-endian RG16),
modetest still uses the little-endian variant, as the format string is
truncated to four characters.

Fix this by increasing the format string size to 8 bytes (7 characters +
NUL terminator).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Update for suffix change from "be" to "_BE", cfr. commit
    ffb9375a505700ad ("xf86drm: handle DRM_FORMAT_BIG_ENDIAN in
    drmGetFormatName()"),
  - Replace hardcoded numbers in code by sizeof(),

v2:
  - New.

6 months agoutil: add missing big-endian RGB16 frame buffer formats
Geert Uytterhoeven [Thu, 30 Jun 2022 13:31:12 +0000 (15:31 +0200)]
util: add missing big-endian RGB16 frame buffer formats

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Update for suffix change from "be" to "_BE", cfr. commit
    ffb9375a505700ad ("xf86drm: handle DRM_FORMAT_BIG_ENDIAN in
    drmGetFormatName()"),

v2:
  - New.

6 months agoutil: fix 16 bpp patterns on big-endian
Geert Uytterhoeven [Thu, 3 Mar 2022 16:58:08 +0000 (17:58 +0100)]
util: fix 16 bpp patterns on big-endian

DRM formats are defined to be little-endian, unless the
DRM_FORMAT_BIG_ENDIAN flag is set.  Hence writes of multi-byte pixel
values need to take endianness into account.

Introduce a swap16() helper to byteswap 16-bit values, and a
cpu_to_le16() helper to convert 16-bit values from CPU-endian to
little-endian, and use the latter in the various pattern fill functions
for 16-bit formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Increase indentation after definition of cpu_to_le16(),

v2:
  - New.

6 months agoutil: fix 32 bpp patterns on big-endian
Geert Uytterhoeven [Thu, 3 Mar 2022 16:58:08 +0000 (17:58 +0100)]
util: fix 32 bpp patterns on big-endian

DRM formats are defined to be little-endian, unless the
DRM_FORMAT_BIG_ENDIAN flag is set.  Hence writes of multi-byte pixel
values need to take endianness into account.

Introduce a swap32() helper to byteswap 32-bit values, and a
cpu_to_le32() helper to convert 32-bit values from CPU-endian to
little-endian, and use the latter in the various pattern fill functions
for 32-bit formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Use new HAVE_BIG_ENDIAN symbol,

v3:
  - Increase indentation after definition of cpu_to_le32(),

v2:
  - Add Acked-by,
  - Add swap32() intermediate helper,
  - Add __ARM_BIG_ENDIAN and __s390__.

6 months agointel: determine target endianness using meson
Geert Uytterhoeven [Thu, 3 Mar 2022 16:39:12 +0000 (17:39 +0100)]
intel: determine target endianness using meson

The endianness of the target is currently determined based on
preprocessor symbols.  Unfortunately some symbols checked are wrong
(sparc64-linux-gnu-gcc does not define __BIG_ENDIAN__ or SPARC), and
several checks for big-endian architectures are missing.

Fix this by introducing a new preprocessor symbol HAVE_BIG_ENDIAN, which
is set based on meson's knowledge of the target endianness.

Android.common.mk does not need an update, as Android is always
little-endian (https://developer.android.com/ndk/guides/abis.html).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Replace explicit #ifdef checks by a define set by meson,

v3:
  - No changes,

v2:
  - Add arm, aarch64, microblaze, s390, and sh.

6 months agomodetest: add support for DRM_FORMAT_NV{15,20,30}
Jonas Karlman [Wed, 25 Oct 2023 16:15:31 +0000 (16:15 +0000)]
modetest: add support for DRM_FORMAT_NV{15,20,30}

Add smpte and tiles pattern for 10-bit NV15, NV20 and NV30 pixel formats
based on the existing pattern for NV12 with colors simply scaled from
8-bit to 10-bit.

These pixel formats are typically used by video decoder and display
pipeline on Rockchip SoCs, e.g. on RK322X, RK3288, RK3328 and RK3399
the video decoder produce 10-bit video frames in NV15 and NV20 format.

NV20 and NV30 pixel formats was added in drm-misc commit 728c15b4b5f3
("drm/fourcc: Add NV20 and NV30 YUV formats").

This can be tested/validated on Rockchip SoCs with drm-misc commit
d4b384228562 ("drm/rockchip: vop: Add NV15, NV20 and NV30 support").

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
6 months agomeson: fix typo in libdrm_intel
David Jagu [Tue, 24 Oct 2023 16:59:39 +0000 (18:59 +0200)]
meson: fix typo in libdrm_intel

Replace system() with cpu_family() for libdrm_intel
This restore libdrm_intel to be built by default

Closes: #93

Signed-off-by: David Jagu <marav8@free.fr>
6 months agomodetest: add SMPTE pattern support for C[124] formats
Geert Uytterhoeven [Thu, 3 Mar 2022 17:17:27 +0000 (18:17 +0100)]
modetest: add SMPTE pattern support for C[124] formats

Add support for drawing the SMPTE pattern in buffers using a
color-indexed frame buffer formats with two, four, or sixteen colors.

Note that this still uses 256 as the CLUT size, as
DRM_IOCTL_MODE_SETGAMMA enforces that the size matches against the
(fixed) gamma size, while the CLUT size depends on the format.

Move clearing the color LUT entries from util_smpte_index_gamma() to its
caller, as only the caller knows how many entries there really are
(currently DRM always assumes 256 entries).

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Add missing C[12] to oneline-summary,
  - Do not remove memset() of full lut, else some entries may stay
    uninitialized,

v3:
  - Add Acked-by,

v2:
  - Split off changes to tests/modetest/modetest.c,
  - Add C1 and C2 support.

The linuxdoc comments say userspace can query the gamma size:

 * drm_mode_gamma_set_ioctl - set the gamma table
 *
 * Set the gamma table of a CRTC to the one passed in by the user. Userspace can
 * inquire the required gamma table size through drm_mode_gamma_get_ioctl.

 * drm_mode_gamma_get_ioctl - get the gamma table
 *
 * Copy the current gamma table into the storage provided. This also provides
 * the gamma table size the driver expects, which can be used to size the
 * allocated storage.

but the code doesn't seem to support that in an easy way (like setting
red/green/blue to NULL on input, retrieving gamma_size on output), only
by providing big enough buffers for red/green/blue, and looping over
gamma_size until -EINVAL is no longer returned.

6 months agomodetest: add support for DRM_FORMAT_C[124]
Geert Uytterhoeven [Thu, 3 Mar 2022 17:13:07 +0000 (18:13 +0100)]
modetest: add support for DRM_FORMAT_C[124]

Add support for creating buffers using the new color-indexed frame
buffer formats with two, four, and sixteen colors.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Add Acked-by,

v2:
  - Split off changes to tests/modetest/buffers.c.

6 months agoutil: add SMPTE pattern support for C2 format
Geert Uytterhoeven [Thu, 30 Jun 2022 16:19:27 +0000 (18:19 +0200)]
util: add SMPTE pattern support for C2 format

Add support for drawing the SMPTE pattern in a buffer using the C2
indexed format.

As only four colors are available, resolution is halved, and the pattern
is drawn in a PenTile RG-GB matrix, using Floyd-Steinberg dithering.
The magnitude of the green subpixels is reduced, as there are twice as
many green subpixels as red or blue subpixels.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dithering example at https://drive.google.com/file/d/1g5O8XeacrjrC8rgaVENvR65YeI6QvmtO/view

v5:
  - Add Reviewed-by,

v4:
  - Replace FILL_COLOR() use by pentile_color_lut[],

v3:
  - Add Acked-by,

v2:
  - New.

6 months agoutil: add SMPTE pattern support for C1 format
Geert Uytterhoeven [Thu, 30 Jun 2022 16:14:04 +0000 (18:14 +0200)]
util: add SMPTE pattern support for C1 format

Add support for drawing the SMPTE pattern in a buffer using the C1
indexed format.

As only two colors are available, the pattern is drawn in black and
white, using Floyd-Steinberg dithering[1].

[1] https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dithering example at https://drive.google.com/file/d/1waJczErrIaEKRhBCCU1ynxRG8agpo0Xx/view

v5:
  - Add Reviewed-by,

v4:
  - Replace FILL_COLOR() use by bw_color_lut[],

v3:
  - Add Acked-by,
  - Add Wikipedia link,

v2:
  New.

6 months agoutil: add SMPTE pattern support for C4 format
Geert Uytterhoeven [Thu, 3 Mar 2022 17:17:27 +0000 (18:17 +0100)]
util: add SMPTE pattern support for C4 format

Add support for drawing the SMPTE pattern in a buffer using the C4
indexed format.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Add Acked-by,

v2:
  - Use new smpte_top[],
  - Split off changes to tests/util/pattern.c.

6 months agoutil: store number of colors for indexed formats
Geert Uytterhoeven [Thu, 30 Jun 2022 13:21:57 +0000 (15:21 +0200)]
util: store number of colors for indexed formats

Store the number of available colors for color-indexed frame
buffer formats in the format_info[] array.  This avoids the need of test
code for having to use switch statements all the time to obtain the
number of colors, or to check if a mode is color-indexed or not.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Add Acked-by,

v2:
  - New.

6 months agoutil: add support for DRM_FORMAT_C[124]
Geert Uytterhoeven [Thu, 3 Mar 2022 17:13:07 +0000 (18:13 +0100)]
util: add support for DRM_FORMAT_C[124]

Add support for creating buffers using the new color-indexed frame
buffer formats with two, four, and sixteen colors.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Add Acked-by,

v2:
  - Split off changes to tests/util/format.c.

6 months agoutil: factor out and optimize C8 SMPTE color LUT
Geert Uytterhoeven [Thu, 3 Mar 2022 17:03:50 +0000 (18:03 +0100)]
util: factor out and optimize C8 SMPTE color LUT

The color LUT for the SMPTE pattern in indexed mode contains 22 entries,
although only 13 are non-unique.

Reduce the size of the color LUT by dropping duplicate entries, so it
can be reused for formats supporting e.g. 16 colors.  Rename the
function util_smpte_c8_gamma() to util_smpte_fill_lut(), and its first
parameter size to ncolors, to match their actual use.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Rename util_smpte_index_gamma() to util_smpte_fill_lut(), and its
    first parameter from size to ncolors,
  - Move smpte_color_lut[] down,
  - Kill FILL_COLOR() macro,
  - Add and use EXPAND_COLOR() macro,

v3:
  - Add Acked-by,

v2:
  - Factor out smpte color LUT.

6 months agoutil: improve SMPTE color LUT accuracy
Geert Uytterhoeven [Thu, 30 Jun 2022 13:16:23 +0000 (15:16 +0200)]
util: improve SMPTE color LUT accuracy

Fill in the LSB when converting color components from 8-bit to 16-bit.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Add Acked-by,

v2:
  - New.

6 months agobuild: bump version to 2.4.117 libdrm-2.4.117
Simon Ser [Fri, 20 Oct 2023 05:24:54 +0000 (07:24 +0200)]
build: bump version to 2.4.117

Signed-off-by: Simon Ser <contact@emersion.fr>
6 months agomeson: replace deprecated program.path -> program.full_path
Dylan Baker [Fri, 1 Sep 2023 20:10:41 +0000 (13:10 -0700)]
meson: replace deprecated program.path -> program.full_path

To avoid Meson warnings

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
6 months agomeson: Use feature.require() and feature.allowed()
Dylan Baker [Fri, 1 Sep 2023 19:23:35 +0000 (12:23 -0700)]
meson: Use feature.require() and feature.allowed()

To reduce the size and complexity of checks. require() allows combining
auto and enabled checks(), so that something like
```meson
x = get_option('feature')
y = false
if x.enabled()
  if not condition
    error(...)
  endif
  y = condition
endif
```
can be rewritten as:
```meson
y = get_option('feature').require(condition, error_message : ...).allowed()
```
require checks the condition, then if the feature is required it emits
an error with the given message otherwise it returns a disabled feature.
allowed then returns whether the feature is not disabled, and returns
that (ie, .allowed() == not .disabled()). This is especially helpful for
longer more complex conditions

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
6 months agomeson: fix intel requirements
Dylan Baker [Fri, 1 Sep 2023 19:09:24 +0000 (12:09 -0700)]
meson: fix intel requirements

Intel requires libpciaccess and an x86/x86_64 host, so if those
aren't found and it's enabled we need to error

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
6 months agoamdgpu: add support for querying VM faults information
Samuel Pitoiset [Fri, 24 Feb 2023 09:01:53 +0000 (10:01 +0100)]
amdgpu: add support for querying VM faults information

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
6 months agoamdgpu: amdgpu_drm.h for new GPUVM fault ioctl
Samuel Pitoiset [Fri, 24 Feb 2023 09:03:36 +0000 (10:03 +0100)]
amdgpu: amdgpu_drm.h for new GPUVM fault ioctl

Based on agd5f/drm-next.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 months agoci: bump FreeBSD to 13.2
Simon Ser [Thu, 20 Jul 2023 10:51:04 +0000 (12:51 +0200)]
ci: bump FreeBSD to 13.2

13.0 is no longer supported and causes a 404 when fetching the
image, see e.g. [1] for example failure.

[1]: https://gitlab.freedesktop.org/mesa/drm/-/jobs/45849458

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
7 months agoxf86drm: mark DRM_MAX_MINOR as deprecated
Simon Ser [Wed, 23 Aug 2023 10:49:19 +0000 (12:49 +0200)]
xf86drm: mark DRM_MAX_MINOR as deprecated

With the work in [1], libdrm users should no longer rely on the
minor numbering scheme we've used so far. Instead, they should use
drmGetDevices2().

[1]: https://lore.kernel.org/lkml/20230724211428.3831636-1-michal.winiarski@intel.com/

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
7 months agomodetest: print modifiers in hex as well
Chia-I Wu [Fri, 18 Aug 2023 22:48:31 +0000 (15:48 -0700)]
modetest: print modifiers in hex as well

Print modifiers in hex in addtion to in strings returned by
drmGetFormatModifierName.  In some cases, hex numbers can be more easily
compared visually.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
7 months agomodetest: allocate and commit atomic request around set_property()
Marijn Suijten [Tue, 13 Jun 2023 19:53:22 +0000 (21:53 +0200)]
modetest: allocate and commit atomic request around set_property()

Currently the atomic request is only assigned after `set_property()` is
called, leaving `dev.req` in its uninitialized state causing
`drmModeAtomicAddProperty()` to return an error code, which is printed
as `"Success"` because `errno` is not set by `libdrm` (but it would have
been when non-atomic `drmModeObjectSetProperty()` called an IOCTL
immediately):

    sony-akatsuki-row ~ $ modetest -M msm -a -w 81:ACTIVE:0
    failed to set CRTC 81 property ACTIVE to 0: Success

Solve this by assigning a new atomic request object before calling
`set_property()`, when there are properties to set.  Likewise, commit
these properties after `set_property()` even if there is no other
operation (setting modes or planes) specified.

Furthermore `drmModeObjectSetProperty()` is implemented in terms of
`DRM_IOCTL()` which already returns `-errno` when `ioctl()` returns
`-1`, so we should instead pass `ret` to `strerror()` and get an
accurate error string out of `drmModeAtomicAddProperty()` too.

Fixes: 93220283 ("tests/modetest: Add atomic support")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
7 months agomodetest: allow using -r and -P
Neil Armstrong [Wed, 18 Jan 2023 14:01:22 +0000 (15:01 +0100)]
modetest: allow using -r and -P

Since now -r sets the pipe struct and count like -s we can also
use -P with -r.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
7 months agomodetest: permit -r and -s to work together
Neil Armstrong [Wed, 18 Jan 2023 13:29:42 +0000 (14:29 +0100)]
modetest: permit -r and -s to work together

Let's permit testing vsync with the default mode, this returns
back the pipe content and count when calling set_mode() so the
vsync test can also be used.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
7 months agomodetest: document why no blob is created for linear gamma LUT
Marijn Suijten [Sat, 9 Sep 2023 08:26:33 +0000 (10:26 +0200)]
modetest: document why no blob is created for linear gamma LUT

As found and discussed in [MR 58] a blob is not created in the else arm
because adding the GAMMA_LUT property with a NULL/0 blob_id causes it
to be reset to a default linear / pass-thru gamma table.  The values
in the gamma_lut table might still be consumed in the legacy API path
below though, so it has to be initialized to a linear table.

[MR 58]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/58#note_466972

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
7 months agomodetest: avoid erroring if there's no gamma legacy support
Ezequiel Garcia [Sat, 5 Oct 2019 16:31:22 +0000 (13:31 -0300)]
modetest: avoid erroring if there's no gamma legacy support

Let's follow the Rule of Silence. And while here,
document what's going on.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
7 months agomodetest: custom mode support
Dmitry Baryshkov [Sun, 30 Jul 2023 15:33:28 +0000 (18:33 +0300)]
modetest: custom mode support

It is useful to be able to specify mode parameters manually. Add support
for setting user-supplied modes. This patch is based on the original
idea by Rohit and Jessica, but implemented from scratch.

Suggested-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
Suggested-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
7 months agoutil: remove unused definitions of RED, GREEN, and BLUE
Geert Uytterhoeven [Thu, 30 Jun 2022 14:35:31 +0000 (16:35 +0200)]
util: remove unused definitions of RED, GREEN, and BLUE

These are unused since commit edcef53685edf5fb ("modetest: Add test
pattern support for missing RGB formats").

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

7 months agomodetest: fix mode_vrefresh() for interlace/dblscan/vscan
Geert Uytterhoeven [Thu, 30 Jun 2022 12:41:48 +0000 (14:41 +0200)]
modetest: fix mode_vrefresh() for interlace/dblscan/vscan

mode_vrefresh() does not take into account interlaced, doublescan, and
multiscan modes, leading to incorrect refresh rates.

Fix this, based on drm_mode_vrefresh() in Linux.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
7 months agoutil: fix grey in YUV SMPTE patterns
Geert Uytterhoeven [Sun, 3 Jul 2022 12:05:31 +0000 (14:05 +0200)]
util: fix grey in YUV SMPTE patterns

The YUV SMPTE patterns use RGB 191/192/192 instead of 192/192/192 for
the grey color in the top color bar.

Change it to 192/192/192, to match the RGB SMPTE patterns.

Fixes: a94ee624292bff96 ("modetest: Add SMPTE test pattern")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

7 months agomodetest: add support for DRM_FORMAT_NV{24,42}
Geert Uytterhoeven [Wed, 5 Jul 2023 13:24:02 +0000 (15:24 +0200)]
modetest: add support for DRM_FORMAT_NV{24,42}

Add support for creating buffers using semi-planar YUV formats with
non-subsampled chroma planes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

7 months agoutil: add pattern support for DRM_FORMAT_NV{24,42}
Geert Uytterhoeven [Wed, 5 Jul 2023 13:23:56 +0000 (15:23 +0200)]
util: add pattern support for DRM_FORMAT_NV{24,42}

Add support for drawing the SMPTE and tiles patterns in buffers using
semi-planar YUV formats with non-subsampled chroma planes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

7 months agoutil: add NV24 and NV42 frame buffer formats
Geert Uytterhoeven [Wed, 5 Jul 2023 13:23:52 +0000 (15:23 +0200)]
util: add NV24 and NV42 frame buffer formats

Add the missing entries for semi-planar YUV formats with
non-subsampled chroma planes.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2:
  - Add Reviewed-by.

7 months agomodetest: add support for writeback connector
Rohith Iyer [Mon, 25 Jul 2022 17:11:41 +0000 (10:11 -0700)]
modetest: add support for writeback connector

Add writeback support to modetest with the below options:

- Passing in -a -c will now also show the writeback connector

- Dump the writeback output buffer to bitstream
  Usage: "./modetest -M msm -s <connector_id>:<widthxheight>
          -a -o <filepath>
          -P <plane_id>@<crtc_id>:<widthxheight>+0+0@RG24"

This currently supports single writeback connector.

Co-developed-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
[DB: dropped custom mode support, fixed segfault]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
7 months agoamdgpu: add marketing names from Adrenalin 23.9.1
Jonathan Gray [Wed, 6 Sep 2023 15:28:25 +0000 (01:28 +1000)]
amdgpu: add marketing names from Adrenalin 23.9.1

7 months agoamdgpu: add marketing names from Adrenalin 23.7.2
Jonathan Gray [Mon, 7 Aug 2023 01:39:12 +0000 (11:39 +1000)]
amdgpu: add marketing names from Adrenalin 23.7.2

7 months agoamdgpu: add marketing names from PRO Edition 23.Q3 W7000
Jonathan Gray [Mon, 7 Aug 2023 01:36:50 +0000 (11:36 +1000)]
amdgpu: add marketing names from PRO Edition 23.Q3 W7000

7 months agoamdgpu: add marketing names from amd-5.5.1 (23.10.1)
Jonathan Gray [Mon, 29 May 2023 06:39:38 +0000 (16:39 +1000)]
amdgpu: add marketing names from amd-5.5.1 (23.10.1)

7 months agoamdgpu: add marketing names from amd-5.4.6 (22.40.6)
Jonathan Gray [Mon, 29 May 2023 06:41:01 +0000 (16:41 +1000)]
amdgpu: add marketing names from amd-5.4.6 (22.40.6)

8 months agoamdgpu: Use PRI?64 to format uint64_t
Geert Uytterhoeven [Wed, 5 Jul 2023 13:23:44 +0000 (15:23 +0200)]
amdgpu: Use PRI?64 to format uint64_t

On 32-bit:

    ../tests/amdgpu/amdgpu_stress.c: In function ‘alloc_bo’:
    ../tests/amdgpu/amdgpu_stress.c:178:49: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Allocated BO number %u at 0x%lx, domain 0x%x, size %lu\n",
                                                   ~~^
                                                   %llx
       num_buffers++, addr, domain, size);
                      ~~~~
    ../tests/amdgpu/amdgpu_stress.c:178:72: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Allocated BO number %u at 0x%lx, domain 0x%x, size %lu\n",
                                                                          ~~^
                                                                          %llu
       num_buffers++, addr, domain, size);
                                    ~~~~
    ../tests/amdgpu/amdgpu_stress.c: In function ‘submit_ib’:
    ../tests/amdgpu/amdgpu_stress.c:276:54: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n",
                                                        ~~^
                                                        %llx
       count, from, virtual[from], to, virtual[to], copied, delta / 1000);
                    ~~~~~~~~~~~~~
    ../tests/amdgpu/amdgpu_stress.c:276:65: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n",
                                                                   ~~^
                                                                   %llx
       count, from, virtual[from], to, virtual[to], copied, delta / 1000);
                                       ~~~~~~~~~~~
    ../tests/amdgpu/amdgpu_stress.c:276:70: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n",
                                                                        ~~^
                                                                        %llu
       count, from, virtual[from], to, virtual[to], copied, delta / 1000);
                                                    ~~~~~~
    ../tests/amdgpu/amdgpu_stress.c:276:85: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
      fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n",
                                                                                       ~~^
                                                                                       %llu
       count, from, virtual[from], to, virtual[to], copied, delta / 1000);
                                                            ~~~~~~~~~~~~
    ../tests/amdgpu/amdgpu_stress.c: In function ‘parse_size’:
    ../tests/amdgpu/amdgpu_stress.c:296:24: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 3 has type ‘uint64_t *’ {aka ‘long long unsigned int *’} [-Wformat=]
      if (sscanf(optarg, "%li%1[kmgKMG]", &size, ext) < 1) {
                          ~~^             ~~~~~
                          %lli
    ../tests/amdgpu/amdgpu_stress.c: In function ‘main’:
    ../tests/amdgpu/amdgpu_stress.c:378:45: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
         fprintf(stderr, "Buffer size to small %lu\n", size);
                                               ~~^     ~~~~
                                               %llu

Fix this by using the proper "PRI?64" format specifiers.

Fixes: d77ccdf3ba6f5a39 ("amdgpu: add amdgpu_stress utility v2")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
---
On Linux/amd64, the format strings in the resulting binary are
unchanged.

v3:
  - Add Reviewed-by,

v2:
  - Use PRI?64 to unbreak 64-bit build.

8 months agoamdgpu: Fix pointer/integer mismatch warning
Geert Uytterhoeven [Wed, 5 Jul 2023 13:23:24 +0000 (15:23 +0200)]
amdgpu: Fix pointer/integer mismatch warning

On 32-bit:

    ../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’:
    ../amdgpu/amdgpu_bo.c:554:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
           cpu < (void*)((uintptr_t)bo->cpu_ptr + bo->alloc_size))
                 ^

Indeed, as amdgpu_bo_info.alloc_size is "uint64_t", the sum is
always 64-bit, while "void *" can be 32-bit or 64-bit.

Fix this by casting bo->alloc_size to "size_t", which is either
32-bit or 64-bit, just like "void *".

Fixes: c6493f360e7529c2 ("amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
---
v2:
  - Add Reviewed-by.

8 months agobuild: bump version to 2.4.116 libdrm-2.4.116
Simon Ser [Wed, 23 Aug 2023 09:57:39 +0000 (11:57 +0200)]
build: bump version to 2.4.116

Signed-off-by: Simon Ser <contact@emersion.fr>
8 months agonouveau: add interface to make buffer objects global
Dor Askayo [Sat, 12 Aug 2023 19:29:30 +0000 (22:29 +0300)]
nouveau: add interface to make buffer objects global

This is useful for when GEM handles are exported and may be shared
between multiple buffer objects without going through other libdrm
interfaces.

Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Reviewed-by: Karol Herbst <git@karolherbst.de>
8 months agoxf86drm: use drm device name to identify drm node type
James Zhu [Mon, 7 Aug 2023 14:14:18 +0000 (10:14 -0400)]
xf86drm: use drm device name to identify drm node type

Currently drm node's minor range is used to identify node's type.
Since kernel drm uses node type name and minor to generate drm
device name, It will be more general to use drm device name to
identify drm node type.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
8 months agoxf86drm: update DRM_NODE_NAME_MAX supporting more nodes
James Zhu [Mon, 7 Aug 2023 14:06:32 +0000 (10:06 -0400)]
xf86drm: update DRM_NODE_NAME_MAX supporting more nodes

Current DRM_NODE_NAME_MAX only can support up to 999 nodes,
Update to support up to 2^MINORBITS nodes.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
9 months agoxf86drm: add drmSyncobjEventfd
Simon Ser [Thu, 20 Jul 2023 10:45:57 +0000 (12:45 +0200)]
xf86drm: add drmSyncobjEventfd

This is a wrapper for DRM_IOCTL_SYNCOBJ_EVENTFD.

Signed-off-by: Simon Ser <contact@emersion.fr>
9 months agoSync headers with drm-next
Simon Ser [Thu, 27 Jul 2023 13:56:46 +0000 (15:56 +0200)]
Sync headers with drm-next

Synchronize drm.h, drm_mode.h and drm_fourcc.h to drm-next.

Generated using make headers_install.
Generated from drm-next branch commit 52920704df878050123dfeb469aa6ab8022547c1

Signed-off-by: Simon Ser <contact@emersion.fr>
9 months agoxf86drm: drop control nodes implementation
Simon Ser [Fri, 14 Jul 2023 10:04:59 +0000 (12:04 +0200)]
xf86drm: drop control nodes implementation

Drop support for control nodes. The kernel never returns such
nodes. Stop trying to detect and handle them, and always return
an error when a caller tries to open them.

The header is left untouched to avoid breaking libdrm's API.

Signed-off-by: Simon Ser <contact@emersion.fr>
9 months agoxf86drm: bump DRM_MAX_MINOR to 64
Simon Ser [Mon, 17 Jul 2023 14:17:45 +0000 (16:17 +0200)]
xf86drm: bump DRM_MAX_MINOR to 64

This is what the kernel uses (see drm_minor_alloc).

Signed-off-by: Simon Ser <contact@emersion.fr>
9 months agoxf86drmMode: constify drmModeCrtcSetGamma
Xaver Hugl [Fri, 7 Apr 2023 23:42:17 +0000 (01:42 +0200)]
xf86drmMode: constify drmModeCrtcSetGamma

The data is never modified, so it should be const

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
9 months agotests/amdgpu/vcn: fix session buffer issue for vcn1-vcn3
Ruijing Dong [Mon, 10 Jul 2023 23:27:41 +0000 (19:27 -0400)]
tests/amdgpu/vcn: fix session buffer issue for vcn1-vcn3

issue:
   in vcn1-vcn3, session buffer was not truly added, it shows
   decoding creation commands cannot be sent multiple times.

problem:
   session buffer has to be the first buffer sending out.
   Otherwise, system could assume session buffer doesn't
   exist.

solution:
   move session buffer sending sequence to be the first one.

Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
9 months agotests/amdgpu/vcn:update decoder unit test
Saleemkhan Jamadar [Thu, 22 Jun 2023 08:57:10 +0000 (14:27 +0530)]
tests/amdgpu/vcn:update decoder unit test

update decoder unit test with session context buffer for VCN v1 to v4

v2: remove multiple checks for vcn4 (Ruijing Dong)

Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
11 months agoamdgpu: add an environment variable that overrides the context priority
Marek Olšák [Thu, 13 Apr 2023 15:01:51 +0000 (11:01 -0400)]
amdgpu: add an environment variable that overrides the context priority

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
11 months agotests/amdgpu/vcn: fix drm test failure
Ruijing Dong [Tue, 9 May 2023 20:15:41 +0000 (16:15 -0400)]
tests/amdgpu/vcn: fix drm test failure

1. fixed an issue that drm test vcn3/4 encoding test
   could cause VCN engine stuck.
2. adding missing or errous encoding ib package members.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
11 months agotests/amdgpu/vcn: change vbv_buffer name to input
Ruijing Dong [Tue, 9 May 2023 15:19:34 +0000 (11:19 -0400)]
tests/amdgpu/vcn: change vbv_buffer name to input

It is input buffer instead of vbv_buffer.
Correct its name.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
13 months agotests/amdgpu: Allow to exclude a test or a suite of tests
Luben Tuikov [Tue, 21 Mar 2023 12:51:50 +0000 (08:51 -0400)]
tests/amdgpu: Allow to exclude a test or a suite of tests

Add the command line argument -e s[.t] to exclude (disable) suite s, or to
exclude suite s test t.

This is useful for instance to run the Basic Suite, but disable the GPU reset
test, on the command line, like this:

    amdgpu_tests -s 1 -e 1.13

This option can be specified more than once on the command line, in order to
exclude more than one suite and/or suite and test combination from being run.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
13 months agotests/amdgpu: Add all 9 options to the help output
Luben Tuikov [Thu, 16 Mar 2023 22:17:18 +0000 (18:17 -0400)]
tests/amdgpu: Add all 9 options to the help output

Add -s and -t to the help output, as well as sort
the options output alphabetically.

v1: Fix a spelling in the subject of this commit.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
13 months agotests/amdgpu: Fix Usage string
Luben Tuikov [Thu, 16 Mar 2023 19:09:14 +0000 (15:09 -0400)]
tests/amdgpu: Fix Usage string

Fix the Usage: string on -h (help) in amdgpu_tests.c,
so brackets match, and remove mismatched angle brackets.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
13 months agoamdgpu: add marketing names from amd-5.4.3 (22.40.3)
Jonathan Gray [Sun, 19 Mar 2023 08:50:19 +0000 (19:50 +1100)]
amdgpu: add marketing names from amd-5.4.3 (22.40.3)

13 months agoamdgpu: remove va::dev member
Pierre-Eric Pelloux-Prayer [Mon, 20 Mar 2023 10:19:15 +0000 (11:19 +0100)]
amdgpu: remove va::dev member

This is unused so drop it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
13 months agotest/amdgpu/hotunplug: add apu check for hotplug test
jie zhang [Wed, 15 Feb 2023 04:45:05 +0000 (04:45 +0000)]
test/amdgpu/hotunplug: add apu check for hotplug test

For apu, it is integrated with cpu.
So hotplug test should be unnecessary for it.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
14 months agomeson: drop pthread-stubs dependency on BSDs
Jan Beich [Wed, 8 Sep 2021 09:14:20 +0000 (09:14 +0000)]
meson: drop pthread-stubs dependency on BSDs

pthread-stubs >= 0.4 simply passes -pthread which is similar to what
dependency('threads') returns. And make it a private dependency
for subprojects even on Linux.

Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
14 months agotests/util: Add vkms driver
Yi Xie [Thu, 2 Feb 2023 03:58:12 +0000 (12:58 +0900)]
tests/util: Add vkms driver

Add an entry for the "vkms" driver, so that the test utilities work with
the vkms driver without passing the -M argument.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Yi Xie <yixie@google.com>
14 months agobuild: bump version to 2.4.115 libdrm-2.4.115
Simon Ser [Thu, 9 Feb 2023 11:55:44 +0000 (12:55 +0100)]
build: bump version to 2.4.115

Signed-off-by: Simon Ser <contact@emersion.fr>
14 months agoxf86drm: add support for printing AMD GFX11 modifiers
Simon Ser [Wed, 21 Dec 2022 11:36:59 +0000 (12:36 +0100)]
xf86drm: add support for printing AMD GFX11 modifiers

See kernel commit 543036a2de71 ("drm/amd: Add GFX11 modifiers support
to AMDGPU (v3)").

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
16 months agoamdgpu: add some additional marketing names
Alex Deucher [Sun, 1 Jan 2023 19:14:58 +0000 (14:14 -0500)]
amdgpu: add some additional marketing names

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
16 months agoamdgpu: add marketing names from amd-5.4 (22.40)
Alex Deucher [Tue, 27 Dec 2022 17:24:14 +0000 (12:24 -0500)]
amdgpu: add marketing names from amd-5.4 (22.40)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
16 months agoxf86drm: fix warning in drmGetFormatModifierNameFromVivante()
Simon Ser [Wed, 21 Dec 2022 15:42:44 +0000 (16:42 +0100)]
xf86drm: fix warning in drmGetFormatModifierNameFromVivante()

Fixes the following warning:

    ../xf86drm.c: In function ‘drmGetFormatModifierNameFromVivante’:
    ../xf86drm.c:614:14: warning: passing argument 1 of ‘asprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
      614 |     asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression);
          |              ^~~~~~~~~~~~
          |              |
          |              const char **
    In file included from ../xf86drm.c:34:
    /usr/include/stdio.h:396:40: note: expected ‘char ** restrict’ but argument is of type ‘const char **’
      396 | extern int asprintf (char **__restrict __ptr,
          |                      ~~~~~~~~~~~~~~~~~~^~~~~
    ../xf86drm.c:615:12: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      615 |     return mod_vivante;
          |            ^~~~~~~~~~~

Signed-off-by: Simon Ser <contact@emersion.fr>
17 months agoxf86drm: Add support for decoding Vivante format modifiers
Philipp Zabel [Thu, 13 Oct 2022 11:44:38 +0000 (13:44 +0200)]
xf86drm: Add support for decoding Vivante format modifiers

Allow applications to pretty-print Vivante format modifiers.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
17 months agodrm_fourcc: sync drm_fourcc with latest drm-next kernel
Philipp Zabel [Wed, 30 Nov 2022 17:13:37 +0000 (18:13 +0100)]
drm_fourcc: sync drm_fourcc with latest drm-next kernel

Update drm_fourcc.h to include latest changes from drm-next branch.
This brings in sub-8bpp formats, AVUY and XVUY 8:8:8:8, and
Vivante tile-status and compression modifiers.

Generated using make headers_install.
Generated from drm-next branch commit 077bd80083ab

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
17 months agointel: Eliminate need to keep adding PCI IDs
Matt Roper [Tue, 25 Oct 2022 00:07:28 +0000 (17:07 -0700)]
intel: Eliminate need to keep adding PCI IDs

The Intel-specific code in libdrm is continually updated with new PCI
IDs for each new platform so that we can recognize the IP version
properly.  However this is mostly a pointless exercise; none of the
Intel code in libdrm is conditional on IP versions above 8.  If we just
treat any future unrecognized Intel platforms as IP version 8, we should
get the same behavior without the need for continued PCI ID updates.

Note that the intel_decode tool probably _should_ have conditions on
newer IP versions, but it was last updated for gen8 and has been
bitrotting from gen9 onward.  This change won't make the tool behave any
more incorrectly than it already does today.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
17 months agotests/amdgpu/jpeg: enable unit test for jpeg 4
Saleemkhan Jamadar [Tue, 8 Nov 2022 11:39:14 +0000 (17:09 +0530)]
tests/amdgpu/jpeg: enable unit test for jpeg 4

Enable decode unit test for jpeg4.

Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
17 months agotests/amdgpu: use AMDGPU_TIMEOUT_INFINITE to query fence
Lang Yu [Wed, 9 Nov 2022 06:29:57 +0000 (14:29 +0800)]
tests/amdgpu: use AMDGPU_TIMEOUT_INFINITE to query fence

We need to wait longer when running on emulator.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
18 months agobuild: bump version to 2.4.114 libdrm-2.4.114
Simon Ser [Thu, 3 Nov 2022 08:33:36 +0000 (09:33 +0100)]
build: bump version to 2.4.114

Signed-off-by: Simon Ser <contact@emersion.fr>
18 months agomodetest: use dumb buffer helpers
Simon Ser [Thu, 27 Oct 2022 17:13:06 +0000 (19:13 +0200)]
modetest: use dumb buffer helpers

Signed-off-by: Simon Ser <contact@emersion.fr>
18 months agomodetest: use sized integers in struct bo
Simon Ser [Wed, 2 Nov 2022 17:43:58 +0000 (18:43 +0100)]
modetest: use sized integers in struct bo

Use the same size types as the kernel.

Signed-off-by: Simon Ser <contact@emersion.fr>