modetest: support plane properties
authorRob Clark <rob@ti.com>
Tue, 5 Jun 2012 17:28:47 +0000 (12:28 -0500)
committerRob Clark <rob@ti.com>
Fri, 8 Jun 2012 14:27:21 +0000 (09:27 -0500)
Add support to display plane properties.

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
tests/modetest/modetest.c

index dea271a43863cfc30b51d371f018f5b94d4bc51c..dc84cf32bda1ad68d67174c595f15a7a1d4c027c 100644 (file)
@@ -369,6 +369,7 @@ void dump_framebuffers(void)
 
 static void dump_planes(void)
 {
 
 static void dump_planes(void)
 {
+       drmModeObjectPropertiesPtr props;
        drmModePlaneRes *plane_resources;
        drmModePlane *ovr;
        unsigned int i, j;
        drmModePlaneRes *plane_resources;
        drmModePlane *ovr;
        unsigned int i, j;
@@ -403,6 +404,19 @@ static void dump_planes(void)
                        printf(" %4.4s", (char *)&ovr->formats[j]);
                printf("\n");
 
                        printf(" %4.4s", (char *)&ovr->formats[j]);
                printf("\n");
 
+               printf("  props:\n");
+               props = drmModeObjectGetProperties(fd, ovr->plane_id,
+                                                  DRM_MODE_OBJECT_PLANE);
+               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 plane properties: %s\n",
+                              strerror(errno));
+               }
+
                drmModeFreePlane(ovr);
        }
        printf("\n");
                drmModeFreePlane(ovr);
        }
        printf("\n");