linux/include/uapi/drm/lima_drm.h

/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
/* Copyright 2017-2018 Qiang Yu <[email protected]> */

#ifndef __LIMA_DRM_H__
#define __LIMA_DRM_H__

#include "drm.h"

#if defined(__cplusplus)
extern "C" {
#endif

enum drm_lima_param_gpu_id {};

enum drm_lima_param {};

/**
 * get various information of the GPU
 */
struct drm_lima_get_param {};

/*
 * heap buffer dynamically increase backup memory size when GP task fail
 * due to lack of heap memory. size field of heap buffer is an up bound of
 * the backup memory which can be set to a fairly large value.
 */
#define LIMA_BO_FLAG_HEAP

/**
 * create a buffer for used by GPU
 */
struct drm_lima_gem_create {};

/**
 * get information of a buffer
 */
struct drm_lima_gem_info {};

#define LIMA_SUBMIT_BO_READ
#define LIMA_SUBMIT_BO_WRITE

/* buffer information used by one task */
struct drm_lima_gem_submit_bo {};

#define LIMA_GP_FRAME_REG_NUM

/* frame used to setup GP for each task */
struct drm_lima_gp_frame {};

#define LIMA_PP_FRAME_REG_NUM
#define LIMA_PP_WB_REG_NUM

/* frame used to setup mali400 GPU PP for each task */
struct drm_lima_m400_pp_frame {};

/* frame used to setup mali450 GPU PP for each task */
struct drm_lima_m450_pp_frame {};

#define LIMA_PIPE_GP
#define LIMA_PIPE_PP

#define LIMA_SUBMIT_FLAG_EXPLICIT_FENCE

/**
 * submit a task to GPU
 *
 * User can always merge multi sync_file and drm_syncobj
 * into one drm_syncobj as in_sync[0], but we reserve
 * in_sync[1] for another task's out_sync to avoid the
 * export/import/merge pass when explicit sync.
 */
struct drm_lima_gem_submit {};

#define LIMA_GEM_WAIT_READ
#define LIMA_GEM_WAIT_WRITE

/**
 * wait pending GPU task finish of a buffer
 */
struct drm_lima_gem_wait {};

/**
 * create a context
 */
struct drm_lima_ctx_create {};

/**
 * free a context
 */
struct drm_lima_ctx_free {};

#define DRM_LIMA_GET_PARAM
#define DRM_LIMA_GEM_CREATE
#define DRM_LIMA_GEM_INFO
#define DRM_LIMA_GEM_SUBMIT
#define DRM_LIMA_GEM_WAIT
#define DRM_LIMA_CTX_CREATE
#define DRM_LIMA_CTX_FREE

#define DRM_IOCTL_LIMA_GET_PARAM
#define DRM_IOCTL_LIMA_GEM_CREATE
#define DRM_IOCTL_LIMA_GEM_INFO
#define DRM_IOCTL_LIMA_GEM_SUBMIT
#define DRM_IOCTL_LIMA_GEM_WAIT
#define DRM_IOCTL_LIMA_CTX_CREATE
#define DRM_IOCTL_LIMA_CTX_FREE

#if defined(__cplusplus)
}
#endif

#endif /* __LIMA_DRM_H__ */