omap_drm.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/**************************************************************************** 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__ 21#include "drm.h" 22#ifdef __cplusplus 23#endif 24#define OMAP_PARAM_CHIPSET_ID 1 25struct drm_omap_param { 26 uint64_t param; 27 uint64_t value; 28}; 29#define OMAP_BO_SCANOUT 0x00000001 30#define OMAP_BO_CACHE_MASK 0x00000006 31#define OMAP_BO_TILED_MASK 0x00000f00 32#define OMAP_BO_CACHED 0x00000000 33#define OMAP_BO_WC 0x00000002 34#define OMAP_BO_UNCACHED 0x00000004 35#define OMAP_BO_TILED_8 0x00000100 36#define OMAP_BO_TILED_16 0x00000200 37#define OMAP_BO_TILED_32 0x00000300 38#define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32) 39union omap_gem_size { 40 uint32_t bytes; 41 struct { 42 uint16_t width; 43 uint16_t height; 44 } tiled; 45}; 46struct drm_omap_gem_new { 47 union omap_gem_size size; 48 uint32_t flags; 49 uint32_t handle; 50 uint32_t __pad; 51}; 52enum omap_gem_op { 53 OMAP_GEM_READ = 0x01, 54 OMAP_GEM_WRITE = 0x02, 55}; 56struct drm_omap_gem_cpu_prep { 57 uint32_t handle; 58 uint32_t op; 59}; 60struct drm_omap_gem_cpu_fini { 61 uint32_t handle; 62 uint32_t op; 63 uint32_t nregions; 64 uint32_t __pad; 65}; 66struct drm_omap_gem_info { 67 uint32_t handle; 68 uint32_t pad; 69 uint64_t offset; 70 uint32_t size; 71 uint32_t __pad; 72}; 73#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 77#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) 81#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) 82#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) 83#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) 85#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) 86#ifdef __cplusplus 87#endif 88#endif 89