[PATCH libdrm 6/8] modetest: support plane properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Rob Clark <rob@xxxxxx>

Add support to display plane properties.

Signed-off-by: Rob Clark <rob@xxxxxx>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
---
 tests/modetest/modetest.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index dea271a..dc84cf3 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -369,6 +369,7 @@ void dump_framebuffers(void)
 
 static void dump_planes(void)
 {
+	drmModeObjectPropertiesPtr props;
 	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("  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");
-- 
1.7.9.5

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux