[PATCH libdrm 2/8] modetest: print CRTC properties

Rob Clark rob.clark at linaro.org
Tue Jun 5 11:06:28 PDT 2012


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
Reviewed-by: Rob Clark <rob at ti.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 tests/modetest/modetest.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index 8012ecc..ce57e65 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -295,7 +295,9 @@ void dump_connectors(void)
 void dump_crtcs(void)
 {
 	drmModeCrtc *crtc;
+	drmModeObjectPropertiesPtr props;
 	int i;
+	uint32_t j;
 
 	printf("CRTCs:\n");
 	printf("id\tfb\tpos\tsize\n");
@@ -314,6 +316,19 @@ void dump_crtcs(void)
 		       crtc->width, crtc->height);
 		dump_mode(&crtc->mode);
 
+		printf("  props:\n");
+		props = drmModeObjectGetProperties(fd, crtc->crtc_id,
+						   DRM_MODE_OBJECT_CRTC);
+		if (props) {
+			for (j = 0; j < props->count_props; j++)
+				dump_prop(props->props[j],
+					  props->prop_values[j]);
+			drmModeFreeObjectProperties(props);
+		} else {
+			printf("\tcould not get crtc properties: %s\n",
+			       strerror(errno));
+		}
+
 		drmModeFreeCrtc(crtc);
 	}
 	printf("\n");
-- 
1.7.9.5



More information about the dri-devel mailing list