]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/linux/platform_data/rcar-du.h
Merge tag 'stable/for-linus-3.14-rc0-late-tag' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-artful-kernel.git] / include / linux / platform_data / rcar-du.h
1 /*
2 * rcar_du.h -- R-Car Display Unit DRM driver
3 *
4 * Copyright (C) 2013 Renesas Corporation
5 *
6 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14 #ifndef __RCAR_DU_H__
15 #define __RCAR_DU_H__
16
17 #include <drm/drm_mode.h>
18
19 enum 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
28 enum rcar_du_encoder_type {
29 RCAR_DU_ENCODER_UNUSED = 0,
30 RCAR_DU_ENCODER_NONE,
31 RCAR_DU_ENCODER_VGA,
32 RCAR_DU_ENCODER_LVDS,
33 };
34
35 struct rcar_du_panel_data {
36 unsigned int width_mm; /* Panel width in mm */
37 unsigned int height_mm; /* Panel height in mm */
38 struct drm_mode_modeinfo mode;
39 };
40
41 struct rcar_du_connector_lvds_data {
42 struct rcar_du_panel_data panel;
43 };
44
45 struct rcar_du_connector_vga_data {
46 /* TODO: Add DDC information for EDID retrieval */
47 };
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 */
59 struct rcar_du_encoder_data {
60 enum rcar_du_encoder_type type;
61 enum rcar_du_output output;
62
63 union {
64 struct rcar_du_connector_lvds_data lvds;
65 struct rcar_du_connector_vga_data vga;
66 } connector;
67 };
68
69 struct rcar_du_platform_data {
70 struct rcar_du_encoder_data *encoders;
71 unsigned int num_encoders;
72 };
73
74 #endif /* __RCAR_DU_H__ */