From patchwork Tue Jun 5 18:06:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 9119 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DFEF923E1B for ; Tue, 5 Jun 2012 18:07:01 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id AFA0FA18357 for ; Tue, 5 Jun 2012 18:07:01 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so4648785yhp.11 for ; Tue, 05 Jun 2012 11:07:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=c/HdqbgXvcsIQpBWMScbBKLIq+xMTj3DrCnwqiT4+Iw=; b=PrqTFErTSV21zumqyW/+gMjBqKkD0kbGaCakcEXr83MVaDdWE6U6fe7H3/n9WG/o7n BDb12InZ0MODzBzz6Lm+mN64ybTlfotBIewvp6d7wsyPunGHlc5OXuLbEoAQ94/ZrCxT nV0OECMukaUyHqS/Jj/QaiKVHrjibDKm/f6gOAfLlh/lxFxtDMB+4/h7ixo4XkjM8dvR fuekTwY+zBQA5ssCj7ia10JyuOoFCGDCyonnFUOUS705vorSFZzVsl+CObrrW01gwFsz ohYElRPWXg8+ggrxWLcP4lif8/VJiUzSNgRZAc7/be5bwUTGDC7hUN52tjuzsJMVDUhs WVBg== Received: by 10.50.46.232 with SMTP id y8mr3774466igm.57.1338919621206; Tue, 05 Jun 2012 11:07:01 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp39699ibb; Tue, 5 Jun 2012 11:07:00 -0700 (PDT) Received: by 10.236.155.74 with SMTP id i50mr12979252yhk.2.1338919619993; Tue, 05 Jun 2012 11:06:59 -0700 (PDT) Received: from mail-gg0-f178.google.com (mail-gg0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id v69si2053218yhl.34.2012.06.05.11.06.59 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 11:06:59 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.161.178 as permitted sender) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.161.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-gg0-f178.google.com with SMTP id q6so4974645ggc.37 for ; Tue, 05 Jun 2012 11:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=c/HdqbgXvcsIQpBWMScbBKLIq+xMTj3DrCnwqiT4+Iw=; b=mHiHlCkSQXacwr/bz+H7Jxdet0tAOsKQm5MD/c+LfK5CiPIw2/+mitvHSDErzp/GQy B7dmeWpY8uTkB+BPXNgHaFUUFlMHzg50pKfj4Au+JfzwCrPpYsPxUg+eol2+VJVwFX4r HsCwDFxnYdtAmpAggNC4iL4xjqrfxXxEqwM5U4LKoXBTHeixX+ohLX9QODBQ3iX0s1P3 A2wsgNNnIFiH08YYGh1+yJ73QZPI6RwYOYHonJ6Xd7ukW6wNhlt3IzIpmU4joS699Iv6 45LiYj2yPTW58C5p9RwS3+FfY9gE030lUjKLok2tJJlMDJmOwVnppKfzt9EtQUkVnG4c RQhA== Received: by 10.60.29.41 with SMTP id g9mr17246081oeh.18.1338919619347; Tue, 05 Jun 2012 11:06:59 -0700 (PDT) Received: from localhost (ppp-70-253-38-6.dsl.rcsntx.swbell.net. [70.253.38.6]) by mx.google.com with ESMTPS id r8sm1387162oer.6.2012.06.05.11.06.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 11:06:58 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, Paulo Zanoni , Rob Clark Subject: [PATCH libdrm 5/8] modetest: support bitmask properties Date: Tue, 5 Jun 2012 13:06:31 -0500 Message-Id: <1338919594-25392-6-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1338919594-25392-1-git-send-email-rob.clark@linaro.org> References: <1338919594-25392-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQlitiCf2Sh+f+N1gPs9sgoHqcBK5E6jwsXHKrcP86Dsap1qN4ou8iOQszAkk0XbbqpwBVQd From: Rob Clark Add support to display bitmask properties. Signed-off-by: Rob Clark Reviewed-by: Paulo Zanoni --- tests/modetest/modetest.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index ce57e65..dea271a 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); }