diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/libdrm/README.md | 6 | ||||
| -rw-r--r-- | pkg/libdrm/fourcc.lua | 44 | ||||
| -rw-r--r-- | pkg/libdrm/gen.lua | 5 | ||||
| m--------- | pkg/libdrm/src | 0 | ||||
| -rw-r--r-- | pkg/libdrm/ver | 2 |
5 files changed, 53 insertions, 4 deletions
diff --git a/pkg/libdrm/README.md b/pkg/libdrm/README.md index 654422c0..bc650c97 100644 --- 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 new file mode 100644 index 00000000..0a0deaaa --- /dev/null +++ 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 index d0d4849d..bd58428e 100644 --- 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/src b/pkg/libdrm/src -Subproject 77b642b6dea5daac884fac470d0215fac2caf8f +Subproject 75254bf2390c10644ffb35a90fc8f18f196f9f0 diff --git a/pkg/libdrm/ver b/pkg/libdrm/ver index 72999df5..2a7e46b2 100644 --- a/pkg/libdrm/ver +++ b/pkg/libdrm/ver @@ -1 +1 @@ -2.4.106 r0 +2.4.120 r0 |
