[xf86-video-armada][PATCH] common: fix up output naming convention
Stefan Agner
stefan at agner.ch
Thu Sep 6 00:44:49 UTC 2018
Currently some output type names are missing. Also different naming
connventions are used than in the kernel and in other drivers such as
the modesetting driver (e.g. missing dash between connector type and
connector type id).
Follow modesetting and use the same output names introduced in the
in the xserver git repo with commit 139e36dd5cba ("modesetting:
fix up output naming convention")
This will break backwards compatibility with existing xorg.conf's that
reference output names, but the alternative is to create a separate
counting system, further disconnecting from the kernel names.
Signed-off-by: Stefan Agner <stefan at agner.ch>
---
src/common_drm_conn.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/src/common_drm_conn.c b/src/common_drm_conn.c
index 9f73d20..77ed96b 100644
--- a/src/common_drm_conn.c
+++ b/src/common_drm_conn.c
@@ -372,21 +372,25 @@ static const xf86OutputFuncsRec drm_output_funcs = {
.destroy = common_drm_conn_destroy,
};
-/* Convert libdrm's connector type to Xorg name */
static const char *const output_names[] = {
- [DRM_MODE_CONNECTOR_Unknown] = "None",
- [DRM_MODE_CONNECTOR_VGA] = "VGA",
- [DRM_MODE_CONNECTOR_DVII] = "DVI",
- [DRM_MODE_CONNECTOR_DVID] = "DVI",
- [DRM_MODE_CONNECTOR_DVIA] = "DVI",
- [DRM_MODE_CONNECTOR_Composite] = "Composite",
- [DRM_MODE_CONNECTOR_SVIDEO] = "TV",
- [DRM_MODE_CONNECTOR_LVDS] = "LVDS",
- [DRM_MODE_CONNECTOR_Component] = "CTV",
- [DRM_MODE_CONNECTOR_9PinDIN] = "DIN",
- [DRM_MODE_CONNECTOR_DisplayPort] = "DP",
- [DRM_MODE_CONNECTOR_HDMIA] = "HDMI",
- [DRM_MODE_CONNECTOR_HDMIB] = "HDMI",
+ "None",
+ "VGA",
+ "DVI-I",
+ "DVI-D",
+ "DVI-A",
+ "Composite",
+ "SVIDEO",
+ "LVDS",
+ "Component",
+ "DIN",
+ "DP",
+ "HDMI",
+ "HDMI-B",
+ "TV",
+ "eDP",
+ "Virtual",
+ "DSI",
+ "DPI",
};
static const char *common_drm_output_name(uint32_t type)
@@ -436,7 +440,7 @@ void common_drm_conn_init(ScrnInfoPtr pScrn, uint32_t id)
return;
}
- snprintf(name, sizeof(name), "%s%d",
+ snprintf(name, sizeof(name), "%s-%d",
common_drm_output_name(koutput->connector_type),
koutput->connector_type_id);
--
2.18.0
More information about the etnaviv
mailing list