blob: b2412343f85d14278bea8e470bfa0495a8b58b44 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef QXL_DRM_H
8#define QXL_DRM_H
Christopher Ferris106b3a82016-08-24 12:15:38 -07009#include "drm.h"
10#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080011extern "C" {
Christopher Ferris106b3a82016-08-24 12:15:38 -070012#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070013#define QXL_GEM_DOMAIN_CPU 0
14#define QXL_GEM_DOMAIN_VRAM 1
15#define QXL_GEM_DOMAIN_SURFACE 2
Christopher Ferris106b3a82016-08-24 12:15:38 -070016#define DRM_QXL_ALLOC 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -070017#define DRM_QXL_MAP 0x01
18#define DRM_QXL_EXECBUFFER 0x02
19#define DRM_QXL_UPDATE_AREA 0x03
Christopher Ferris106b3a82016-08-24 12:15:38 -070020#define DRM_QXL_GETPARAM 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070021#define DRM_QXL_CLIENTCAP 0x05
22#define DRM_QXL_ALLOC_SURF 0x06
23struct drm_qxl_alloc {
Christopher Ferris106b3a82016-08-24 12:15:38 -070024 __u32 size;
25 __u32 handle;
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
27struct drm_qxl_map {
Christopher Ferris106b3a82016-08-24 12:15:38 -070028 __u64 offset;
29 __u32 handle;
30 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070031};
Christopher Ferris106b3a82016-08-24 12:15:38 -070032#define QXL_RELOC_TYPE_BO 1
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define QXL_RELOC_TYPE_SURF 2
34struct drm_qxl_reloc {
Christopher Ferris106b3a82016-08-24 12:15:38 -070035 __u64 src_offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -070036 __u64 dst_offset;
37 __u32 src_handle;
38 __u32 dst_handle;
39 __u32 reloc_type;
Christopher Ferris106b3a82016-08-24 12:15:38 -070040 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070041};
42struct drm_qxl_command {
Christopher Ferris1308ad32017-11-14 17:32:13 -080043 __u64 command;
44 __u64 relocs;
Christopher Ferris106b3a82016-08-24 12:15:38 -070045 __u32 type;
46 __u32 command_size;
47 __u32 relocs_num;
Christopher Ferris106b3a82016-08-24 12:15:38 -070048 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
50struct drm_qxl_execbuffer {
Christopher Ferris106b3a82016-08-24 12:15:38 -070051 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070052 __u32 commands_num;
Christopher Ferris1308ad32017-11-14 17:32:13 -080053 __u64 commands;
Ben Cheng655a7c02013-10-16 16:09:24 -070054};
55struct drm_qxl_update_area {
Christopher Ferris106b3a82016-08-24 12:15:38 -070056 __u32 handle;
57 __u32 top;
58 __u32 left;
59 __u32 bottom;
Christopher Ferris106b3a82016-08-24 12:15:38 -070060 __u32 right;
61 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
63#define QXL_PARAM_NUM_SURFACES 1
64#define QXL_PARAM_MAX_RELOCS 2
Ben Cheng655a7c02013-10-16 16:09:24 -070065struct drm_qxl_getparam {
Christopher Ferris106b3a82016-08-24 12:15:38 -070066 __u64 param;
67 __u64 value;
Christopher Ferris106b3a82016-08-24 12:15:38 -070068};
Ben Cheng655a7c02013-10-16 16:09:24 -070069struct drm_qxl_clientcap {
Christopher Ferris106b3a82016-08-24 12:15:38 -070070 __u32 index;
71 __u32 pad;
Christopher Ferris106b3a82016-08-24 12:15:38 -070072};
Ben Cheng655a7c02013-10-16 16:09:24 -070073struct drm_qxl_alloc_surf {
Christopher Ferris106b3a82016-08-24 12:15:38 -070074 __u32 format;
75 __u32 width;
Christopher Ferris106b3a82016-08-24 12:15:38 -070076 __u32 height;
77 __s32 stride;
78 __u32 handle;
79 __u32 pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070080};
Tao Baod7db5942015-01-28 10:07:51 -080081#define DRM_IOCTL_QXL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc)
82#define DRM_IOCTL_QXL_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map)
83#define DRM_IOCTL_QXL_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER, struct drm_qxl_execbuffer)
Christopher Ferris106b3a82016-08-24 12:15:38 -070084#define DRM_IOCTL_QXL_UPDATE_AREA DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA, struct drm_qxl_update_area)
Tao Baod7db5942015-01-28 10:07:51 -080085#define DRM_IOCTL_QXL_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM, struct drm_qxl_getparam)
86#define DRM_IOCTL_QXL_CLIENTCAP DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP, struct drm_qxl_clientcap)
87#define DRM_IOCTL_QXL_ALLOC_SURF DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF, struct drm_qxl_alloc_surf)
Christopher Ferris106b3a82016-08-24 12:15:38 -070088#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080089}
Christopher Ferris106b3a82016-08-24 12:15:38 -070090#endif
91#endif