linux/include/uapi/drm/virtgpu_drm.h

/*
 * Copyright 2013 Red Hat
 * All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */
#ifndef VIRTGPU_DRM_H
#define VIRTGPU_DRM_H

#include "drm.h"

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

/* Please note that modifications to all structs defined here are
 * subject to backwards-compatibility constraints.
 *
 * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
 * compatibility Keep fields aligned to their size
 */

#define DRM_VIRTGPU_MAP
#define DRM_VIRTGPU_EXECBUFFER
#define DRM_VIRTGPU_GETPARAM
#define DRM_VIRTGPU_RESOURCE_CREATE
#define DRM_VIRTGPU_RESOURCE_INFO
#define DRM_VIRTGPU_TRANSFER_FROM_HOST
#define DRM_VIRTGPU_TRANSFER_TO_HOST
#define DRM_VIRTGPU_WAIT
#define DRM_VIRTGPU_GET_CAPS
#define DRM_VIRTGPU_RESOURCE_CREATE_BLOB
#define DRM_VIRTGPU_CONTEXT_INIT

#define VIRTGPU_EXECBUF_FENCE_FD_IN
#define VIRTGPU_EXECBUF_FENCE_FD_OUT
#define VIRTGPU_EXECBUF_RING_IDX
#define VIRTGPU_EXECBUF_FLAGS

struct drm_virtgpu_map {};

#define VIRTGPU_EXECBUF_SYNCOBJ_RESET
#define VIRTGPU_EXECBUF_SYNCOBJ_FLAGS
struct drm_virtgpu_execbuffer_syncobj {};

/* fence_fd is modified on success if VIRTGPU_EXECBUF_FENCE_FD_OUT flag is set. */
struct drm_virtgpu_execbuffer {};

#define VIRTGPU_PARAM_3D_FEATURES
#define VIRTGPU_PARAM_CAPSET_QUERY_FIX
#define VIRTGPU_PARAM_RESOURCE_BLOB
#define VIRTGPU_PARAM_HOST_VISIBLE
#define VIRTGPU_PARAM_CROSS_DEVICE
#define VIRTGPU_PARAM_CONTEXT_INIT
#define VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs
#define VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME

struct drm_virtgpu_getparam {};

/* NO_BO flags? NO resource flag? */
/* resource flag for y_0_top */
struct drm_virtgpu_resource_create {};

struct drm_virtgpu_resource_info {};

struct drm_virtgpu_3d_box {};

struct drm_virtgpu_3d_transfer_to_host {};

struct drm_virtgpu_3d_transfer_from_host {};

#define VIRTGPU_WAIT_NOWAIT
struct drm_virtgpu_3d_wait {};

struct drm_virtgpu_get_caps {};

struct drm_virtgpu_resource_create_blob {};

#define VIRTGPU_CONTEXT_PARAM_CAPSET_ID
#define VIRTGPU_CONTEXT_PARAM_NUM_RINGS
#define VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK
#define VIRTGPU_CONTEXT_PARAM_DEBUG_NAME
struct drm_virtgpu_context_set_param {};

struct drm_virtgpu_context_init {};

/*
 * Event code that's given when VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is in
 * effect.  The event size is sizeof(drm_event), since there is no additional
 * payload.
 */
#define VIRTGPU_EVENT_FENCE_SIGNALED

#define DRM_IOCTL_VIRTGPU_MAP

#define DRM_IOCTL_VIRTGPU_EXECBUFFER

#define DRM_IOCTL_VIRTGPU_GETPARAM

#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE

#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO

#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST

#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST

#define DRM_IOCTL_VIRTGPU_WAIT

#define DRM_IOCTL_VIRTGPU_GET_CAPS

#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE_BLOB

#define DRM_IOCTL_VIRTGPU_CONTEXT_INIT

#if defined(__cplusplus)
}
#endif

#endif