xf86-video-ati: Branch 'master'
Alex Deucher
agd5f at kemper.freedesktop.org
Wed Nov 24 08:04:38 PST 2010
src/drmmode_display.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 5d3f33729be0639cef17372345b2dab6127e39d9
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Wed Nov 24 10:59:09 2010 -0500
radeon/kms: fix output enumeration
If a system has a mix of DVI-I, and DVI-D connectors, or a mix
of HDMI-A and HDMI-B connectors, the enumeration was per
connector type, but the naming was the same for multiple
connectors (DVI-[0-n] for DVI-I, -D, -A, and HDMI-[0-n]
for HDMI-A, and -B), you'd end up with multiple connectors
with the same name. Fix this by tracking the number of
connectors across similar connector types.
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3332472..0a6e338 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -899,7 +899,7 @@ const char *output_names[] = { "None",
};
static void
-drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
+drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int *num_dvi, int *num_hdmi)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
xf86OutputPtr output;
@@ -930,12 +930,18 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
/* need to do smart conversion here for compat with non-kms ATI driver */
if (koutput->connector_type_id == 1) {
switch(koutput->connector_type) {
- case DRM_MODE_CONNECTOR_VGA:
case DRM_MODE_CONNECTOR_DVII:
case DRM_MODE_CONNECTOR_DVID:
case DRM_MODE_CONNECTOR_DVIA:
+ snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], *num_dvi);
+ (*num_dvi)++;
+ break;
case DRM_MODE_CONNECTOR_HDMIA:
case DRM_MODE_CONNECTOR_HDMIB:
+ snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], *num_hdmi);
+ (*num_hdmi)++;
+ break;
+ case DRM_MODE_CONNECTOR_VGA:
case DRM_MODE_CONNECTOR_DisplayPort:
snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1);
break;
@@ -1287,7 +1293,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
xf86CrtcConfigPtr xf86_config;
RADEONInfoPtr info = RADEONPTR(pScrn);
- int i;
+ int i, num_dvi = 0, num_hdmi = 0;
xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
@@ -1304,7 +1310,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
drmmode_crtc_init(pScrn, drmmode, i);
for (i = 0; i < drmmode->mode_res->count_connectors; i++)
- drmmode_output_init(pScrn, drmmode, i);
+ drmmode_output_init(pScrn, drmmode, i, &num_dvi, &num_hdmi);
/* workout clones */
drmmode_clones_init(pScrn, drmmode);
More information about the xorg-commit
mailing list