hullo, modetest has the bad habit of ignoring the users mode settings and to fall back to the last mode from the connector.
this patch should fix that issue. a! -- aszlig Universaldilettant RedMoonStudios
Fix for determining the right mode and to fail if it don't match
(without falling back to the last mode in connector->modes).
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 58e0e4c..19139a1 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -199,10 +199,10 @@ void dump_connectors(void)
for (j = 0; j < connector->count_modes; j++)
dump_mode(&connector->modes[j]);
- drmModeFreeConnector(connector);
-
printf(" props:\n");
dump_props(connector);
+
+ drmModeFreeConnector(connector);
}
printf("\n");
}
@@ -302,9 +302,11 @@ connector_find_mode(struct connector *c)
}
for (j = 0; j < connector->count_modes; j++) {
+ if (strcmp(connector->modes[j].name, c->mode_str))
+ continue;
+
c->mode = &connector->modes[j];
- if (!strcmp(c->mode->name, c->mode_str))
- break;
+ break;
}
/* Found it, break out */
@@ -501,8 +503,8 @@ set_mode(struct connector *c, int count)
if (c[i].mode == NULL)
continue;
- printf("setting mode %s on connector %d, crtc %d\n",
- c[i].mode_str, c[i].id, c[i].crtc);
+ printf("setting mode %s on connector %d, crtc %d, mode: %d\n",
+ c[i].mode_str, c[i].id, c[i].crtc, c[i].mode);
ret = drmModeSetCrtc(fd, c[i].crtc, fb_id, x, 0,
&c[i].id, 1, c[i].mode);
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
-- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
