aboutsummaryrefslogtreecommitdiff
path: root/linux-headers/include/drm/nova_drm.h
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2025-08-01 13:55:33 +0200
committerChristoph Müllner <christophm30@gmail.com>2025-08-01 20:40:25 +0200
commit5d061c0ee23b1052d796e4e8e421aa6e16166fed (patch)
tree0ec5b8dceabfae236de0759c048b2a8fefad047f /linux-headers/include/drm/nova_drm.h
parent686d7e6564509f1b25127df47e2f27a66958d0a0 (diff)
downloadriscv-gnu-toolchain-master.zip
riscv-gnu-toolchain-master.tar.gz
riscv-gnu-toolchain-master.tar.bz2
Update Linux headers from v6.6 to v6.16HEADmaster
This patch imports the Linux kernel headers v6.16. This brings tons of new supported extensions for hwprobe. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'linux-headers/include/drm/nova_drm.h')
-rw-r--r--linux-headers/include/drm/nova_drm.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/linux-headers/include/drm/nova_drm.h b/linux-headers/include/drm/nova_drm.h
new file mode 100644
index 0000000..3ca90ed
--- /dev/null
+++ b/linux-headers/include/drm/nova_drm.h
@@ -0,0 +1,101 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef __NOVA_DRM_H__
+#define __NOVA_DRM_H__
+
+#include "drm.h"
+
+/* DISCLAIMER: Do not use, this is not a stable uAPI.
+ *
+ * This uAPI serves only testing purposes as long as this driver is still in
+ * development. It is required to implement and test infrastructure which is
+ * upstreamed in the context of this driver. See also [1].
+ *
+ * [1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u
+ */
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/*
+ * NOVA_GETPARAM_VRAM_BAR_SIZE
+ *
+ * Query the VRAM BAR size in bytes.
+ */
+#define NOVA_GETPARAM_VRAM_BAR_SIZE 0x1
+
+/**
+ * struct drm_nova_getparam - query GPU and driver metadata
+ */
+struct drm_nova_getparam {
+ /**
+ * @param: The identifier of the parameter to query.
+ */
+ __u64 param;
+
+ /**
+ * @value: The value for the specified parameter.
+ */
+ __u64 value;
+};
+
+/**
+ * struct drm_nova_gem_create - create a new DRM GEM object
+ */
+struct drm_nova_gem_create {
+ /**
+ * @handle: The handle of the new DRM GEM object.
+ */
+ __u32 handle;
+
+ /**
+ * @pad: 32 bit padding, should be 0.
+ */
+ __u32 pad;
+
+ /**
+ * @size: The size of the new DRM GEM object.
+ */
+ __u64 size;
+};
+
+/**
+ * struct drm_nova_gem_info - query DRM GEM object metadata
+ */
+struct drm_nova_gem_info {
+ /**
+ * @handle: The handle of the DRM GEM object to query.
+ */
+ __u32 handle;
+
+ /**
+ * @pad: 32 bit padding, should be 0.
+ */
+ __u32 pad;
+
+ /**
+ * @size: The size of the DRM GEM obejct.
+ */
+ __u64 size;
+};
+
+#define DRM_NOVA_GETPARAM 0x00
+#define DRM_NOVA_GEM_CREATE 0x01
+#define DRM_NOVA_GEM_INFO 0x02
+
+/* Note: this is an enum so that it can be resolved by Rust bindgen. */
+enum {
+ DRM_IOCTL_NOVA_GETPARAM = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GETPARAM,
+ struct drm_nova_getparam),
+ DRM_IOCTL_NOVA_GEM_CREATE = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_CREATE,
+ struct drm_nova_gem_create),
+ DRM_IOCTL_NOVA_GEM_INFO = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_INFO,
+ struct drm_nova_gem_info),
+};
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __NOVA_DRM_H__ */