From 9fc85b4084b69fefab3dbdf1f6cf97ccb47c963a Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 23 Feb 2009 15:08:03 -0500 Subject: modetest: Print names of properties. --- tests/modetest/modetest.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests/modetest') 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; }; -- cgit v1.2.3