aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 13:17:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 13:17:26 -0400
commita09e9a7a4b907f2dfa9bdb2b98a1828ab4b340b2 (patch)
treec7a2df4e887573648eeaf8f7939889046990d3f6 /include/linux
parent9ab073bc45b8b523cc39658925bb44bef35ca657 (diff)
parent86a7e1224a68511d3a1ae0b7e11581b9d37723ae (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm tree changes from Dave Airlie: "This is the main drm pull request, I have some overlap with sound and arm-soc, the sound patch is acked and may conflict based on -next reports but should be a trivial fixup, which I'll leave to you! Highlights: - new drivers: MSM driver from Rob Clark - non-drm: switcheroo and hdmi audio driver support for secondary GPU poweroff, so drivers can use runtime PM to poweroff the GPUs. This can save 5 or 6W on some optimus laptops. - drm core: combined GEM and TTM VMA manager per-filp mmap permission tracking initial rendernode support (via a runtime enable for now, until we get api stable), remove old proc support, lots of cleanups of legacy code hdmi vendor infoframes and 4k modes lots of gem/prime locking and races fixes async pageflip scaffolding drm bridge objects - i915: Haswell PC8+ support and eLLC support, HDMI 4K support, initial per-process VMA pieces, watermark reworks, convert to generic hdmi infoframes, encoder reworking, fastboot support, - radeon: CIK PM support, remove 3d blit code in favour of DMA engines, Berlin GPU support, HDMI audio fixes - nouveau: secondary GPU power down support for optimus laptops, lots of fixes, use MSI, VP3 engine support - exynos: runtime pm support for g2d, DT support, remove non-DT, - tda998x i2c driver: lots of fixes for sync issues - gma500: lots of cleanups - rcar: add LVDS support, fbdev emulation, - tegra: just minor fixes" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (684 commits) drm/exynos: Fix build error with exynos_drm_connector.c drm/exynos: Remove non-DT support in exynos_drm_fimd drm/exynos: Remove non-DT support in exynos_hdmi drm/exynos: Remove non-DT support in exynos_drm_g2d drm/exynos: Remove non-DT support in exynos_hdmiphy drm/exynos: Remove non-DT support in exynos_ddc drm/exynos: Make Exynos DRM drivers depend on OF drm/exynos: Consider fallback option to allocation fail drm/exynos: fimd: move platform data parsing to separate function drm/exynos: fimd: get signal polarities from device tree drm/exynos: fimd: replace struct fb_videomode with videomode drm/exynos: check a pixel format to a particular window layer drm/exynos: fix fimd pixel format setting drm/exynos: Add NULL pointer check drm/exynos: Remove redundant error messages drm/exynos: Add missing of.h header include drm/exynos: Remove redundant NULL check in exynos_drm_buf drm/exynos: add device tree support for rotator drm/exynos: Add missing includes drm/exynos: add runtime pm interfaces to g2d driver ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hdmi.h53
-rw-r--r--include/linux/platform_data/rcar-du.h34
-rw-r--r--include/linux/vga_switcheroo.h13
3 files changed, 87 insertions, 13 deletions
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 3b589440ecfe..9231be9e90a2 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -18,11 +18,21 @@ enum hdmi_infoframe_type {
18 HDMI_INFOFRAME_TYPE_AUDIO = 0x84, 18 HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
19}; 19};
20 20
21#define HDMI_IEEE_OUI 0x000c03
21#define HDMI_INFOFRAME_HEADER_SIZE 4 22#define HDMI_INFOFRAME_HEADER_SIZE 4
22#define HDMI_AVI_INFOFRAME_SIZE 13 23#define HDMI_AVI_INFOFRAME_SIZE 13
23#define HDMI_SPD_INFOFRAME_SIZE 25 24#define HDMI_SPD_INFOFRAME_SIZE 25
24#define HDMI_AUDIO_INFOFRAME_SIZE 10 25#define HDMI_AUDIO_INFOFRAME_SIZE 10
25 26
27#define HDMI_INFOFRAME_SIZE(type) \
28 (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
29
30struct hdmi_any_infoframe {
31 enum hdmi_infoframe_type type;
32 unsigned char version;
33 unsigned char length;
34};
35
26enum hdmi_colorspace { 36enum hdmi_colorspace {
27 HDMI_COLORSPACE_RGB, 37 HDMI_COLORSPACE_RGB,
28 HDMI_COLORSPACE_YUV422, 38 HDMI_COLORSPACE_YUV422,
@@ -100,9 +110,6 @@ struct hdmi_avi_infoframe {
100 unsigned char version; 110 unsigned char version;
101 unsigned char length; 111 unsigned char length;
102 enum hdmi_colorspace colorspace; 112 enum hdmi_colorspace colorspace;
103 bool active_info_valid;
104 bool horizontal_bar_valid;
105 bool vertical_bar_valid;
106 enum hdmi_scan_mode scan_mode; 113 enum hdmi_scan_mode scan_mode;
107 enum hdmi_colorimetry colorimetry; 114 enum hdmi_colorimetry colorimetry;
108 enum hdmi_picture_aspect picture_aspect; 115 enum hdmi_picture_aspect picture_aspect;
@@ -218,14 +225,52 @@ int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame);
218ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, 225ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
219 void *buffer, size_t size); 226 void *buffer, size_t size);
220 227
228enum hdmi_3d_structure {
229 HDMI_3D_STRUCTURE_INVALID = -1,
230 HDMI_3D_STRUCTURE_FRAME_PACKING = 0,
231 HDMI_3D_STRUCTURE_FIELD_ALTERNATIVE,
232 HDMI_3D_STRUCTURE_LINE_ALTERNATIVE,
233 HDMI_3D_STRUCTURE_SIDE_BY_SIDE_FULL,
234 HDMI_3D_STRUCTURE_L_DEPTH,
235 HDMI_3D_STRUCTURE_L_DEPTH_GFX_GFX_DEPTH,
236 HDMI_3D_STRUCTURE_TOP_AND_BOTTOM,
237 HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF = 8,
238};
239
240
221struct hdmi_vendor_infoframe { 241struct hdmi_vendor_infoframe {
222 enum hdmi_infoframe_type type; 242 enum hdmi_infoframe_type type;
223 unsigned char version; 243 unsigned char version;
224 unsigned char length; 244 unsigned char length;
225 u8 data[27]; 245 unsigned int oui;
246 u8 vic;
247 enum hdmi_3d_structure s3d_struct;
248 unsigned int s3d_ext_data;
226}; 249};
227 250
251int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
228ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, 252ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
229 void *buffer, size_t size); 253 void *buffer, size_t size);
230 254
255union hdmi_vendor_any_infoframe {
256 struct {
257 enum hdmi_infoframe_type type;
258 unsigned char version;
259 unsigned char length;
260 unsigned int oui;
261 } any;
262 struct hdmi_vendor_infoframe hdmi;
263};
264
265union hdmi_infoframe {
266 struct hdmi_any_infoframe any;
267 struct hdmi_avi_infoframe avi;
268 struct hdmi_spd_infoframe spd;
269 union hdmi_vendor_any_infoframe vendor;
270 struct hdmi_audio_infoframe audio;
271};
272
273ssize_t
274hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size);
275
231#endif /* _DRM_HDMI_H */ 276#endif /* _DRM_HDMI_H */
diff --git a/include/linux/platform_data/rcar-du.h b/include/linux/platform_data/rcar-du.h
index 80587fdbba3e..1a2e9901a22e 100644
--- a/include/linux/platform_data/rcar-du.h
+++ b/include/linux/platform_data/rcar-du.h
@@ -16,8 +16,18 @@
16 16
17#include <drm/drm_mode.h> 17#include <drm/drm_mode.h>
18 18
19enum rcar_du_output {
20 RCAR_DU_OUTPUT_DPAD0,
21 RCAR_DU_OUTPUT_DPAD1,
22 RCAR_DU_OUTPUT_LVDS0,
23 RCAR_DU_OUTPUT_LVDS1,
24 RCAR_DU_OUTPUT_TCON,
25 RCAR_DU_OUTPUT_MAX,
26};
27
19enum rcar_du_encoder_type { 28enum rcar_du_encoder_type {
20 RCAR_DU_ENCODER_UNUSED = 0, 29 RCAR_DU_ENCODER_UNUSED = 0,
30 RCAR_DU_ENCODER_NONE,
21 RCAR_DU_ENCODER_VGA, 31 RCAR_DU_ENCODER_VGA,
22 RCAR_DU_ENCODER_LVDS, 32 RCAR_DU_ENCODER_LVDS,
23}; 33};
@@ -28,22 +38,32 @@ struct rcar_du_panel_data {
28 struct drm_mode_modeinfo mode; 38 struct drm_mode_modeinfo mode;
29}; 39};
30 40
31struct rcar_du_encoder_lvds_data { 41struct rcar_du_connector_lvds_data {
32 struct rcar_du_panel_data panel; 42 struct rcar_du_panel_data panel;
33}; 43};
34 44
35struct rcar_du_encoder_vga_data { 45struct rcar_du_connector_vga_data {
36 /* TODO: Add DDC information for EDID retrieval */ 46 /* TODO: Add DDC information for EDID retrieval */
37}; 47};
38 48
49/*
50 * struct rcar_du_encoder_data - Encoder platform data
51 * @type: the encoder type (RCAR_DU_ENCODER_*)
52 * @output: the DU output the connector is connected to (RCAR_DU_OUTPUT_*)
53 * @connector.lvds: platform data for LVDS connectors
54 * @connector.vga: platform data for VGA connectors
55 *
56 * Encoder platform data describes an on-board encoder, its associated DU SoC
57 * output, and the connector.
58 */
39struct rcar_du_encoder_data { 59struct rcar_du_encoder_data {
40 enum rcar_du_encoder_type encoder; 60 enum rcar_du_encoder_type type;
41 unsigned int output; 61 enum rcar_du_output output;
42 62
43 union { 63 union {
44 struct rcar_du_encoder_lvds_data lvds; 64 struct rcar_du_connector_lvds_data lvds;
45 struct rcar_du_encoder_vga_data vga; 65 struct rcar_du_connector_vga_data vga;
46 } u; 66 } connector;
47}; 67};
48 68
49struct rcar_du_platform_data { 69struct rcar_du_platform_data {
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h
index ddb419cf4530..502073a53dd3 100644
--- a/include/linux/vga_switcheroo.h
+++ b/include/linux/vga_switcheroo.h
@@ -45,7 +45,8 @@ struct vga_switcheroo_client_ops {
45#if defined(CONFIG_VGA_SWITCHEROO) 45#if defined(CONFIG_VGA_SWITCHEROO)
46void vga_switcheroo_unregister_client(struct pci_dev *dev); 46void vga_switcheroo_unregister_client(struct pci_dev *dev);
47int vga_switcheroo_register_client(struct pci_dev *dev, 47int vga_switcheroo_register_client(struct pci_dev *dev,
48 const struct vga_switcheroo_client_ops *ops); 48 const struct vga_switcheroo_client_ops *ops,
49 bool driver_power_control);
49int vga_switcheroo_register_audio_client(struct pci_dev *pdev, 50int vga_switcheroo_register_audio_client(struct pci_dev *pdev,
50 const struct vga_switcheroo_client_ops *ops, 51 const struct vga_switcheroo_client_ops *ops,
51 int id, bool active); 52 int id, bool active);
@@ -60,11 +61,15 @@ int vga_switcheroo_process_delayed_switch(void);
60 61
61int vga_switcheroo_get_client_state(struct pci_dev *dev); 62int vga_switcheroo_get_client_state(struct pci_dev *dev);
62 63
64void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic);
65
66int vga_switcheroo_init_domain_pm_ops(struct device *dev, struct dev_pm_domain *domain);
67int vga_switcheroo_init_domain_pm_optimus_hdmi_audio(struct device *dev, struct dev_pm_domain *domain);
63#else 68#else
64 69
65static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} 70static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {}
66static inline int vga_switcheroo_register_client(struct pci_dev *dev, 71static inline int vga_switcheroo_register_client(struct pci_dev *dev,
67 const struct vga_switcheroo_client_ops *ops) { return 0; } 72 const struct vga_switcheroo_client_ops *ops, bool driver_power_control) { return 0; }
68static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} 73static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {}
69static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } 74static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; }
70static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, 75static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev,
@@ -74,6 +79,10 @@ static inline void vga_switcheroo_unregister_handler(void) {}
74static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } 79static inline int vga_switcheroo_process_delayed_switch(void) { return 0; }
75static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } 80static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; }
76 81
82static inline void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic) {}
83
84static inline int vga_switcheroo_init_domain_pm_ops(struct device *dev, struct dev_pm_domain *domain) { return -EINVAL; }
85static inline int vga_switcheroo_init_domain_pm_optimus_hdmi_audio(struct device *dev, struct dev_pm_domain *domain) { return -EINVAL; }
77 86
78#endif 87#endif
79#endif /* _LINUX_VGA_SWITCHEROO_H_ */ 88#endif /* _LINUX_VGA_SWITCHEROO_H_ */