From patchwork Tue Aug 13 09:28:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 2843764 Return-Path: X-Original-To: patchwork-dri-devel@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 A97AEBF546 for ; Tue, 13 Aug 2013 15:24:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 951DF204EB for ; Tue, 13 Aug 2013 15:24:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B4BE4204CB for ; Tue, 13 Aug 2013 15:24:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 957CDE79CF for ; Tue, 13 Aug 2013 08:24:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by gabe.freedesktop.org (Postfix) with ESMTP id A758FE64D6 for ; Tue, 13 Aug 2013 02:28:22 -0700 (PDT) Received: by mail-we0-f179.google.com with SMTP id t57so6477767wes.10 for ; Tue, 13 Aug 2013 02:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:disposition-notification-to :user-agent:mime-version:content-type; bh=p+7zUI7xIS73G88B3kCMiYcEk2YUmgyWk2Dy5bDj9wY=; b=JTuN0/LzJW1G26/FUGKDD0XArNC0gnIvZvy9Go5z0qgwyvYPPxde2ne5kLOnnpJQOm uTZaBv5tvKkJIVJkBxGdFcHJ5eXrlA+fL04aJDR6HcDQpXeSFNr7N+THJO20QYw17Uds X/l6aMGd1rX1JcFQjDZJQPNoTsduWxCl6xcWdivYtD/XxMw10VhNnHYU6qzzLdJDQRUt WVLROzWbLHP4PuMtvoEzOVuSCe8buE7kB22K7cCunM7uiVpLgV/1jBlwZsQCi/AmLv+V cNVEMWGg+zQEcChwZs9qO8P60cIcrBLpx15BxhCdYNs+zkaTkAWFbR5mefkSG1xzKSRu EbWg== X-Received: by 10.180.11.233 with SMTP id t9mr2052211wib.41.1376386101840; Tue, 13 Aug 2013 02:28:21 -0700 (PDT) Received: from pali.localnet (ip-88-212-34-237.antik.sk. [88.212.34.237]) by mx.google.com with ESMTPSA id o10sm2046723wiz.5.2013.08.13.02.28.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 Aug 2013 02:28:20 -0700 (PDT) From: Pali =?ISO-8859-1?Q?Roh=E1r?= To: David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ben Skeggs Subject: [PATCH] nouveau reclocking on nv40 not working since 77145f1cbdf8d28b46ff8070ca749bad821e0774 Date: Tue, 13 Aug 2013 11:28:01 +0200 Message-ID: <23735105.M9MNGeX3Gc@pali> User-Agent: KMail/4.10.5 (Linux/3.8.0-27-generic; KDE/4.10.5; x86_64; ; ) MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 13 Aug 2013 08:09:57 -0700 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Hello, in commit 77145f1cbdf8d28b46ff8070ca749bad821e0774 was introduced error which cause that on my Nvidia 6600GT card reclocking not working anymore. There is missing assigment of return value from pll_calc to ret. After this patch reclocking on my card working fine again. Above broken commit was introduced in kernel 3.7, so consider backporting this patch to older kernels too. Signed-off-by: Pali Rohár diff --git a/drivers/gpu/drm/nouveau/nv40_pm.c b/drivers/gpu/drm/nouveau/nv40_pm.c index 3af5bcd..625f80d 100644 --- a/drivers/gpu/drm/nouveau/nv40_pm.c +++ b/drivers/gpu/drm/nouveau/nv40_pm.c @@ -131,7 +131,7 @@ nv40_calc_pll(struct drm_device *dev, u32 reg, struct nvbios_pll *pll, if (clk < pll->vco1.max_freq) pll->vco2.max_freq = 0; - pclk->pll_calc(pclk, pll, clk, &coef); + ret = pclk->pll_calc(pclk, pll, clk, &coef); if (ret == 0) return -ERANGE;