xf86-video-intel: Branch 'intel-kernelmode' - src/drmmode_display.c
Dave Airlie
airlied at kemper.freedesktop.org
Tue Jun 3 22:02:28 PDT 2008
src/drmmode_display.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
New commits:
commit 95fb4ac2ea326ee67f472e33ba4202942f246df1
Author: Dave Airlie <airlied at linux.ie>
Date: Wed Jun 4 15:01:23 2008 +1000
drm: fixup encoder retrival for intel only
also names
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b08e46f..d60d3f0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -496,11 +496,18 @@ static int subpixel_conv_table[7] = { 0, SubPixelUnknown,
SubPixelVerticalBGR,
SubPixelNone };
-const char *output_names[] = { "None",
- "VGA",
- "TMDS",
- "LVDS",
- "TV" };
+struct output_name {
+ const char *name;
+ int count;
+};
+
+struct output_name output_names[] = {
+ { "None", 0 },
+ { "VGA", 0 },
+ { "TMDS", 0 },
+ { "LVDS", 0 },
+ { "TV", 0 },
+};
static void
drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
@@ -515,14 +522,14 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
if (!koutput)
return;
- snprintf(name, 32, "%s%d", output_names[koutput->connector_type], koutput->connector_id);
-
- kencoder = drmModeGetEncoder(drmmode->fd, koutput->encoder);
+ kencoder = drmModeGetEncoder(drmmode->fd, koutput->encoders[0]);
if (!kencoder) {
drmModeFreeConnector(koutput);
return;
}
+ snprintf(name, 32, "%s%d", output_names[kencoder->encoder_type].name, output_names[kencoder->encoder_type].count++);
+
output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name);
if (!output) {
drmModeFreeEncoder(kencoder);
More information about the xorg-commit
mailing list