]>
Commit | Line | Data |
---|---|---|
4bf8e196 LP |
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 | ||
ef67a902 LP |
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 | ||
4bf8e196 LP |
28 | enum rcar_du_encoder_type { |
29 | RCAR_DU_ENCODER_UNUSED = 0, | |
ef67a902 | 30 | RCAR_DU_ENCODER_NONE, |
4bf8e196 LP |
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 | ||
9194731c | 41 | struct rcar_du_connector_lvds_data { |
4bf8e196 LP |
42 | struct rcar_du_panel_data panel; |
43 | }; | |
44 | ||
9194731c | 45 | struct rcar_du_connector_vga_data { |
4bf8e196 LP |
46 | /* TODO: Add DDC information for EDID retrieval */ |
47 | }; | |
48 | ||
9194731c LP |
49 | /* |
50 | * struct rcar_du_encoder_data - Encoder platform data | |
51 | * @type: the encoder type (RCAR_DU_ENCODER_*) | |
ef67a902 | 52 | * @output: the DU output the connector is connected to (RCAR_DU_OUTPUT_*) |
9194731c LP |
53 | * @connector.lvds: platform data for LVDS connectors |
54 | * @connector.vga: platform data for VGA connectors | |
ef67a902 LP |
55 | * |
56 | * Encoder platform data describes an on-board encoder, its associated DU SoC | |
57 | * output, and the connector. | |
9194731c | 58 | */ |
4bf8e196 | 59 | struct rcar_du_encoder_data { |
9194731c | 60 | enum rcar_du_encoder_type type; |
ef67a902 | 61 | enum rcar_du_output output; |
4bf8e196 LP |
62 | |
63 | union { | |
9194731c LP |
64 | struct rcar_du_connector_lvds_data lvds; |
65 | struct rcar_du_connector_vga_data vga; | |
66 | } connector; | |
4bf8e196 LP |
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__ */ |