/* SPDX-License-Identifier: MIT */12#ifndef __NOVA_DRM_H__3#define __NOVA_DRM_H__45#include "drm.h"67/* DISCLAIMER: Do not use, this is not a stable uAPI.8*9* This uAPI serves only testing purposes as long as this driver is still in10* development. It is required to implement and test infrastructure which is11* upstreamed in the context of this driver. See also [1].12*13* [1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u14*/1516#if defined(__cplusplus)17extern "C" {18#endif1920/*21* NOVA_GETPARAM_VRAM_BAR_SIZE22*23* Query the VRAM BAR size in bytes.24*/25#define NOVA_GETPARAM_VRAM_BAR_SIZE 0x12627/**28* struct drm_nova_getparam - query GPU and driver metadata29*/30struct drm_nova_getparam {31/**32* @param: The identifier of the parameter to query.33*/34__u64 param;3536/**37* @value: The value for the specified parameter.38*/39__u64 value;40};4142/**43* struct drm_nova_gem_create - create a new DRM GEM object44*/45struct drm_nova_gem_create {46/**47* @handle: The handle of the new DRM GEM object.48*/49__u32 handle;5051/**52* @pad: 32 bit padding, should be 0.53*/54__u32 pad;5556/**57* @size: The size of the new DRM GEM object.58*/59__u64 size;60};6162/**63* struct drm_nova_gem_info - query DRM GEM object metadata64*/65struct drm_nova_gem_info {66/**67* @handle: The handle of the DRM GEM object to query.68*/69__u32 handle;7071/**72* @pad: 32 bit padding, should be 0.73*/74__u32 pad;7576/**77* @size: The size of the DRM GEM obejct.78*/79__u64 size;80};8182#define DRM_NOVA_GETPARAM 0x0083#define DRM_NOVA_GEM_CREATE 0x0184#define DRM_NOVA_GEM_INFO 0x028586/* Note: this is an enum so that it can be resolved by Rust bindgen. */87enum {88DRM_IOCTL_NOVA_GETPARAM = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GETPARAM,89struct drm_nova_getparam),90DRM_IOCTL_NOVA_GEM_CREATE = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_CREATE,91struct drm_nova_gem_create),92DRM_IOCTL_NOVA_GEM_INFO = DRM_IOWR(DRM_COMMAND_BASE + DRM_NOVA_GEM_INFO,93struct drm_nova_gem_info),94};9596#if defined(__cplusplus)97}98#endif99100#endif /* __NOVA_DRM_H__ */101102103