blob: 72d949d7d04ee4a65d019f93646cede3270ccb5b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __OMAP_DRM_H__
20#define __OMAP_DRM_H__
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#include "drm.h"
22#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080023extern "C" {
Christopher Ferris106b3a82016-08-24 12:15:38 -070024#endif
25#define OMAP_PARAM_CHIPSET_ID 1
Ben Cheng655a7c02013-10-16 16:09:24 -070026struct drm_omap_param {
Christopher Ferris525ce912017-07-26 13:12:53 -070027 __u64 param;
28 __u64 value;
Ben Cheng655a7c02013-10-16 16:09:24 -070029};
Ben Cheng655a7c02013-10-16 16:09:24 -070030#define OMAP_BO_SCANOUT 0x00000001
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define OMAP_BO_CACHED 0x00000000
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define OMAP_BO_WC 0x00000002
33#define OMAP_BO_UNCACHED 0x00000004
Christopher Ferrisd32ca142020-02-04 16:16:51 -080034#define OMAP_BO_CACHE_MASK 0x00000006
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define OMAP_BO_TILED_8 0x00000100
36#define OMAP_BO_TILED_16 0x00000200
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define OMAP_BO_TILED_32 0x00000300
Christopher Ferrisd32ca142020-02-04 16:16:51 -080038#define OMAP_BO_TILED_MASK 0x00000f00
Ben Cheng655a7c02013-10-16 16:09:24 -070039union omap_gem_size {
Christopher Ferris525ce912017-07-26 13:12:53 -070040 __u32 bytes;
Tao Baod7db5942015-01-28 10:07:51 -080041 struct {
Christopher Ferris525ce912017-07-26 13:12:53 -070042 __u16 width;
43 __u16 height;
Tao Baod7db5942015-01-28 10:07:51 -080044 } tiled;
Ben Cheng655a7c02013-10-16 16:09:24 -070045};
46struct drm_omap_gem_new {
Tao Baod7db5942015-01-28 10:07:51 -080047 union omap_gem_size size;
Christopher Ferris525ce912017-07-26 13:12:53 -070048 __u32 flags;
49 __u32 handle;
50 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52enum omap_gem_op {
Tao Baod7db5942015-01-28 10:07:51 -080053 OMAP_GEM_READ = 0x01,
54 OMAP_GEM_WRITE = 0x02,
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
56struct drm_omap_gem_cpu_prep {
Christopher Ferris525ce912017-07-26 13:12:53 -070057 __u32 handle;
58 __u32 op;
Ben Cheng655a7c02013-10-16 16:09:24 -070059};
60struct drm_omap_gem_cpu_fini {
Christopher Ferris525ce912017-07-26 13:12:53 -070061 __u32 handle;
62 __u32 op;
63 __u32 nregions;
64 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070065};
66struct drm_omap_gem_info {
Christopher Ferris525ce912017-07-26 13:12:53 -070067 __u32 handle;
68 __u32 pad;
69 __u64 offset;
70 __u32 size;
71 __u32 __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070072};
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define DRM_OMAP_GET_PARAM 0x00
74#define DRM_OMAP_SET_PARAM 0x01
75#define DRM_OMAP_GEM_NEW 0x03
76#define DRM_OMAP_GEM_CPU_PREP 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070077#define DRM_OMAP_GEM_CPU_FINI 0x05
78#define DRM_OMAP_GEM_INFO 0x06
79#define DRM_OMAP_NUM_IOCTLS 0x07
80#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 -080081#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 -070082#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 -080083#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
84#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 -070085#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 -070086#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080087}
Christopher Ferris106b3a82016-08-24 12:15:38 -070088#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070089#endif