summaryrefslogtreecommitdiff
path: root/tests/modetest
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-06-05 12:28:38 -0500
committerRob Clark <rob@ti.com>2012-06-08 09:27:21 -0500
commit6df9e6af4b34ef2c5278941ee78de029e4040485 (patch)
treebfd713cd72e53620c9739f4ae7b218452d9fbc92 /tests/modetest
parent7b228e900f59cda3cafb60692be9dd7aced6ad96 (diff)
modetest: support bitmask properties
Add support to display bitmask properties. Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/modetest')
-rw-r--r--tests/modetest/modetest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index ce57e65d..dea271a4 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -207,6 +207,8 @@ dump_prop(uint32_t prop_id, uint64_t value)
printf(" immutable");
if (prop->flags & DRM_MODE_PROP_ENUM)
printf(" enum");
+ if (prop->flags & DRM_MODE_PROP_BITMASK)
+ printf(" bitmask");
if (prop->flags & DRM_MODE_PROP_BLOB)
printf(" blob");
printf("\n");
@@ -224,6 +226,12 @@ dump_prop(uint32_t prop_id, uint64_t value)
printf(" %s=%llu", prop->enums[i].name,
prop->enums[i].value);
printf("\n");
+ } else if (prop->flags & DRM_MODE_PROP_BITMASK) {
+ printf("\t\tvalues:");
+ for (i = 0; i < prop->count_enums; i++)
+ printf(" %s=0x%llx", prop->enums[i].name,
+ (1LL << prop->enums[i].value));
+ printf("\n");
} else {
assert(prop->count_enums == 0);
}