Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3322147rwa; Tue, 23 Aug 2022 02:48:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Q4jL63/vVdT3ksjAmy6ql/Q3IuuRo/TrKgCjwXQMzSsuT4Gk2m0RbAYWw3gxvy16XawJY X-Received: by 2002:a63:5009:0:b0:42a:ff6e:5dca with SMTP id e9-20020a635009000000b0042aff6e5dcamr552318pgb.393.1661248132256; Tue, 23 Aug 2022 02:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248132; cv=none; d=google.com; s=arc-20160816; b=psfz0ReGOpBEZagxlaTBXkcToHZiwBmn7O2DhV7wqdqcn4LQfAR11XZSHOdyHLLOOF eutDxgMjpJmFf1o/voM/k5qAH45gKwvK3D9EY4voC8DyxUgsfPoG1xM7onPJrGXmH3Cu A3dM21vlubOLyUpqODX5MjjLy0DNH1K8b/wdgYe/kL2+HTOxO5paieXJHielIy7TcQk8 /dYKGV8j9t3rOz1XCuIwUsa3u0RljffYHWxli4tp2lL7wWVZ0BgQrtolj0rC6ypinDqo +E7aW+kkuIZWgBw7wUXrGLAddFYsb6Xafs9dShDXYsoNtNfe66PsNNKnraj2gDIJue6N pZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Zw/ATiP6UBprGj+kWKZLtLG8eg37xbYjkhBdOOcVOxY=; b=kPr5DN9evpmSG81dbhRABeZWcqDrdB/uXjxILEUyzurgkZAJF3/RmoTEuVrFxUUKBg oORIiUO7LxyB0uFsBe1fkm9vD+jwsa+CSqBhQgi7MEaoKWHf7LtIp+Sc2ok5Djwo/6xT oYz8Gif25cJq0RdSKfebcTcTK3dnDhVIcRRM9e0v835iSwgf92KjxjSTBwXCY/SPqAzv X9tNDCaoq4S95dhD5xtWbl4IGJGLV51XHJEzFkTgELs3lqvFqIMM+gHuoF3jIGRD5BEF nlIiqmDG+racx31l62VieCDow3pOyR16T8PTOp/pUq86FD9R5CXNdv4AsiGAdHaj77Hs jgtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ThijvhZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170902e5c700b0016d70bd3fd6si17117413plf.77.2022.08.23.02.48.41; Tue, 23 Aug 2022 02:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ThijvhZ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241638AbiHWIJu (ORCPT + 99 others); Tue, 23 Aug 2022 04:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240303AbiHWIIk (ORCPT ); Tue, 23 Aug 2022 04:08:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDC116C756; Tue, 23 Aug 2022 01:05:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4FC16B81C22; Tue, 23 Aug 2022 08:05:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B44AAC433C1; Tue, 23 Aug 2022 08:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661241930; bh=l1eN8wcRrSyg38twlZ0Z+rSeqA/tyusE2PZXXuhhE18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ThijvhZ8xvPyKoQWA5vrACLBeTwotd9GwcKbpVjR5dWm5LjkCUvKpSWwr1EqWQOgw 6tS7ymsqOpz8IJiq7O2gEqcS5Vc+pYpWNWohC6QWnjyoxzXd0L8KOmcDSKjgCxxYQn Gi+EGFVroUgGoGZkIXtN5rwwAVzJ9IGCZplLsu4I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Likun Gao , Hawking Zhang , Alex Deucher Subject: [PATCH 5.19 022/365] drm/amdgpu: change vram width algorithm for vram_info v3_0 Date: Tue, 23 Aug 2022 09:58:43 +0200 Message-Id: <20220823080119.139942824@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Likun Gao commit 4a0a2cf4c03ba49a4c2596c49c7daa719917d509 upstream. Update the vram width algorithm for vram_info v3_0 to align with the changes of latest IFWI. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.19.x Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index fd8f3731758e..b81b77a9efa6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c @@ -314,7 +314,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev, mem_channel_number = vram_info->v30.channel_num; mem_channel_width = vram_info->v30.channel_width; if (vram_width) - *vram_width = mem_channel_number * mem_channel_width; + *vram_width = mem_channel_number * (1 << mem_channel_width); break; default: return -EINVAL; -- 2.37.2