cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

uapi.h (1572B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/* Copyright (c) 2020 NVIDIA Corporation */
      3
      4#ifndef _TEGRA_DRM_UAPI_H
      5#define _TEGRA_DRM_UAPI_H
      6
      7#include <linux/dma-mapping.h>
      8#include <linux/idr.h>
      9#include <linux/kref.h>
     10#include <linux/xarray.h>
     11
     12#include <drm/drm.h>
     13
     14struct drm_file;
     15struct drm_device;
     16
     17struct tegra_drm_file {
     18	/* Legacy UAPI state */
     19	struct idr legacy_contexts;
     20	struct mutex lock;
     21
     22	/* New UAPI state */
     23	struct xarray contexts;
     24	struct xarray syncpoints;
     25};
     26
     27struct tegra_drm_mapping {
     28	struct kref ref;
     29
     30	struct host1x_bo_mapping *map;
     31	struct host1x_bo *bo;
     32
     33	dma_addr_t iova;
     34	dma_addr_t iova_end;
     35};
     36
     37int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data,
     38				 struct drm_file *file);
     39int tegra_drm_ioctl_channel_close(struct drm_device *drm, void *data,
     40				  struct drm_file *file);
     41int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data,
     42				struct drm_file *file);
     43int tegra_drm_ioctl_channel_unmap(struct drm_device *drm, void *data,
     44				  struct drm_file *file);
     45int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
     46				   struct drm_file *file);
     47int tegra_drm_ioctl_syncpoint_allocate(struct drm_device *drm, void *data,
     48				       struct drm_file *file);
     49int tegra_drm_ioctl_syncpoint_free(struct drm_device *drm, void *data,
     50				   struct drm_file *file);
     51int tegra_drm_ioctl_syncpoint_wait(struct drm_device *drm, void *data,
     52				   struct drm_file *file);
     53
     54void tegra_drm_uapi_close_file(struct tegra_drm_file *file);
     55void tegra_drm_mapping_put(struct tegra_drm_mapping *mapping);
     56
     57#endif