linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
fourcc.lua
(1222B)
1 io.write[[
2 /* AUTOMATICALLY GENERATED by fourcc.lua. You should modify
3 that script instead of adding here entries manually! */
4 static const struct drmFormatModifierInfo drm_format_modifier_table[] = {
5 { DRM_MODIFIER_INVALID(NONE, INVALID) },
6 { DRM_MODIFIER_LINEAR(NONE, LINEAR) },
7 ]]
8
9 local vendors = {
10 ARM=true,
11 SAMSUNG=true,
12 QCOM=true,
13 VIVANTE=true,
14 NVIDIA=true,
15 BROADCOM=true,
16 ALLWINNER=true,
17 }
18 for line in io.lines() do
19 local mod = line:match('^#define I915_FORMAT_MOD_([%w_]+)')
20 if mod then
21 io.write(string.format(' { DRM_MODIFIER_INTEL(%s, %s) },\n', mod, mod))
22 end
23 local vendor, mod = line:match('^#define DRM_FORMAT_MOD_(%w+)_([%w_]+)%s')
24 if vendors[vendor] then
25 if vendor ~= 'ARM' or not mod:match('^TYPE_') then
26 io.write(string.format(' { DRM_MODIFIER(%s, %s, %s) },\n', vendor, mod, mod))
27 end
28 end
29 local vendor = line:match('^#define DRM_FORMAT_MOD_VENDOR_([%w_]+)')
30 if vendor then
31 table.insert(vendors, vendor)
32 end
33 end
34
35 io.write[[
36 };
37 static const struct drmFormatModifierVendorInfo drm_format_modifier_vendor_table[] = {
38 ]]
39 for _, vendor in ipairs(vendors) do
40 io.write(string.format(' { DRM_FORMAT_MOD_VENDOR_%s, "%s" },\n', vendor, vendor))
41 end
42 io.write[[
43 };
44 ]]