modetest: print CRTC properties
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 15 May 2012 21:38:29 +0000 (18:38 -0300)
committerRob Clark <rob@ti.com>
Fri, 8 Jun 2012 14:27:21 +0000 (09:27 -0500)
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
tests/modetest/modetest.c

index 8012ecc..ce57e65 100644 (file)
@@ -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");