@zigc/lib 0.17.0-dev.131 → 0.17.0-dev.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libc/include/aarch64-linux-any/asm/hwcap.h +1 -0
- package/libc/include/aarch64-linux-any/asm/unistd_64.h +1 -0
- package/libc/include/any-linux-any/asm-generic/errno.h +2 -0
- package/libc/include/any-linux-any/asm-generic/unistd.h +4 -1
- package/libc/include/any-linux-any/drm/amdgpu_drm.h +20 -6
- package/libc/include/any-linux-any/drm/amdxdna_accel.h +8 -0
- package/libc/include/any-linux-any/drm/drm_fourcc.h +6 -6
- package/libc/include/any-linux-any/drm/panfrost_drm.h +75 -1
- package/libc/include/any-linux-any/drm/panthor_drm.h +154 -3
- package/libc/include/any-linux-any/drm/rocket_accel.h +74 -24
- package/libc/include/any-linux-any/drm/xe_drm.h +89 -6
- package/libc/include/any-linux-any/linux/android/binder.h +1 -1
- package/libc/include/any-linux-any/linux/bpf.h +28 -0
- package/libc/include/any-linux-any/linux/btrfs.h +1 -0
- package/libc/include/any-linux-any/linux/btrfs_tree.h +32 -2
- package/libc/include/any-linux-any/linux/dma-buf.h +1 -0
- package/libc/include/any-linux-any/linux/dpll.h +1 -0
- package/libc/include/any-linux-any/linux/elf.h +2 -0
- package/libc/include/any-linux-any/linux/ethtool.h +21 -5
- package/libc/include/any-linux-any/linux/fs.h +1 -0
- package/libc/include/any-linux-any/linux/hyperv.h +1 -1
- package/libc/include/any-linux-any/linux/idxd.h +134 -134
- package/libc/include/any-linux-any/linux/if_alg.h +1 -1
- package/libc/include/any-linux-any/linux/if_link.h +1 -0
- package/libc/include/any-linux-any/linux/input-event-codes.h +4 -0
- package/libc/include/any-linux-any/linux/io_uring/bpf_filter.h +68 -0
- package/libc/include/any-linux-any/linux/io_uring/query.h +5 -1
- package/libc/include/any-linux-any/linux/io_uring.h +33 -2
- package/libc/include/any-linux-any/linux/iommufd.h +39 -0
- package/libc/include/any-linux-any/linux/kfd_ioctl.h +13 -3
- package/libc/include/any-linux-any/linux/kfd_sysfs.h +2 -1
- package/libc/include/any-linux-any/linux/kvm.h +30 -6
- package/libc/include/any-linux-any/linux/landlock.h +22 -8
- package/libc/include/any-linux-any/linux/magic.h +1 -0
- package/libc/include/any-linux-any/linux/mempolicy.h +3 -0
- package/libc/include/any-linux-any/linux/mount.h +11 -2
- package/libc/include/any-linux-any/linux/mptcp_pm.h +1 -1
- package/libc/include/any-linux-any/linux/mshv.h +2 -0
- package/libc/include/any-linux-any/linux/netfilter_bridge.h +5 -4
- package/libc/include/any-linux-any/linux/netfilter_ipv4.h +4 -5
- package/libc/include/any-linux-any/linux/netfilter_ipv6.h +3 -4
- package/libc/include/any-linux-any/linux/nfs.h +1 -1
- package/libc/include/any-linux-any/linux/nfsd_netlink.h +1 -0
- package/libc/include/any-linux-any/linux/nilfs2_api.h +2 -2
- package/libc/include/any-linux-any/linux/nilfs2_ondisk.h +97 -66
- package/libc/include/any-linux-any/linux/nl80211.h +104 -3
- package/libc/include/any-linux-any/linux/pci.h +7 -0
- package/libc/include/any-linux-any/linux/pci_regs.h +65 -6
- package/libc/include/any-linux-any/linux/pcitest.h +1 -0
- package/libc/include/any-linux-any/linux/perf_event.h +24 -3
- package/libc/include/any-linux-any/linux/pkt_sched.h +1 -0
- package/libc/include/any-linux-any/linux/prctl.h +30 -0
- package/libc/include/any-linux-any/linux/rseq.h +62 -5
- package/libc/include/any-linux-any/linux/shm.h +0 -1
- package/libc/include/any-linux-any/linux/stddef.h +4 -0
- package/libc/include/any-linux-any/linux/sysctl.h +1 -2
- package/libc/include/any-linux-any/linux/taskstats.h +12 -1
- package/libc/include/any-linux-any/linux/tcp.h +23 -3
- package/libc/include/any-linux-any/linux/typelimits.h +8 -0
- package/libc/include/any-linux-any/linux/ublk_cmd.h +120 -1
- package/libc/include/any-linux-any/linux/v4l2-controls.h +63 -0
- package/libc/include/any-linux-any/linux/vbox_vmmdev_types.h +2 -2
- package/libc/include/any-linux-any/linux/vduse.h +80 -5
- package/libc/include/any-linux-any/linux/version.h +3 -3
- package/libc/include/any-linux-any/linux/vfio.h +4 -0
- package/libc/include/any-linux-any/linux/videodev2.h +3 -0
- package/libc/include/any-linux-any/linux/virtio_ring.h +1 -2
- package/libc/include/any-linux-any/linux/vmclock-abi.h +20 -0
- package/libc/include/any-linux-any/rdma/bnxt_re-abi.h +16 -0
- package/libc/include/any-linux-any/rdma/ib_user_ioctl_cmds.h +16 -0
- package/libc/include/any-linux-any/rdma/mana-abi.h +3 -0
- package/libc/include/any-linux-any/scsi/scsi_bsg_ufs.h +8 -9
- package/libc/include/any-linux-any/sound/sof/tokens.h +6 -0
- package/libc/include/arc-linux-any/asm/swab.h +0 -63
- package/libc/include/arc-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/arm-linux-any/asm/ptrace.h +0 -9
- package/libc/include/arm-linux-any/asm/unistd-eabi.h +1 -0
- package/libc/include/arm-linux-any/asm/unistd-oabi.h +1 -0
- package/libc/include/csky-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/hexagon-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/loongarch-linux-any/asm/hwcap.h +1 -0
- package/libc/include/loongarch-linux-any/asm/kvm.h +1 -0
- package/libc/include/loongarch-linux-any/asm/kvm_para.h +1 -0
- package/libc/include/loongarch-linux-any/asm/unistd_32.h +2 -0
- package/libc/include/loongarch-linux-any/asm/unistd_64.h +2 -0
- package/libc/include/m68k-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/mips-linux-any/asm/errno.h +2 -0
- package/libc/include/mips-linux-any/asm/unistd_n32.h +1 -0
- package/libc/include/mips-linux-any/asm/unistd_n64.h +1 -0
- package/libc/include/mips-linux-any/asm/unistd_o32.h +1 -0
- package/libc/include/powerpc-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/powerpc-linux-any/asm/unistd_64.h +1 -0
- package/libc/include/riscv-linux-any/asm/hwprobe.h +4 -0
- package/libc/include/riscv-linux-any/asm/kvm.h +3 -0
- package/libc/include/riscv-linux-any/asm/ptrace.h +37 -0
- package/libc/include/riscv-linux-any/asm/sigcontext.h +1 -0
- package/libc/include/riscv-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/riscv-linux-any/asm/unistd_64.h +1 -0
- package/libc/include/s390x-linux-any/asm/unistd_64.h +1 -0
- package/libc/include/sparc-linux-any/asm/errno.h +2 -0
- package/libc/include/sparc-linux-any/asm/ioctls.h +4 -4
- package/libc/include/sparc-linux-any/asm/unistd_32.h +2 -0
- package/libc/include/sparc-linux-any/asm/unistd_64.h +2 -0
- package/libc/include/x86-linux-any/asm/auxvec.h +0 -4
- package/libc/include/x86-linux-any/asm/kvm.h +13 -8
- package/libc/include/x86-linux-any/asm/svm.h +16 -16
- package/libc/include/x86-linux-any/asm/unistd_32.h +1 -0
- package/libc/include/x86-linux-any/asm/unistd_64.h +1 -0
- package/libc/include/x86-linux-any/asm/unistd_x32.h +1 -0
- package/libc/include/xtensa-linux-any/asm/unistd_32.h +1 -0
- package/package.json +1 -1
- package/std/os/linux/syscalls.zig +26 -1
- package/libc/include/hexagon-linux-any/asm/signal.h +0 -29
- package/libc/include/s390x-linux-any/asm/tape390.h +0 -103
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
#define EMULTIHOP 72 /* Multihop attempted */
|
|
56
56
|
#define EDOTDOT 73 /* RFS specific error */
|
|
57
57
|
#define EBADMSG 74 /* Not a data message */
|
|
58
|
+
#define EFSBADCRC EBADMSG /* Bad CRC detected */
|
|
58
59
|
#define EOVERFLOW 75 /* Value too large for defined data type */
|
|
59
60
|
#define ENOTUNIQ 76 /* Name not unique on network */
|
|
60
61
|
#define EBADFD 77 /* File descriptor in bad state */
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
#define EINPROGRESS 115 /* Operation now in progress */
|
|
99
100
|
#define ESTALE 116 /* Stale file handle */
|
|
100
101
|
#define EUCLEAN 117 /* Structure needs cleaning */
|
|
102
|
+
#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */
|
|
101
103
|
#define ENOTNAM 118 /* Not a XENIX named type file */
|
|
102
104
|
#define ENAVAIL 119 /* No XENIX semaphores available */
|
|
103
105
|
#define EISNAM 120 /* Is a named type file */
|
|
@@ -860,8 +860,11 @@ __SYSCALL(__NR_file_setattr, sys_file_setattr)
|
|
|
860
860
|
#define __NR_listns 470
|
|
861
861
|
__SYSCALL(__NR_listns, sys_listns)
|
|
862
862
|
|
|
863
|
+
#define __NR_rseq_slice_yield 471
|
|
864
|
+
__SYSCALL(__NR_rseq_slice_yield, sys_rseq_slice_yield)
|
|
865
|
+
|
|
863
866
|
#undef __NR_syscalls
|
|
864
|
-
#define __NR_syscalls
|
|
867
|
+
#define __NR_syscalls 472
|
|
865
868
|
|
|
866
869
|
/*
|
|
867
870
|
* 32 bit systems traditionally used different
|
|
@@ -105,8 +105,6 @@ extern "C" {
|
|
|
105
105
|
*
|
|
106
106
|
* %AMDGPU_GEM_DOMAIN_DOORBELL Doorbell. It is an MMIO region for
|
|
107
107
|
* signalling user mode queues.
|
|
108
|
-
*
|
|
109
|
-
* %AMDGPU_GEM_DOMAIN_MMIO_REMAP MMIO remap page (special mapping for HDP flushing).
|
|
110
108
|
*/
|
|
111
109
|
#define AMDGPU_GEM_DOMAIN_CPU 0x1
|
|
112
110
|
#define AMDGPU_GEM_DOMAIN_GTT 0x2
|
|
@@ -115,15 +113,13 @@ extern "C" {
|
|
|
115
113
|
#define AMDGPU_GEM_DOMAIN_GWS 0x10
|
|
116
114
|
#define AMDGPU_GEM_DOMAIN_OA 0x20
|
|
117
115
|
#define AMDGPU_GEM_DOMAIN_DOORBELL 0x40
|
|
118
|
-
#define AMDGPU_GEM_DOMAIN_MMIO_REMAP 0x80
|
|
119
116
|
#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | \
|
|
120
117
|
AMDGPU_GEM_DOMAIN_GTT | \
|
|
121
118
|
AMDGPU_GEM_DOMAIN_VRAM | \
|
|
122
119
|
AMDGPU_GEM_DOMAIN_GDS | \
|
|
123
120
|
AMDGPU_GEM_DOMAIN_GWS | \
|
|
124
121
|
AMDGPU_GEM_DOMAIN_OA | \
|
|
125
|
-
AMDGPU_GEM_DOMAIN_DOORBELL
|
|
126
|
-
AMDGPU_GEM_DOMAIN_MMIO_REMAP)
|
|
122
|
+
AMDGPU_GEM_DOMAIN_DOORBELL)
|
|
127
123
|
|
|
128
124
|
/* Flag that CPU access will be required for the case of VRAM domain */
|
|
129
125
|
#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0)
|
|
@@ -883,7 +879,7 @@ struct drm_amdgpu_gem_list_handles_entry {
|
|
|
883
879
|
#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2)
|
|
884
880
|
/* executable mapping, new for VI */
|
|
885
881
|
#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3)
|
|
886
|
-
/* partially resident
|
|
882
|
+
/* unmapped page of partially resident textures */
|
|
887
883
|
#define AMDGPU_VM_PAGE_PRT (1 << 4)
|
|
888
884
|
/* MTYPE flags use bit 5 to 8 */
|
|
889
885
|
#define AMDGPU_VM_MTYPE_MASK (0xf << 5)
|
|
@@ -1427,6 +1423,7 @@ struct drm_amdgpu_info_vbios {
|
|
|
1427
1423
|
#define AMDGPU_VRAM_TYPE_LPDDR4 11
|
|
1428
1424
|
#define AMDGPU_VRAM_TYPE_LPDDR5 12
|
|
1429
1425
|
#define AMDGPU_VRAM_TYPE_HBM3E 13
|
|
1426
|
+
#define AMDGPU_VRAM_TYPE_HBM4 14
|
|
1430
1427
|
|
|
1431
1428
|
struct drm_amdgpu_info_device {
|
|
1432
1429
|
/** PCI Device ID */
|
|
@@ -1629,9 +1626,25 @@ struct drm_amdgpu_info_uq_metadata_gfx {
|
|
|
1629
1626
|
__u32 csa_alignment;
|
|
1630
1627
|
};
|
|
1631
1628
|
|
|
1629
|
+
struct drm_amdgpu_info_uq_metadata_compute {
|
|
1630
|
+
/* EOP size for gfx11 */
|
|
1631
|
+
__u32 eop_size;
|
|
1632
|
+
/* EOP base virtual alignment for gfx11 */
|
|
1633
|
+
__u32 eop_alignment;
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
struct drm_amdgpu_info_uq_metadata_sdma {
|
|
1637
|
+
/* context save area size for sdma6 */
|
|
1638
|
+
__u32 csa_size;
|
|
1639
|
+
/* context save area base virtual alignment for sdma6 */
|
|
1640
|
+
__u32 csa_alignment;
|
|
1641
|
+
};
|
|
1642
|
+
|
|
1632
1643
|
struct drm_amdgpu_info_uq_metadata {
|
|
1633
1644
|
union {
|
|
1634
1645
|
struct drm_amdgpu_info_uq_metadata_gfx gfx;
|
|
1646
|
+
struct drm_amdgpu_info_uq_metadata_compute compute;
|
|
1647
|
+
struct drm_amdgpu_info_uq_metadata_sdma sdma;
|
|
1635
1648
|
};
|
|
1636
1649
|
};
|
|
1637
1650
|
|
|
@@ -1654,6 +1667,7 @@ struct drm_amdgpu_info_uq_metadata {
|
|
|
1654
1667
|
#define AMDGPU_FAMILY_GC_10_3_6 149 /* GC 10.3.6 */
|
|
1655
1668
|
#define AMDGPU_FAMILY_GC_10_3_7 151 /* GC 10.3.7 */
|
|
1656
1669
|
#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
|
|
1670
|
+
#define AMDGPU_FAMILY_GC_11_5_4 154 /* GC 11.5.4 */
|
|
1657
1671
|
#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
|
|
1658
1672
|
|
|
1659
1673
|
#if defined(__cplusplus)
|
|
@@ -19,6 +19,14 @@ extern "C" {
|
|
|
19
19
|
#define AMDXDNA_INVALID_BO_HANDLE 0
|
|
20
20
|
#define AMDXDNA_INVALID_FENCE_HANDLE 0
|
|
21
21
|
|
|
22
|
+
/*
|
|
23
|
+
* Define hardware context priority
|
|
24
|
+
*/
|
|
25
|
+
#define AMDXDNA_QOS_REALTIME_PRIORITY 0x100
|
|
26
|
+
#define AMDXDNA_QOS_HIGH_PRIORITY 0x180
|
|
27
|
+
#define AMDXDNA_QOS_NORMAL_PRIORITY 0x200
|
|
28
|
+
#define AMDXDNA_QOS_LOW_PRIORITY 0x280
|
|
29
|
+
|
|
22
30
|
enum amdxdna_device_type {
|
|
23
31
|
AMDXDNA_DEV_TYPE_UNKNOWN = -1,
|
|
24
32
|
AMDXDNA_DEV_TYPE_KMQ,
|
|
@@ -401,8 +401,8 @@ extern "C" {
|
|
|
401
401
|
* implementation can multiply the values by 2^6=64. For that reason the padding
|
|
402
402
|
* must only contain zeros.
|
|
403
403
|
* index 0 = Y plane, [15:0] z:Y [6:10] little endian
|
|
404
|
-
* index 1 =
|
|
405
|
-
* index 2 =
|
|
404
|
+
* index 1 = Cb plane, [15:0] z:Cb [6:10] little endian
|
|
405
|
+
* index 2 = Cr plane, [15:0] z:Cr [6:10] little endian
|
|
406
406
|
*/
|
|
407
407
|
#define DRM_FORMAT_S010 fourcc_code('S', '0', '1', '0') /* 2x2 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
|
|
408
408
|
#define DRM_FORMAT_S210 fourcc_code('S', '2', '1', '0') /* 2x1 subsampled Cb (1) and Cr (2) planes 10 bits per channel */
|
|
@@ -414,8 +414,8 @@ extern "C" {
|
|
|
414
414
|
* implementation can multiply the values by 2^4=16. For that reason the padding
|
|
415
415
|
* must only contain zeros.
|
|
416
416
|
* index 0 = Y plane, [15:0] z:Y [4:12] little endian
|
|
417
|
-
* index 1 =
|
|
418
|
-
* index 2 =
|
|
417
|
+
* index 1 = Cb plane, [15:0] z:Cb [4:12] little endian
|
|
418
|
+
* index 2 = Cr plane, [15:0] z:Cr [4:12] little endian
|
|
419
419
|
*/
|
|
420
420
|
#define DRM_FORMAT_S012 fourcc_code('S', '0', '1', '2') /* 2x2 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
|
|
421
421
|
#define DRM_FORMAT_S212 fourcc_code('S', '2', '1', '2') /* 2x1 subsampled Cb (1) and Cr (2) planes 12 bits per channel */
|
|
@@ -424,8 +424,8 @@ extern "C" {
|
|
|
424
424
|
/*
|
|
425
425
|
* 3 plane YCbCr
|
|
426
426
|
* index 0 = Y plane, [15:0] Y little endian
|
|
427
|
-
* index 1 =
|
|
428
|
-
* index 2 =
|
|
427
|
+
* index 1 = Cb plane, [15:0] Cb little endian
|
|
428
|
+
* index 2 = Cr plane, [15:0] Cr little endian
|
|
429
429
|
*/
|
|
430
430
|
#define DRM_FORMAT_S016 fourcc_code('S', '0', '1', '6') /* 2x2 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
|
|
431
431
|
#define DRM_FORMAT_S216 fourcc_code('S', '2', '1', '6') /* 2x1 subsampled Cb (1) and Cr (2) planes 16 bits per channel */
|
|
@@ -24,6 +24,8 @@ extern "C" {
|
|
|
24
24
|
#define DRM_PANFROST_SET_LABEL_BO 0x09
|
|
25
25
|
#define DRM_PANFROST_JM_CTX_CREATE 0x0a
|
|
26
26
|
#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
|
|
27
|
+
#define DRM_PANFROST_SYNC_BO 0x0c
|
|
28
|
+
#define DRM_PANFROST_QUERY_BO_INFO 0x0d
|
|
27
29
|
|
|
28
30
|
#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
|
|
29
31
|
#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
|
|
@@ -35,6 +37,8 @@ extern "C" {
|
|
|
35
37
|
#define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
|
|
36
38
|
#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
|
|
37
39
|
#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
|
|
40
|
+
#define DRM_IOCTL_PANFROST_SYNC_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SYNC_BO, struct drm_panfrost_sync_bo)
|
|
41
|
+
#define DRM_IOCTL_PANFROST_QUERY_BO_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_QUERY_BO_INFO, struct drm_panfrost_query_bo_info)
|
|
38
42
|
|
|
39
43
|
/*
|
|
40
44
|
* Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
|
|
@@ -120,9 +124,12 @@ struct drm_panfrost_wait_bo {
|
|
|
120
124
|
__s64 timeout_ns;
|
|
121
125
|
};
|
|
122
126
|
|
|
123
|
-
/* Valid flags to pass to drm_panfrost_create_bo
|
|
127
|
+
/* Valid flags to pass to drm_panfrost_create_bo.
|
|
128
|
+
* PANFROST_BO_WB_MMAP can't be set if PANFROST_BO_HEAP is.
|
|
129
|
+
*/
|
|
124
130
|
#define PANFROST_BO_NOEXEC 1
|
|
125
131
|
#define PANFROST_BO_HEAP 2
|
|
132
|
+
#define PANFROST_BO_WB_MMAP 4
|
|
126
133
|
|
|
127
134
|
/**
|
|
128
135
|
* struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
|
|
@@ -228,6 +235,13 @@ enum drm_panfrost_param {
|
|
|
228
235
|
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
|
|
229
236
|
DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
|
|
230
237
|
DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
|
|
238
|
+
DRM_PANFROST_PARAM_SELECTED_COHERENCY,
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
enum drm_panfrost_gpu_coherency {
|
|
242
|
+
DRM_PANFROST_GPU_COHERENCY_ACE_LITE = 0,
|
|
243
|
+
DRM_PANFROST_GPU_COHERENCY_ACE = 1,
|
|
244
|
+
DRM_PANFROST_GPU_COHERENCY_NONE = 31,
|
|
231
245
|
};
|
|
232
246
|
|
|
233
247
|
struct drm_panfrost_get_param {
|
|
@@ -301,6 +315,66 @@ struct drm_panfrost_set_label_bo {
|
|
|
301
315
|
__u64 label;
|
|
302
316
|
};
|
|
303
317
|
|
|
318
|
+
/* Valid flags to pass to drm_panfrost_bo_sync_op */
|
|
319
|
+
#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH 0
|
|
320
|
+
#define PANFROST_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE 1
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* struct drm_panthor_bo_flush_map_op - BO map sync op
|
|
324
|
+
*/
|
|
325
|
+
struct drm_panfrost_bo_sync_op {
|
|
326
|
+
/** @handle: Handle of the buffer object to sync. */
|
|
327
|
+
__u32 handle;
|
|
328
|
+
|
|
329
|
+
/** @type: Type of sync operation. */
|
|
330
|
+
__u32 type;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @offset: Offset into the BO at which the sync range starts.
|
|
334
|
+
*
|
|
335
|
+
* This will be rounded down to the nearest cache line as needed.
|
|
336
|
+
*/
|
|
337
|
+
__u32 offset;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* @size: Size of the range to sync
|
|
341
|
+
*
|
|
342
|
+
* @size + @offset will be rounded up to the nearest cache line as
|
|
343
|
+
* needed.
|
|
344
|
+
*/
|
|
345
|
+
__u32 size;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* struct drm_panfrost_sync_bo - ioctl argument for syncing BO maps
|
|
350
|
+
*/
|
|
351
|
+
struct drm_panfrost_sync_bo {
|
|
352
|
+
/** Array of struct drm_panfrost_bo_sync_op */
|
|
353
|
+
__u64 ops;
|
|
354
|
+
|
|
355
|
+
/** Number of BO sync ops */
|
|
356
|
+
__u32 op_count;
|
|
357
|
+
|
|
358
|
+
__u32 pad;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/** BO comes from a different subsystem. */
|
|
362
|
+
#define DRM_PANFROST_BO_IS_IMPORTED (1 << 0)
|
|
363
|
+
|
|
364
|
+
struct drm_panfrost_query_bo_info {
|
|
365
|
+
/** Handle of the object being queried. */
|
|
366
|
+
__u32 handle;
|
|
367
|
+
|
|
368
|
+
/** Extra flags that are not coming from the BO_CREATE ioctl(). */
|
|
369
|
+
__u32 extra_flags;
|
|
370
|
+
|
|
371
|
+
/** Flags passed at creation time. */
|
|
372
|
+
__u32 create_flags;
|
|
373
|
+
|
|
374
|
+
/** Will be zero on return. */
|
|
375
|
+
__u32 pad;
|
|
376
|
+
};
|
|
377
|
+
|
|
304
378
|
/* Definitions for coredump decoding in user space */
|
|
305
379
|
#define PANFROSTDUMP_MAJOR 1
|
|
306
380
|
#define PANFROSTDUMP_MINOR 0
|
|
@@ -144,6 +144,16 @@ enum drm_panthor_ioctl_id {
|
|
|
144
144
|
* pgoff_t size.
|
|
145
145
|
*/
|
|
146
146
|
DRM_PANTHOR_SET_USER_MMIO_OFFSET,
|
|
147
|
+
|
|
148
|
+
/** @DRM_PANTHOR_BO_SYNC: Sync BO data to/from the device */
|
|
149
|
+
DRM_PANTHOR_BO_SYNC,
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @DRM_PANTHOR_BO_QUERY_INFO: Query information about a BO.
|
|
153
|
+
*
|
|
154
|
+
* This is useful for imported BOs.
|
|
155
|
+
*/
|
|
156
|
+
DRM_PANTHOR_BO_QUERY_INFO,
|
|
147
157
|
};
|
|
148
158
|
|
|
149
159
|
/**
|
|
@@ -245,6 +255,26 @@ enum drm_panthor_dev_query_type {
|
|
|
245
255
|
DRM_PANTHOR_DEV_QUERY_GROUP_PRIORITIES_INFO,
|
|
246
256
|
};
|
|
247
257
|
|
|
258
|
+
/**
|
|
259
|
+
* enum drm_panthor_gpu_coherency: Type of GPU coherency
|
|
260
|
+
*/
|
|
261
|
+
enum drm_panthor_gpu_coherency {
|
|
262
|
+
/**
|
|
263
|
+
* @DRM_PANTHOR_GPU_COHERENCY_ACE_LITE: ACE Lite coherency.
|
|
264
|
+
*/
|
|
265
|
+
DRM_PANTHOR_GPU_COHERENCY_ACE_LITE = 0,
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @DRM_PANTHOR_GPU_COHERENCY_ACE: ACE coherency.
|
|
269
|
+
*/
|
|
270
|
+
DRM_PANTHOR_GPU_COHERENCY_ACE = 1,
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @DRM_PANTHOR_GPU_COHERENCY_NONE: No coherency.
|
|
274
|
+
*/
|
|
275
|
+
DRM_PANTHOR_GPU_COHERENCY_NONE = 31,
|
|
276
|
+
};
|
|
277
|
+
|
|
248
278
|
/**
|
|
249
279
|
* struct drm_panthor_gpu_info - GPU information
|
|
250
280
|
*
|
|
@@ -301,7 +331,16 @@ struct drm_panthor_gpu_info {
|
|
|
301
331
|
*/
|
|
302
332
|
__u32 thread_max_barrier_size;
|
|
303
333
|
|
|
304
|
-
/**
|
|
334
|
+
/**
|
|
335
|
+
* @coherency_features: Coherency features.
|
|
336
|
+
*
|
|
337
|
+
* Combination of drm_panthor_gpu_coherency flags.
|
|
338
|
+
*
|
|
339
|
+
* Note that this is just what the coherency protocols supported by the
|
|
340
|
+
* GPU, but the actual coherency in place depends on the SoC
|
|
341
|
+
* integration and is reflected by
|
|
342
|
+
* drm_panthor_gpu_info::selected_coherency.
|
|
343
|
+
*/
|
|
305
344
|
__u32 coherency_features;
|
|
306
345
|
|
|
307
346
|
/** @texture_features: Texture features. */
|
|
@@ -310,8 +349,12 @@ struct drm_panthor_gpu_info {
|
|
|
310
349
|
/** @as_present: Bitmask encoding the number of address-space exposed by the MMU. */
|
|
311
350
|
__u32 as_present;
|
|
312
351
|
|
|
313
|
-
/**
|
|
314
|
-
|
|
352
|
+
/**
|
|
353
|
+
* @selected_coherency: Coherency selected for this device.
|
|
354
|
+
*
|
|
355
|
+
* One of drm_panthor_gpu_coherency.
|
|
356
|
+
*/
|
|
357
|
+
__u32 selected_coherency;
|
|
315
358
|
|
|
316
359
|
/** @shader_present: Bitmask encoding the shader cores exposed by the GPU. */
|
|
317
360
|
__u64 shader_present;
|
|
@@ -638,6 +681,15 @@ struct drm_panthor_vm_get_state {
|
|
|
638
681
|
enum drm_panthor_bo_flags {
|
|
639
682
|
/** @DRM_PANTHOR_BO_NO_MMAP: The buffer object will never be CPU-mapped in userspace. */
|
|
640
683
|
DRM_PANTHOR_BO_NO_MMAP = (1 << 0),
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* @DRM_PANTHOR_BO_WB_MMAP: Force "Write-Back Cacheable" CPU mapping.
|
|
687
|
+
*
|
|
688
|
+
* CPU map the buffer object in userspace by forcing the "Write-Back
|
|
689
|
+
* Cacheable" cacheability attribute. The mapping otherwise uses the
|
|
690
|
+
* "Non-Cacheable" attribute if the GPU is not IO coherent.
|
|
691
|
+
*/
|
|
692
|
+
DRM_PANTHOR_BO_WB_MMAP = (1 << 1),
|
|
641
693
|
};
|
|
642
694
|
|
|
643
695
|
/**
|
|
@@ -1040,6 +1092,101 @@ struct drm_panthor_set_user_mmio_offset {
|
|
|
1040
1092
|
__u64 offset;
|
|
1041
1093
|
};
|
|
1042
1094
|
|
|
1095
|
+
/**
|
|
1096
|
+
* enum drm_panthor_bo_sync_op_type - BO sync type
|
|
1097
|
+
*/
|
|
1098
|
+
enum drm_panthor_bo_sync_op_type {
|
|
1099
|
+
/** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH: Flush CPU caches. */
|
|
1100
|
+
DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH = 0,
|
|
1101
|
+
|
|
1102
|
+
/** @DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE: Flush and invalidate CPU caches. */
|
|
1103
|
+
DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE = 1,
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* struct drm_panthor_bo_sync_op - BO map sync op
|
|
1108
|
+
*/
|
|
1109
|
+
struct drm_panthor_bo_sync_op {
|
|
1110
|
+
/** @handle: Handle of the buffer object to sync. */
|
|
1111
|
+
__u32 handle;
|
|
1112
|
+
|
|
1113
|
+
/** @type: Type of operation. */
|
|
1114
|
+
__u32 type;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @offset: Offset into the BO at which the sync range starts.
|
|
1118
|
+
*
|
|
1119
|
+
* This will be rounded down to the nearest cache line as needed.
|
|
1120
|
+
*/
|
|
1121
|
+
__u64 offset;
|
|
1122
|
+
|
|
1123
|
+
/**
|
|
1124
|
+
* @size: Size of the range to sync
|
|
1125
|
+
*
|
|
1126
|
+
* @size + @offset will be rounded up to the nearest cache line as
|
|
1127
|
+
* needed.
|
|
1128
|
+
*/
|
|
1129
|
+
__u64 size;
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* struct drm_panthor_bo_sync - BO map sync request
|
|
1134
|
+
*/
|
|
1135
|
+
struct drm_panthor_bo_sync {
|
|
1136
|
+
/**
|
|
1137
|
+
* @ops: Array of struct drm_panthor_bo_sync_op sync operations.
|
|
1138
|
+
*/
|
|
1139
|
+
struct drm_panthor_obj_array ops;
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* enum drm_panthor_bo_extra_flags - Set of flags returned on a BO_QUERY_INFO request
|
|
1144
|
+
*
|
|
1145
|
+
* Those are flags reflecting BO properties that are not directly coming from the flags
|
|
1146
|
+
* passed are creation time, or information on BOs that were imported from other drivers.
|
|
1147
|
+
*/
|
|
1148
|
+
enum drm_panthor_bo_extra_flags {
|
|
1149
|
+
/**
|
|
1150
|
+
* @DRM_PANTHOR_BO_IS_IMPORTED: BO has been imported from an external driver.
|
|
1151
|
+
*
|
|
1152
|
+
* Note that imported dma-buf handles are not flagged as imported if they
|
|
1153
|
+
* where exported by panthor. Only buffers that are coming from other drivers
|
|
1154
|
+
* (dma heaps, other GPUs, display controllers, V4L, ...).
|
|
1155
|
+
*
|
|
1156
|
+
* It's also important to note that all imported BOs are mapped cached and can't
|
|
1157
|
+
* be considered IO-coherent even if the GPU is. This means they require explicit
|
|
1158
|
+
* syncs that must go through the DRM_PANTHOR_BO_SYNC ioctl (userland cache
|
|
1159
|
+
* maintenance is not allowed in that case, because extra operations might be
|
|
1160
|
+
* needed to make changes visible to the CPU/device, like buffer migration when the
|
|
1161
|
+
* exporter is a GPU with its own VRAM).
|
|
1162
|
+
*/
|
|
1163
|
+
DRM_PANTHOR_BO_IS_IMPORTED = (1 << 0),
|
|
1164
|
+
};
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* struct drm_panthor_bo_query_info - Query BO info
|
|
1168
|
+
*/
|
|
1169
|
+
struct drm_panthor_bo_query_info {
|
|
1170
|
+
/** @handle: Handle of the buffer object to query flags on. */
|
|
1171
|
+
__u32 handle;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* @extra_flags: Combination of enum drm_panthor_bo_extra_flags flags.
|
|
1175
|
+
*/
|
|
1176
|
+
__u32 extra_flags;
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* @create_flags: Flags passed at creation time.
|
|
1180
|
+
*
|
|
1181
|
+
* Combination of enum drm_panthor_bo_flags flags.
|
|
1182
|
+
* Will be zero if the buffer comes from a different driver.
|
|
1183
|
+
*/
|
|
1184
|
+
__u32 create_flags;
|
|
1185
|
+
|
|
1186
|
+
/** @pad: Will be zero on return. */
|
|
1187
|
+
__u32 pad;
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1043
1190
|
/**
|
|
1044
1191
|
* DRM_IOCTL_PANTHOR() - Build a Panthor IOCTL number
|
|
1045
1192
|
* @__access: Access type. Must be R, W or RW.
|
|
@@ -1086,6 +1233,10 @@ enum {
|
|
|
1086
1233
|
DRM_IOCTL_PANTHOR(WR, BO_SET_LABEL, bo_set_label),
|
|
1087
1234
|
DRM_IOCTL_PANTHOR_SET_USER_MMIO_OFFSET =
|
|
1088
1235
|
DRM_IOCTL_PANTHOR(WR, SET_USER_MMIO_OFFSET, set_user_mmio_offset),
|
|
1236
|
+
DRM_IOCTL_PANTHOR_BO_SYNC =
|
|
1237
|
+
DRM_IOCTL_PANTHOR(WR, BO_SYNC, bo_sync),
|
|
1238
|
+
DRM_IOCTL_PANTHOR_BO_QUERY_INFO =
|
|
1239
|
+
DRM_IOCTL_PANTHOR(WR, BO_QUERY_INFO, bo_query_info),
|
|
1089
1240
|
};
|
|
1090
1241
|
|
|
1091
1242
|
#if defined(__cplusplus)
|
|
@@ -26,20 +26,27 @@ extern "C" {
|
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
struct drm_rocket_create_bo {
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* @size: Input: Size of the requested BO.
|
|
31
|
+
*/
|
|
30
32
|
__u32 size;
|
|
31
33
|
|
|
32
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* @handle: Output: GEM handle for the BO.
|
|
36
|
+
*/
|
|
33
37
|
__u32 handle;
|
|
34
38
|
|
|
35
39
|
/**
|
|
36
|
-
* Output: DMA address for the BO in the NPU address
|
|
37
|
-
* is private to the DRM fd and is valid for
|
|
38
|
-
* handle.
|
|
40
|
+
* @dma_address: Output: DMA address for the BO in the NPU address
|
|
41
|
+
* space. This address is private to the DRM fd and is valid for
|
|
42
|
+
* the lifetime of the GEM handle.
|
|
39
43
|
*/
|
|
40
44
|
__u64 dma_address;
|
|
41
45
|
|
|
42
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* @offset: Output: Offset into the drm node to use for subsequent
|
|
48
|
+
* mmap call.
|
|
49
|
+
*/
|
|
43
50
|
__u64 offset;
|
|
44
51
|
};
|
|
45
52
|
|
|
@@ -50,13 +57,19 @@ struct drm_rocket_create_bo {
|
|
|
50
57
|
* synchronization.
|
|
51
58
|
*/
|
|
52
59
|
struct drm_rocket_prep_bo {
|
|
53
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* @handle: Input: GEM handle of the buffer object.
|
|
62
|
+
*/
|
|
54
63
|
__u32 handle;
|
|
55
64
|
|
|
56
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* @reserved: Reserved, must be zero.
|
|
67
|
+
*/
|
|
57
68
|
__u32 reserved;
|
|
58
69
|
|
|
59
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* @timeout_ns: Input: Amount of time to wait for NPU jobs.
|
|
72
|
+
*/
|
|
60
73
|
__s64 timeout_ns;
|
|
61
74
|
};
|
|
62
75
|
|
|
@@ -66,10 +79,14 @@ struct drm_rocket_prep_bo {
|
|
|
66
79
|
* Synchronize caches for NPU access.
|
|
67
80
|
*/
|
|
68
81
|
struct drm_rocket_fini_bo {
|
|
69
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* @handle: Input: GEM handle of the buffer object.
|
|
84
|
+
*/
|
|
70
85
|
__u32 handle;
|
|
71
86
|
|
|
72
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* @reserved: Reserved, must be zero.
|
|
89
|
+
*/
|
|
73
90
|
__u32 reserved;
|
|
74
91
|
};
|
|
75
92
|
|
|
@@ -79,10 +96,15 @@ struct drm_rocket_fini_bo {
|
|
|
79
96
|
* A task is the smallest unit of work that can be run on the NPU.
|
|
80
97
|
*/
|
|
81
98
|
struct drm_rocket_task {
|
|
82
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* @regcmd: Input: DMA address to NPU mapping of register command buffer
|
|
101
|
+
*/
|
|
83
102
|
__u32 regcmd;
|
|
84
103
|
|
|
85
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* @regcmd_count: Input: Number of commands in the register command
|
|
106
|
+
* buffer
|
|
107
|
+
*/
|
|
86
108
|
__u32 regcmd_count;
|
|
87
109
|
};
|
|
88
110
|
|
|
@@ -94,25 +116,44 @@ struct drm_rocket_task {
|
|
|
94
116
|
* sequentially on the same core, to benefit from memory residency in SRAM.
|
|
95
117
|
*/
|
|
96
118
|
struct drm_rocket_job {
|
|
97
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* @tasks: Input: Pointer to an array of struct drm_rocket_task.
|
|
121
|
+
*/
|
|
98
122
|
__u64 tasks;
|
|
99
123
|
|
|
100
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* @in_bo_handles: Input: Pointer to a u32 array of the BOs that
|
|
126
|
+
* are read by the job.
|
|
127
|
+
*/
|
|
101
128
|
__u64 in_bo_handles;
|
|
102
129
|
|
|
103
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* @out_bo_handles: Input: Pointer to a u32 array of the BOs that
|
|
132
|
+
* are written to by the job.
|
|
133
|
+
*/
|
|
104
134
|
__u64 out_bo_handles;
|
|
105
135
|
|
|
106
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* @task_count: Input: Number of tasks passed in.
|
|
138
|
+
*/
|
|
107
139
|
__u32 task_count;
|
|
108
140
|
|
|
109
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* @task_struct_size: Input: Size in bytes of the structs in the
|
|
143
|
+
* @tasks field.
|
|
144
|
+
*/
|
|
110
145
|
__u32 task_struct_size;
|
|
111
146
|
|
|
112
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* @in_bo_handle_count: Input: Number of input BO handles passed in
|
|
149
|
+
* (size is that times 4).
|
|
150
|
+
*/
|
|
113
151
|
__u32 in_bo_handle_count;
|
|
114
152
|
|
|
115
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* @out_bo_handle_count: Input: Number of output BO handles passed in
|
|
155
|
+
* (size is that times 4).
|
|
156
|
+
*/
|
|
116
157
|
__u32 out_bo_handle_count;
|
|
117
158
|
};
|
|
118
159
|
|
|
@@ -122,16 +163,25 @@ struct drm_rocket_job {
|
|
|
122
163
|
* The kernel will schedule the execution of these jobs in dependency order.
|
|
123
164
|
*/
|
|
124
165
|
struct drm_rocket_submit {
|
|
125
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* @jobs: Input: Pointer to an array of struct drm_rocket_job.
|
|
168
|
+
*/
|
|
126
169
|
__u64 jobs;
|
|
127
170
|
|
|
128
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* @job_count: Input: Number of jobs passed in.
|
|
173
|
+
*/
|
|
129
174
|
__u32 job_count;
|
|
130
175
|
|
|
131
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* @job_struct_size: Input: Size in bytes of the structs in the
|
|
178
|
+
* @jobs field.
|
|
179
|
+
*/
|
|
132
180
|
__u32 job_struct_size;
|
|
133
181
|
|
|
134
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* @reserved: Reserved, must be zero.
|
|
184
|
+
*/
|
|
135
185
|
__u64 reserved;
|
|
136
186
|
};
|
|
137
187
|
|