blob: 513d541d31355b2a635dbbb87bb59f92d3c2e827 [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 __OMAP_DRM_H__
8#define __OMAP_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
13#define OMAP_PARAM_CHIPSET_ID 1
Ben Cheng655a7c02013-10-16 16:09:24 -070014struct drm_omap_param {
Christopher Ferris525ce912017-07-26 13:12:53 -070015 __u64 param;
16 __u64 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070017};
Ben Cheng655a7c02013-10-16 16:09:24 -070018#define OMAP_BO_SCANOUT 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -070019#define OMAP_BO_CACHED 0x00000000
Ben Cheng655a7c02013-10-16 16:09:24 -070020#define OMAP_BO_WC 0x00000002
21#define OMAP_BO_UNCACHED 0x00000004
Christopher Ferrisef80d682020-02-04 16:16:51 -080022#define OMAP_BO_CACHE_MASK 0x00000006
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define OMAP_BO_TILED_8 0x00000100
24#define OMAP_BO_TILED_16 0x00000200
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define OMAP_BO_TILED_32 0x00000300
Christopher Ferrisef80d682020-02-04 16:16:51 -080026#define OMAP_BO_TILED_MASK 0x00000f00
Ben Cheng655a7c02013-10-16 16:09:24 -070027union omap_gem_size {
Christopher Ferris525ce912017-07-26 13:12:53 -070028 __u32 bytes;
Tao Baod7db5942015-01-28 10:07:51 -080029 struct {
Christopher Ferris525ce912017-07-26 13:12:53 -070030 __u16 width;
31 __u16 height;
Tao Baod7db5942015-01-28 10:07:51 -080032 } tiled;
Ben Cheng655a7c02013-10-16 16:09:24 -070033};
34struct drm_omap_gem_new {
Tao Baod7db5942015-01-28 10:07:51 -080035 union omap_gem_size size;
Christopher Ferris525ce912017-07-26 13:12:53 -070036 __u32 flags;
37 __u32 handle;
38 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070039};
40enum omap_gem_op {
Tao Baod7db5942015-01-28 10:07:51 -080041 OMAP_GEM_READ = 0x01,
42 OMAP_GEM_WRITE = 0x02,
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
44struct drm_omap_gem_cpu_prep {
Christopher Ferris525ce912017-07-26 13:12:53 -070045 __u32 handle;
46 __u32 op;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
48struct drm_omap_gem_cpu_fini {
Christopher Ferris525ce912017-07-26 13:12:53 -070049 __u32 handle;
50 __u32 op;
51 __u32 nregions;
52 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070053};
54struct drm_omap_gem_info {
Christopher Ferris525ce912017-07-26 13:12:53 -070055 __u32 handle;
56 __u32 pad;
57 __u64 offset;
58 __u32 size;
59 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define DRM_OMAP_GET_PARAM 0x00
62#define DRM_OMAP_SET_PARAM 0x01
63#define DRM_OMAP_GEM_NEW 0x03
64#define DRM_OMAP_GEM_CPU_PREP 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define DRM_OMAP_GEM_CPU_FINI 0x05
66#define DRM_OMAP_GEM_INFO 0x06
67#define DRM_OMAP_NUM_IOCTLS 0x07
68#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
Tao Baod7db5942015-01-28 10:07:51 -080069#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
Ben Cheng655a7c02013-10-16 16:09:24 -070070#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
Tao Baod7db5942015-01-28 10:07:51 -080071#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
72#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
Christopher Ferris106b3a82016-08-24 12:15:38 -070074#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080075}
Christopher Ferris106b3a82016-08-24 12:15:38 -070076#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070077#endif