0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef __OMAP_DRM_H__
0022 #define __OMAP_DRM_H__
0023
0024 #include "drm.h"
0025
0026 #if defined(__cplusplus)
0027 extern "C" {
0028 #endif
0029
0030
0031
0032
0033
0034 #define OMAP_PARAM_CHIPSET_ID 1
0035
0036 struct drm_omap_param {
0037 __u64 param;
0038 __u64 value;
0039 };
0040
0041
0042 #define OMAP_BO_SCANOUT 0x00000001
0043
0044
0045 #define OMAP_BO_CACHED 0x00000000
0046 #define OMAP_BO_WC 0x00000002
0047 #define OMAP_BO_UNCACHED 0x00000004
0048 #define OMAP_BO_CACHE_MASK 0x00000006
0049
0050
0051 #define OMAP_BO_TILED_8 0x00000100
0052 #define OMAP_BO_TILED_16 0x00000200
0053 #define OMAP_BO_TILED_32 0x00000300
0054 #define OMAP_BO_TILED_MASK 0x00000f00
0055
0056 union omap_gem_size {
0057 __u32 bytes;
0058 struct {
0059 __u16 width;
0060 __u16 height;
0061 } tiled;
0062 };
0063
0064 struct drm_omap_gem_new {
0065 union omap_gem_size size;
0066 __u32 flags;
0067 __u32 handle;
0068 __u32 __pad;
0069 };
0070
0071
0072 enum omap_gem_op {
0073 OMAP_GEM_READ = 0x01,
0074 OMAP_GEM_WRITE = 0x02,
0075 };
0076
0077 struct drm_omap_gem_cpu_prep {
0078 __u32 handle;
0079 __u32 op;
0080 };
0081
0082 struct drm_omap_gem_cpu_fini {
0083 __u32 handle;
0084 __u32 op;
0085
0086
0087
0088
0089 __u32 nregions;
0090 __u32 __pad;
0091 };
0092
0093 struct drm_omap_gem_info {
0094 __u32 handle;
0095 __u32 pad;
0096 __u64 offset;
0097
0098
0099
0100
0101
0102
0103 __u32 size;
0104 __u32 __pad;
0105 };
0106
0107 #define DRM_OMAP_GET_PARAM 0x00
0108 #define DRM_OMAP_SET_PARAM 0x01
0109 #define DRM_OMAP_GEM_NEW 0x03
0110 #define DRM_OMAP_GEM_CPU_PREP 0x04
0111 #define DRM_OMAP_GEM_CPU_FINI 0x05
0112 #define DRM_OMAP_GEM_INFO 0x06
0113 #define DRM_OMAP_NUM_IOCTLS 0x07
0114
0115 #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
0116 #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
0117 #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
0118 #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
0119 #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
0120 #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
0121
0122 #if defined(__cplusplus)
0123 }
0124 #endif
0125
0126 #endif