modesetting: fix up output naming convention
A user on a nouveau-driven card ran into a problem where DVI-D-1 and DVI-I-1 were aliasing. The simplest fix is to provide the full connector names. While we're at it, rename the output names to match what is in the kernel, and start counting the connectors from 1 rather than 0. The only deviation is HDMI vs HDMI-A, which kept its original name. 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: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
a907ead786
commit
139e36dd5c
|
@ -1292,17 +1292,17 @@ static int subpixel_conv_table[7] = {
|
|||
static const char *const output_names[] = {
|
||||
"None",
|
||||
"VGA",
|
||||
"DVI",
|
||||
"DVI",
|
||||
"DVI",
|
||||
"DVI-I",
|
||||
"DVI-D",
|
||||
"DVI-A",
|
||||
"Composite",
|
||||
"S-video",
|
||||
"SVIDEO",
|
||||
"LVDS",
|
||||
"CTV",
|
||||
"Component",
|
||||
"DIN",
|
||||
"DisplayPort",
|
||||
"HDMI",
|
||||
"DP",
|
||||
"HDMI",
|
||||
"HDMI-B",
|
||||
"TV",
|
||||
"eDP",
|
||||
"Virtual",
|
||||
|
@ -1377,13 +1377,13 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name,
|
|||
|
||||
fallback:
|
||||
if (koutput->connector_type >= MS_ARRAY_SIZE(output_names))
|
||||
snprintf(name, 32, "Unknown-%d", koutput->connector_type_id - 1);
|
||||
snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id);
|
||||
#ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
|
||||
else if (pScrn->is_gpu)
|
||||
snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id - 1);
|
||||
snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id);
|
||||
#endif
|
||||
else
|
||||
snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1);
|
||||
snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
|
|
Loading…
Reference in New Issue
Block a user