logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: bc9548d3a2251dcff4a5834ed40e0fa1763652bd
parent 59de97e9412dab937702d9d9d1f91fa6c6fcb562
Author: Michael Forney <mforney@mforney.org>
Date:   Thu,  8 Feb 2024 22:49:01 -0800

libdrm: Update to 2.4.120

Diffstat:

Mpkg/libdrm/README.md6+++---
Apkg/libdrm/fourcc.lua44++++++++++++++++++++++++++++++++++++++++++++
Mpkg/libdrm/gen.lua5+++++
Mpkg/libdrm/ver2+-
4 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/pkg/libdrm/README.md b/pkg/libdrm/README.md @@ -3,7 +3,7 @@ # `config.h` Generated with - meson build -Dintel=false -Dnouveau=false -Dradeon=false -Dvmwgfx=false -Dlibkms=false + meson build -Dintel=disabled -Dnouveau=disabled -Dradeon=disabled -Dvmwgfx=disabled -`HAVE_INTEL`, `HAVE_NOUVEAU`, and `HAVE_AMDGPU` were removed since they get -defined in `gen.lua` based on the keys in `config.video_drivers`. +`HAVE_INTEL` and `HAVE_NOUVEAU` were removed since they get defined +in `gen.lua` based on the keys in `config.video_drivers`. diff --git a/pkg/libdrm/fourcc.lua b/pkg/libdrm/fourcc.lua @@ -0,0 +1,44 @@ +io.write[[ +/* AUTOMATICALLY GENERATED by fourcc.lua. You should modify + that script instead of adding here entries manually! */ +static const struct drmFormatModifierInfo drm_format_modifier_table[] = { + { DRM_MODIFIER_INVALID(NONE, INVALID) }, + { DRM_MODIFIER_LINEAR(NONE, LINEAR) }, +]] + +local vendors = { + ARM=true, + SAMSUNG=true, + QCOM=true, + VIVANTE=true, + NVIDIA=true, + BROADCOM=true, + ALLWINNER=true, +} +for line in io.lines() do + local mod = line:match('^#define I915_FORMAT_MOD_([%w_]+)') + if mod then + io.write(string.format(' { DRM_MODIFIER_INTEL(%s, %s) },\n', mod, mod)) + end + local vendor, mod = line:match('^#define DRM_FORMAT_MOD_(%w+)_([%w_]+)%s') + if vendors[vendor] then + if vendor ~= 'ARM' or not mod:match('^TYPE_') then + io.write(string.format(' { DRM_MODIFIER(%s, %s, %s) },\n', vendor, mod, mod)) + end + end + local vendor = line:match('^#define DRM_FORMAT_MOD_VENDOR_([%w_]+)') + if vendor then + table.insert(vendors, vendor) + end +end + +io.write[[ +}; +static const struct drmFormatModifierVendorInfo drm_format_modifier_vendor_table[] = { +]] +for _, vendor in ipairs(vendors) do + io.write(string.format(' { DRM_FORMAT_MOD_VENDOR_%s, "%s" },\n', vendor, vendor)) +end +io.write[[ +}; +]] diff --git a/pkg/libdrm/gen.lua b/pkg/libdrm/gen.lua @@ -9,6 +9,7 @@ cflags{ havedriver('nouveau'), havedriver('amdgpu'), '-I $dir', + '-I $outdir', '-I $srcdir', '-I $srcdir/include/drm', '-isystem $builddir/pkg/linux-headers/include', @@ -28,9 +29,13 @@ pkg.hdrs = { } pkg.deps = { + '$outdir/generated_static_table_fourcc.h', 'pkg/linux-headers/headers', } +rule('fourcc', 'lua $dir/fourcc.lua <$in >$out') +build('fourcc', '$outdir/generated_static_table_fourcc.h', {'$srcdir/include/drm/drm_fourcc.h', '|', '$dir/fourcc.lua'}) + lib('libdrm.a', { 'xf86drm.c', 'xf86drmHash.c', diff --git a/pkg/libdrm/ver b/pkg/libdrm/ver @@ -1 +1 @@ -2.4.106 r0 +2.4.120 r0