summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-02-23 15:08:03 -0500
committerKristian Høgsberg <krh@redhat.com>2009-02-23 15:10:30 -0500
commit9fc85b4084b69fefab3dbdf1f6cf97ccb47c963a (patch)
tree04abf494ad0b492b369833cb5879fba4c6795cc4 /tests
parent4a0d19ef4f210cea9e60c5acc355df03723ef808 (diff)
modetest: Print names of properties.
Diffstat (limited to 'tests')
-rw-r--r--tests/modetest/modetest.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 9a82727d..58e0e4cf 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -138,7 +138,7 @@ void dump_encoders(void)
printf("\n");
}
-void dump_mode(struct drm_mode_modeinfo *mode)
+void dump_mode(drmModeModeInfo *mode)
{
printf(" %s %.02f %d %d %d %d %d %d %d %d\n",
mode->name,
@@ -153,6 +153,19 @@ void dump_mode(struct drm_mode_modeinfo *mode)
mode->vtotal);
}
+static void
+dump_props(drmModeConnector *connector)
+{
+ drmModePropertyPtr props;
+ int i;
+
+ for (i = 0; i < connector->count_props; i++) {
+ props = drmModeGetProperty(fd, connector->props[i]);
+ printf("\t%s, flags %d\n", props->name, props->flags);
+ drmModeFreeProperty(props);
+ }
+}
+
void dump_connectors(void)
{
drmModeConnector *connector;
@@ -187,6 +200,9 @@ void dump_connectors(void)
dump_mode(&connector->modes[j]);
drmModeFreeConnector(connector);
+
+ printf(" props:\n");
+ dump_props(connector);
}
printf("\n");
}
@@ -252,7 +268,7 @@ void dump_framebuffers(void)
struct connector {
int id;
char mode_str[64];
- struct drm_mode_modeinfo *mode;
+ drmModeModeInfo *mode;
drmModeEncoder *encoder;
int crtc;
};