1 From 1c18e33ab3ff21703925a427e5f55075427a598c Mon Sep 17 00:00:00 2001
2 From: Boris Brezillon <boris.brezillon@free-electrons.com>
3 Date: Fri, 2 Dec 2016 14:48:08 +0100
4 Subject: [PATCH] drm: Turn DRM_MODE_SUBCONNECTOR_xx definitions into an enum
6 List of values like the DRM_MODE_SUBCONNECTOR_xx ones are better
7 represented with enums.
9 Turn the DRM_MODE_SUBCONNECTOR_xx macros into an enum.
11 Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
12 Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
14 Signed-off-by: Eric Anholt <eric@anholt.net>
15 (cherry picked from commit dee7a4fee730ca8908f335b6b66174cba4598ecd)
17 include/uapi/drm/drm_mode.h | 18 ++++++++++--------
18 1 file changed, 10 insertions(+), 8 deletions(-)
20 --- a/include/uapi/drm/drm_mode.h
21 +++ b/include/uapi/drm/drm_mode.h
22 @@ -220,14 +220,16 @@ struct drm_mode_get_encoder {
24 /* This is for connectors with multiple signal types. */
25 /* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
26 -#define DRM_MODE_SUBCONNECTOR_Automatic 0
27 -#define DRM_MODE_SUBCONNECTOR_Unknown 0
28 -#define DRM_MODE_SUBCONNECTOR_DVID 3
29 -#define DRM_MODE_SUBCONNECTOR_DVIA 4
30 -#define DRM_MODE_SUBCONNECTOR_Composite 5
31 -#define DRM_MODE_SUBCONNECTOR_SVIDEO 6
32 -#define DRM_MODE_SUBCONNECTOR_Component 8
33 -#define DRM_MODE_SUBCONNECTOR_SCART 9
34 +enum drm_mode_subconnector {
35 + DRM_MODE_SUBCONNECTOR_Automatic = 0,
36 + DRM_MODE_SUBCONNECTOR_Unknown = 0,
37 + DRM_MODE_SUBCONNECTOR_DVID = 3,
38 + DRM_MODE_SUBCONNECTOR_DVIA = 4,
39 + DRM_MODE_SUBCONNECTOR_Composite = 5,
40 + DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
41 + DRM_MODE_SUBCONNECTOR_Component = 8,
42 + DRM_MODE_SUBCONNECTOR_SCART = 9,
45 #define DRM_MODE_CONNECTOR_Unknown 0
46 #define DRM_MODE_CONNECTOR_VGA 1