From patchwork Wed Mar 29 22:09:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9652677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8A10602BE for ; Wed, 29 Mar 2017 22:09:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C78462845B for ; Wed, 29 Mar 2017 22:09:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAC262850F; Wed, 29 Mar 2017 22:09:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 155B42845B for ; Wed, 29 Mar 2017 22:09:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 954DE6E7EF; Wed, 29 Mar 2017 22:09:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id E606B6E7EF; Wed, 29 Mar 2017 22:09:50 +0000 (UTC) Received: by mail-yw0-x241.google.com with SMTP id k13so2921800ywk.2; Wed, 29 Mar 2017 15:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wic3uphUnGi3q0T7VWIZPWA/XWNjcamUurSxq1dhRYg=; b=kHs3xR77Uk7Wp/QHSJ7mOUNSq/vFDNBpVIGxvyFK28FosQRkLqIQ689xEdwl7OUc4a MRF+TC3pCM1Xf9vEP7z0wzUE5mrfpgzDzJ/24KwbBF4oc5o+kUnmRVoNZfK95XZ5weYK YICAy+MsavSbbvUu4vNQ5AhybR8ebjqYnBlASHerssp4yvIyA/lTKvORJlCJaIYwGcNv S9zos54y6ZXRWPBxVqVggCVfU+cIkHuwfMMmOWmdgRnVuYmz1CVPnRYWKgEV+g2gcqfm 4uh8Swoq28z/QqqRu45OzeBwjUzMum4Px5qsmrdmg+BpnE1oreaAswxclr2W3QQYt9eC zITA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wic3uphUnGi3q0T7VWIZPWA/XWNjcamUurSxq1dhRYg=; b=LnJDjqjIhhO0DMRVxxnsD/ynMmTGag03VrAbceCXCuZHT9PsZQpcbNefjGslfRlCDs K71PoFXiD9ZKzL1Ly77SADBSKFDd+vLDWgYggI6MBhGUmgXKA0Wda+g2VEX0w67EDPWo qmRAn6jPWKZrTslc0eM7ZHRsNr4JoEXYMyrU45zmsq0F6Ztmow42LEpu6CXXTK1Oyuw+ t5BtvYoc9EhwSD19tw/zSKZEYkWsPc/C1r1d4V3cjwNQIE3BicOEKv8VFc+8x2deXn9e p3UGzsPtXhPBkaf79Bo7Rh5QZebEwnWDJ7ynZrjclSJa9+BBKJNVa0GB6rj2Kkr5dk5C HKyQ== X-Gm-Message-State: AFeK/H1ZA0lMwbAm2yPYM4jbejAta+UXE1A8Jl+RpMCYwyTjrUaNuM4/O2XREUz0SYo/j5+kGlfNDsv4Da+EtA== X-Received: by 10.37.171.104 with SMTP id u95mr3057950ybi.155.1490825390123; Wed, 29 Mar 2017 15:09:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.11.80 with HTTP; Wed, 29 Mar 2017 15:09:49 -0700 (PDT) In-Reply-To: References: From: Alex Deucher Date: Wed, 29 Mar 2017 18:09:49 -0400 Message-ID: Subject: Re: drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition To: David Binderman Cc: "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "alexander.deucher@amd.com" , "christian.koenig@amd.com" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Mar 27, 2017 at 6:07 AM, David Binderman wrote: > > Hello there, > > linux-4.11-rc4/drivers/gpu/drm/radeon/r100.c:3303]: (style) Redundant condition: If 'EXPR == 11', the comparison 'EXPR <= 12' is always true. > > Source code is > > } else if (rdev->family == CHIP_RV350 || > rdev->family <= CHIP_RV380) { > Fixed in the attached patch. > Also in the same file: > > [drivers/gpu/drm/radeon/r100.c:2550]: (style) Variable 'tmp' is assigned a value > that is never used. > [drivers/gpu/drm/radeon/r100.c:2875]: (style) Variable 'tmp' is assigned a value > that is never used. These are intended. The registers are read back to to post the previous write. Alex From bc02be56efa4c147622c69cfc2772b9a116ab5f9 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 29 Mar 2017 18:03:27 -0400 Subject: [PATCH] drm/radeon: fix typo in bandwidth calculation The RV3xx settings were getting applied to all older asics rather than just RV3xx. Reported-by: David Binderman Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/r100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index e339931..8344945 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -3301,7 +3301,7 @@ void r100_bandwidth_update(struct radeon_device *rdev) mem_trp = ((temp >> 8) & 0x7) + 1; mem_tras = ((temp >> 11) & 0xf) + 4; } else if (rdev->family == CHIP_RV350 || - rdev->family <= CHIP_RV380) { + rdev->family == CHIP_RV380) { /* rv3x0 */ mem_trcd = (temp & 0x7) + 3; mem_trp = ((temp >> 8) & 0x7) + 3; -- 2.5.5