1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2020 NVIDIA Corporation */
4 #ifndef _TEGRA_DRM_UAPI_H
5 #define _TEGRA_DRM_UAPI_H
7 #include <linux/dma-mapping.h>
9 #include <linux/kref.h>
10 #include <linux/xarray.h>
17 struct tegra_drm_file {
18 /* Legacy UAPI state */
19 struct idr legacy_contexts;
23 struct xarray contexts;
24 struct xarray syncpoints;
27 struct tegra_drm_mapping {
30 struct host1x_bo_mapping *map;
37 int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data,
38 struct drm_file *file);
39 int tegra_drm_ioctl_channel_close(struct drm_device *drm, void *data,
40 struct drm_file *file);
41 int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data,
42 struct drm_file *file);
43 int tegra_drm_ioctl_channel_unmap(struct drm_device *drm, void *data,
44 struct drm_file *file);
45 int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
46 struct drm_file *file);
47 int tegra_drm_ioctl_syncpoint_allocate(struct drm_device *drm, void *data,
48 struct drm_file *file);
49 int tegra_drm_ioctl_syncpoint_free(struct drm_device *drm, void *data,
50 struct drm_file *file);
51 int tegra_drm_ioctl_syncpoint_wait(struct drm_device *drm, void *data,
52 struct drm_file *file);
54 void tegra_drm_uapi_close_file(struct tegra_drm_file *file);
55 void tegra_drm_mapping_put(struct tegra_drm_mapping *mapping);