From patchwork Fri Feb 7 09:03:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3600341 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8413CBF418 for ; Fri, 7 Feb 2014 09:24:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C95B320131 for ; Fri, 7 Feb 2014 09:24:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C9CD920120 for ; Fri, 7 Feb 2014 09:24:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 316C9FB952; Fri, 7 Feb 2014 01:24:44 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 44616FB997 for ; Fri, 7 Feb 2014 01:24:42 -0800 (PST) Received: by mail-ea0-f182.google.com with SMTP id r15so1424129ead.27 for ; Fri, 07 Feb 2014 01:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=Evw5GuxAqoroaS1yIdlrq1tl0LKxDYcc2rqDPwKphh8=; b=U9uE7D/zLEbdI/o8KbMLqFHoDjxBkUf2xzt/cDP7dDj4hVISebbd8Rm+TdjqHmuuzL vp5RYT848DVRPy2oIegawjskc4Jvo3MV8DK6hDWfYwNdhIVYoKl9PKtnOhDdwIIFiF02 BcBRxOYDmjPhFwuAi+5Lo3wJrq+MnQbNuaBMo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Evw5GuxAqoroaS1yIdlrq1tl0LKxDYcc2rqDPwKphh8=; b=mAQEBLEptKp+WE7wBN86SHICqQ3fwJsv2Pmx8iweLlCCxA4Xu5tYqTIsb3PDEAO9B4 QVuK3pHXtzUkbb2l2cy0fYoXgo2uD+q0JnhaGhg94IvrjoYPGPcInfdxe7ff1rnq/+iM bM7dN3IczH7Di/r/ODt6JpBE3RSAeYKzVcOlwBnCVyelKlwGlb6hoPkYP1OlfWWn+BGu Tz6vRnf/coTpjF5HoT/xmmS0I/rXdZW/UvCkTWGPocQW/VlY9ELQDzgLIBErX+wRAuts 8ZbNFfL1GaD8bht7eoIzjhNCibvEkYRl4itPwqRXJNjMZ7pYqab+rEcx2U52IAbWAoQk ff7A== X-Gm-Message-State: ALoCoQnigQjk2MoTjIKTqeRVj6AMksXUxwPgWiXFPCQ4KmCy4vf0pZIfacOU95waMKvcnalhErKW X-Received: by 10.15.43.141 with SMTP id x13mr14761561eev.35.1391765076991; Fri, 07 Feb 2014 01:24:36 -0800 (PST) Received: from wespe.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id y47sm14099409eel.14.2014.02.07.01.24.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Feb 2014 01:24:36 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Fri, 7 Feb 2014 10:03:33 +0100 Message-Id: <1391763814-6644-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.1.4 Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 1/2] tests/pm_rps: Round requested freq correctly X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 The kernel will round it, so if we don't we'll have a spurious mismatch. Happens on my machine here with 650-1300MHz range, where the midpoint is 975. Cc: Jeff McGee Signed-off-by: Daniel Vetter --- tests/pm_rps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/pm_rps.c b/tests/pm_rps.c index 467038104ec6..27e758755e3f 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -350,6 +350,9 @@ static void min_max_config(void (*check)(void)) { int fmid = (origfreqs[RPn] + origfreqs[RP0]) / 2; + /* hw (and so kernel) currently rounds to 50 MHz ... */ + fmid = fmid / 50 * 50; + log("\nCheck original min and max...\n"); check();