From patchwork Thu Aug 1 13:03:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 2836974 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 A4AE0C0319 for ; Thu, 1 Aug 2013 13:05:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81662201F0 for ; Thu, 1 Aug 2013 13:05:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 60CFE20176 for ; Thu, 1 Aug 2013 13:05:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70217E718B for ; Thu, 1 Aug 2013 06:05:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) by gabe.freedesktop.org (Postfix) with ESMTP id B98A4E6EE9 for ; Thu, 1 Aug 2013 06:03:39 -0700 (PDT) Received: by mail-qc0-f172.google.com with SMTP id a1so1054796qcx.31 for ; Thu, 01 Aug 2013 06:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=brPi29Pty5y0hc7meeeTzW/dijOFNJDIS+LMxZWIxrM=; b=apf5GHJ363YuVW2ItdvmRiBAi1mCeUiKFfEDexhlxTqQ9aaw+cKNYjbkhOr2bDR6VT sPu+wEIDA7BCvSN7yeyElPtqfnfkvvmLUCOwlYNSaE4VnZRHCNUNXyd5FTn62/75DJf0 e2R8Zco/FHj/WCwvs5e2mLcZRYGdeeozs3RlgjCPImJDVeBNsHLsHyVDFka+XnI/IWak M/0+nYRy2/7O/dEB5zeQNlb4kHWG4yaSSyGnjdfinpOxPAcxIsAGqecrOMEjACqt1Skn RnMBlM9yM/gSeOGmRR0Pf7otV4LBGWnw4XdbWNGqRGWEywZGPFfdt0DWPmey006f19WB 2Bjg== X-Received: by 10.224.11.194 with SMTP id u2mr4456667qau.18.1375362216415; Thu, 01 Aug 2013 06:03:36 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by mx.google.com with ESMTPSA id lk8sm4228122qeb.3.2013.08.01.06.03.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 01 Aug 2013 06:03:36 -0700 (PDT) From: alexdeucher@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: fix 64 bit divide in SI spm code Date: Thu, 1 Aug 2013 09:03:29 -0400 Message-Id: <1375362209-2867-1-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.7.5 Cc: Alex Deucher 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: , MIME-Version: 1.0 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=-5.6 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 From: Alex Deucher Forgot to use the appropriate math64 function. Signed-off-by: Alex Deucher --- This is already in my -fixes queue, but for those that are running into issues, here's the fix. drivers/gpu/drm/radeon/si_dpm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 7ad22e8..4182557 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -1767,7 +1767,7 @@ static void si_calculate_leakage_for_v_and_t_formula(const struct ni_leakage_coe s64 temperature, t_slope, t_intercept, av, bv, t_ref; s64 tmp; - i_leakage = drm_int2fixp(ileakage) / 100; + i_leakage = div64_s64(drm_int2fixp(ileakage), 100); vddc = div64_s64(drm_int2fixp(v), 1000); temperature = div64_s64(drm_int2fixp(t), 1000);