From patchwork Thu May 7 17:26:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 6359751 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B40C6BEEE1 for ; Thu, 7 May 2015 17:27:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD432202A1 for ; Thu, 7 May 2015 17:27:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 921702022A for ; Thu, 7 May 2015 17:26:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 101386E87C; Thu, 7 May 2015 10:26:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D0DA6E873 for ; Thu, 7 May 2015 10:26:53 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 07 May 2015 10:26:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,384,1427785200"; d="scan'208";a="706823797" Received: from rpeel-mobl3.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.14.166]) by fmsmga001.fm.intel.com with ESMTP; 07 May 2015 10:26:50 -0700 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Thu, 7 May 2015 18:26:44 +0100 Message-Id: <1431019605-9786-5-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431019605-9786-1-git-send-email-damien.lespiau@intel.com> References: <1431019605-9786-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 4/5] skl_compute_wrpll: Count how many even/odd dividers we compute X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Damien Lespiau --- tools/skl_compute_wrpll.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/skl_compute_wrpll.c b/tools/skl_compute_wrpll.c index 4f7ea9a..a3a6e58 100644 --- a/tools/skl_compute_wrpll.c +++ b/tools/skl_compute_wrpll.c @@ -836,10 +836,12 @@ struct test_ops { static void test_run(struct test_ops *test) { unsigned int m; + unsigned p_odd_even[2] = { 0, 0 }; for (m = 0; m < ARRAY_SIZE(modes); m++) { struct skl_wrpll_params params = {}; int clock = modes[m].clock; + unsigned int p; if (!test->compute(clock, ¶ms)) { fprintf(stderr, "Couldn't compute divider for %dHz\n", @@ -847,12 +849,13 @@ static void test_run(struct test_ops *test) continue; } + p = params.p0 * params.p1 * params.p2; + /* * make sure we respect the +1%/-6% contraint around the * central frequency */ { - unsigned int p = params.p0 * params.p1 * params.p2; uint64_t dco_freq = (uint64_t)p * clock * 5; uint64_t central_freq = params.central_freq_hz; uint64_t deviation; @@ -871,7 +874,17 @@ static void test_run(struct test_ops *test) "deviation=%"PRIu64"\n", clock, deviation); } + + /* + * count how many even/odd dividers we have through the whole + * list of tested frequencies + */ + { + p_odd_even[p % 2]++; + } } + + printf("even/odd dividers: %d/%d\n", p_odd_even[0], p_odd_even[1]); } int main(int argc, char **argv)