Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3753724ybt; Tue, 23 Jun 2020 09:53:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2vOoUq6JRsZtsnjB9o3/jiXFVpzOyD2kRtPgMXV8/r9wYc6puHcar0hc2BPcQLH/S4eiC X-Received: by 2002:a17:906:c443:: with SMTP id ck3mr11531420ejb.153.1592931227910; Tue, 23 Jun 2020 09:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592931227; cv=none; d=google.com; s=arc-20160816; b=j2squdXEE0rI8h4KAd4qm1lwHsTDwKcq9I1mprSNhlv5mxF+fVdFIQn9uaVvo/6B19 QYtVj2mhOmxC+nb7D2odqiy+2iWYUP2kXShzH+ErkwTful8d565kn0/ALkibhlHcgPs1 afCslxzXYM/ZCtY47tBxqvJDNF5pZPYpPnlZ76ny8L/ig0uKNYvvyHD/oodTjq6NukTH v407Mmv0hqEHW7Jk5B0JxtkNbRMUVppS8aXN2aoTuOUqP3/q4il1V23u9WjjRjjHIv4i jtNtELwmm7vyy6yo7UIKqalqlIVc/FoFO1qYciiTABt4T3Sj6z8TcDVklK+5vYs3oNCo LDNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bg1C/maXc1yHDgyZ8N7KDhwmSTHqJRAHyYrqsJclewo=; b=Osg87GWpRuiM+cRYnp7aFTVHIzX2CGvOxFzaSuJ/VIBi/xxNYyuvJZHKdyERRZZCPd 1qmC1EmvWmxyMoEzhizR3ab3KzyJA2vofYSpSWb3QVYtMGJh6mxxUju+uu7iTlWoTXFU x1LXnSzEATY/kC1PcW2HB08JF0jFP0gbx8KSBm0aHJ6ILoCjt40EvokoWi7G5TxtR2Gw C7mRuCs93tkyvxTQvaUkPjzmHKAsZXahS5x6PNGix2dU07RRIHqUutXdBunXXd9Drgye llJI8U3yViCt+WSs8mFJM9OvSJyKR1Fjs8tBfVT/KCGeHCxs0GbSw9fPXU6zvCN1ctX8 9lsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mqlbr0Ht; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s8si6264712edj.434.2020.06.23.09.53.24; Tue, 23 Jun 2020 09:53:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mqlbr0Ht; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732725AbgFWQvS (ORCPT + 99 others); Tue, 23 Jun 2020 12:51:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732408AbgFWQvQ (ORCPT ); Tue, 23 Jun 2020 12:51:16 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8CFCC061573; Tue, 23 Jun 2020 09:51:15 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id 17so4001119wmo.1; Tue, 23 Jun 2020 09:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bg1C/maXc1yHDgyZ8N7KDhwmSTHqJRAHyYrqsJclewo=; b=mqlbr0HtalRaLV/mTAHk1BaZYRLajtzzuqOA2+xIlE7AFpAXzv6NUeqUeqKEUQlwLX l5zgIuas0ANzK8c/p/RVzTC8TwzZoJjhGuECNWqjYzxw2eUIHeaX19dSA6JsOFE7pzCd bZgOU/3pXAshIfBoutWFqGiniMWEyegzk+QZUs0G3s22hBkrCE0JIGhU8lmWLZh3mpMb TCJzyR+rCR7xtKssZCUDO1iE8cvoTbSTu12OfaEeVSGaQe5LilnfEZ9X2bAACBMwShMa K+KszQp30zSwChCOwZUwT1wzgpqRgLnHnd5PeO+xeLbJxAhePjlwb9yXjzsXOhL8SlPS g7lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bg1C/maXc1yHDgyZ8N7KDhwmSTHqJRAHyYrqsJclewo=; b=lpQD0yh35vZl60rdjZnHADWTLWxaNjkT5I2zFUZS3w0i3zTbk0KSoPGqxeT2kPo3J8 3mXxN9h9+h1DdzilP7nleTUzt1E5tkVlkXQtqId8TtJN7KW/IYwMnzRaTr+zkQh278Qg y+ojwEdL9e8P+umx95LokqiN4iy+exUKzlZqpflKFQaqWtSBcuRAqnGcDSgjjzVMJ8tF F22ynqRXjQENaDWs0lKTpzj1cnU10BIAUgG1b7Ul0TzkBNlJS/RgHAiJXWXtqU0MOHWq nQD+1wOIKgK07Ai88PKL9prp6EyWDUfnL9niAdcEcP9y1PTckDkkjjpcRA/nNJWUk+D4 VX8g== X-Gm-Message-State: AOAM531XoRp49CzmWcJzT3+uaFWHBvEj62IxWVy5tRcN+wLQEEoW6TyK RNihOjT8bmTzEwtNJ1s1+GJGTgOHvMd/+aBH1FsmVw== X-Received: by 2002:a1c:3954:: with SMTP id g81mr11521140wma.73.1592931074567; Tue, 23 Jun 2020 09:51:14 -0700 (PDT) MIME-Version: 1.0 References: <20200622203122.25749-1-efremov@linux.com> In-Reply-To: <20200622203122.25749-1-efremov@linux.com> From: Alex Deucher Date: Tue, 23 Jun 2020 12:51:03 -0400 Message-ID: Subject: Re: [PATCH] drm/radeon: fix fb_div check in ni_init_smc_spll_table() To: Denis Efremov Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "for 3.8" , Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 22, 2020 at 5:56 PM Denis Efremov wrote: > > clk_s is checked twice in a row in ni_init_smc_spll_table(). > fb_div should be checked instead. > > Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") > Cc: stable@vger.kernel.org > Signed-off-by: Denis Efremov Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/ni_dpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c > index b57c37ddd164..c7fbb7932f37 100644 > --- a/drivers/gpu/drm/radeon/ni_dpm.c > +++ b/drivers/gpu/drm/radeon/ni_dpm.c > @@ -2127,7 +2127,7 @@ static int ni_init_smc_spll_table(struct radeon_device *rdev) > if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT)) > ret = -EINVAL; > > - if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT)) > + if (fb_div & ~(SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT)) > ret = -EINVAL; > > if (clk_v & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_SHIFT)) > -- > 2.26.2 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx