scripts/getver.sh: avoid use of git rev-list --count
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0333-drm-Add-an-encoder-and-connector-type-enum-for-DPI.patch
1 From 5022d46f5e7a63c305c1259e806f0ebf2ba5527e Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Fri, 18 Mar 2016 12:34:59 -0700
4 Subject: [PATCH 333/381] drm: Add an encoder and connector type enum for DPI.
5
6 Right now exynos is exposing DPI as a TMDS encoder and VGA connector,
7 which seems rather misleading. This isn't just an internal detail,
8 since xrandr actually exposes "VGA" as the output name. Define some
9 new enums so that vc4's DPI can have a more informative name.
10
11 I considered other names for the connector as well. For VC4, the
12 Adafruit DPI kippah takes the 28 GPIO pins and routes them to a
13 standard-ish 40-pin FPC connector, but "40-pin FPC" doesn't uniquely
14 identify an ordering of pins (apparently some other orderings exist),
15 doesn't explain things as well for the user (who, if anything, knows
16 their product is a DPI kippah/panel combo), and actually doesn't have
17 to exist (one could connect the 28 GPIOs directly to something else).
18 Simply "DPI" seems like a good compromise name to distinguish from the
19 HDMI, DSI, and TV connectors .
20
21 Signed-off-by: Eric Anholt <eric@anholt.net>
22 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
23 (cherry picked from commit 0b27c02a7f1c697694f2ad6d6517e7dbf9ecfa39)
24 ---
25 drivers/gpu/drm/drm_crtc.c | 2 ++
26 include/uapi/drm/drm_mode.h | 2 ++
27 2 files changed, 4 insertions(+)
28
29 --- a/drivers/gpu/drm/drm_crtc.c
30 +++ b/drivers/gpu/drm/drm_crtc.c
31 @@ -168,6 +168,7 @@ static struct drm_conn_prop_enum_list dr
32 { DRM_MODE_CONNECTOR_eDP, "eDP" },
33 { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual" },
34 { DRM_MODE_CONNECTOR_DSI, "DSI" },
35 + { DRM_MODE_CONNECTOR_DPI, "DPI" },
36 };
37
38 static const struct drm_prop_enum_list drm_encoder_enum_list[] = {
39 @@ -179,6 +180,7 @@ static const struct drm_prop_enum_list d
40 { DRM_MODE_ENCODER_VIRTUAL, "Virtual" },
41 { DRM_MODE_ENCODER_DSI, "DSI" },
42 { DRM_MODE_ENCODER_DPMST, "DP MST" },
43 + { DRM_MODE_ENCODER_DPI, "DPI" },
44 };
45
46 static const struct drm_prop_enum_list drm_subpixel_enum_list[] = {
47 --- a/include/uapi/drm/drm_mode.h
48 +++ b/include/uapi/drm/drm_mode.h
49 @@ -202,6 +202,7 @@ struct drm_mode_get_plane_res {
50 #define DRM_MODE_ENCODER_VIRTUAL 5
51 #define DRM_MODE_ENCODER_DSI 6
52 #define DRM_MODE_ENCODER_DPMST 7
53 +#define DRM_MODE_ENCODER_DPI 8
54
55 struct drm_mode_get_encoder {
56 __u32 encoder_id;
57 @@ -241,6 +242,7 @@ struct drm_mode_get_encoder {
58 #define DRM_MODE_CONNECTOR_eDP 14
59 #define DRM_MODE_CONNECTOR_VIRTUAL 15
60 #define DRM_MODE_CONNECTOR_DSI 16
61 +#define DRM_MODE_CONNECTOR_DPI 17
62
63 struct drm_mode_get_connector {
64