diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drmP.h | 2 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 19 | ||||
-rw-r--r-- | include/drm/drm_crtc_helper.h | 2 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 8 | ||||
-rw-r--r-- | include/uapi/drm/armada_drm.h | 45 |
5 files changed, 73 insertions, 3 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ffd8ad92cdf9..e6d0cd9f518e 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1047,7 +1047,7 @@ struct drm_minor { | |||
1047 | int index; /**< Minor device number */ | 1047 | int index; /**< Minor device number */ |
1048 | int type; /**< Control or render */ | 1048 | int type; /**< Control or render */ |
1049 | dev_t device; /**< Device number for mknod */ | 1049 | dev_t device; /**< Device number for mknod */ |
1050 | struct device kdev; /**< Linux device */ | 1050 | struct device *kdev; /**< Linux device */ |
1051 | struct drm_device *dev; | 1051 | struct drm_device *dev; |
1052 | 1052 | ||
1053 | struct dentry *debugfs_root; | 1053 | struct dentry *debugfs_root; |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ba407f6b4f1f..d3a91ade1d37 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -595,7 +595,7 @@ enum drm_connector_force { | |||
595 | */ | 595 | */ |
596 | struct drm_connector { | 596 | struct drm_connector { |
597 | struct drm_device *dev; | 597 | struct drm_device *dev; |
598 | struct device kdev; | 598 | struct device *kdev; |
599 | struct device_attribute *attr; | 599 | struct device_attribute *attr; |
600 | struct list_head head; | 600 | struct list_head head; |
601 | 601 | ||
@@ -1145,4 +1145,21 @@ extern int drm_format_horz_chroma_subsampling(uint32_t format); | |||
1145 | extern int drm_format_vert_chroma_subsampling(uint32_t format); | 1145 | extern int drm_format_vert_chroma_subsampling(uint32_t format); |
1146 | extern const char *drm_get_format_name(uint32_t format); | 1146 | extern const char *drm_get_format_name(uint32_t format); |
1147 | 1147 | ||
1148 | /* Helpers */ | ||
1149 | static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev, | ||
1150 | uint32_t id) | ||
1151 | { | ||
1152 | struct drm_mode_object *mo; | ||
1153 | mo = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_CRTC); | ||
1154 | return mo ? obj_to_crtc(mo) : NULL; | ||
1155 | } | ||
1156 | |||
1157 | static inline struct drm_encoder *drm_encoder_find(struct drm_device *dev, | ||
1158 | uint32_t id) | ||
1159 | { | ||
1160 | struct drm_mode_object *mo; | ||
1161 | mo = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER); | ||
1162 | return mo ? obj_to_encoder(mo) : NULL; | ||
1163 | } | ||
1164 | |||
1148 | #endif /* __DRM_CRTC_H__ */ | 1165 | #endif /* __DRM_CRTC_H__ */ |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index f43d556bf40b..ef6ad3a8e58e 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
@@ -163,7 +163,7 @@ static inline void drm_connector_helper_add(struct drm_connector *connector, | |||
163 | extern int drm_helper_resume_force_mode(struct drm_device *dev); | 163 | extern int drm_helper_resume_force_mode(struct drm_device *dev); |
164 | extern void drm_kms_helper_poll_init(struct drm_device *dev); | 164 | extern void drm_kms_helper_poll_init(struct drm_device *dev); |
165 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); | 165 | extern void drm_kms_helper_poll_fini(struct drm_device *dev); |
166 | extern void drm_helper_hpd_irq_event(struct drm_device *dev); | 166 | extern bool drm_helper_hpd_irq_event(struct drm_device *dev); |
167 | extern void drm_kms_helper_hotplug_event(struct drm_device *dev); | 167 | extern void drm_kms_helper_hotplug_event(struct drm_device *dev); |
168 | 168 | ||
169 | extern void drm_kms_helper_poll_disable(struct drm_device *dev); | 169 | extern void drm_kms_helper_poll_disable(struct drm_device *dev); |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index fcabc42d66ab..5ad9a4e2bc59 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -93,8 +93,16 @@ struct cpufreq_policy { | |||
93 | #define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ | 93 | #define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */ |
94 | #define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ | 94 | #define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/ |
95 | 95 | ||
96 | #ifdef CONFIG_CPU_FREQ | ||
96 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); | 97 | struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu); |
97 | void cpufreq_cpu_put(struct cpufreq_policy *policy); | 98 | void cpufreq_cpu_put(struct cpufreq_policy *policy); |
99 | #else | ||
100 | static inline struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu) | ||
101 | { | ||
102 | return NULL; | ||
103 | } | ||
104 | static inline void cpufreq_cpu_put(struct cpufreq_policy *policy) { } | ||
105 | #endif | ||
98 | 106 | ||
99 | static inline bool policy_is_shared(struct cpufreq_policy *policy) | 107 | static inline bool policy_is_shared(struct cpufreq_policy *policy) |
100 | { | 108 | { |
diff --git a/include/uapi/drm/armada_drm.h b/include/uapi/drm/armada_drm.h new file mode 100644 index 000000000000..8dec3fdc99c7 --- /dev/null +++ b/include/uapi/drm/armada_drm.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012 Russell King | ||
3 | * With inspiration from the i915 driver | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #ifndef DRM_ARMADA_IOCTL_H | ||
10 | #define DRM_ARMADA_IOCTL_H | ||
11 | |||
12 | #define DRM_ARMADA_GEM_CREATE 0x00 | ||
13 | #define DRM_ARMADA_GEM_MMAP 0x02 | ||
14 | #define DRM_ARMADA_GEM_PWRITE 0x03 | ||
15 | |||
16 | #define ARMADA_IOCTL(dir, name, str) \ | ||
17 | DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str) | ||
18 | |||
19 | struct drm_armada_gem_create { | ||
20 | uint32_t handle; | ||
21 | uint32_t size; | ||
22 | }; | ||
23 | #define DRM_IOCTL_ARMADA_GEM_CREATE \ | ||
24 | ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create) | ||
25 | |||
26 | struct drm_armada_gem_mmap { | ||
27 | uint32_t handle; | ||
28 | uint32_t pad; | ||
29 | uint64_t offset; | ||
30 | uint64_t size; | ||
31 | uint64_t addr; | ||
32 | }; | ||
33 | #define DRM_IOCTL_ARMADA_GEM_MMAP \ | ||
34 | ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap) | ||
35 | |||
36 | struct drm_armada_gem_pwrite { | ||
37 | uint64_t ptr; | ||
38 | uint32_t handle; | ||
39 | uint32_t offset; | ||
40 | uint32_t size; | ||
41 | }; | ||
42 | #define DRM_IOCTL_ARMADA_GEM_PWRITE \ | ||
43 | ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) | ||
44 | |||
45 | #endif | ||