Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2339111imm; Mon, 28 May 2018 06:20:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpWa+FD8Tva6EvkOuE1F8FkbfaI23kQ25EzMTBE71D9ZtEEZOrlnQ7z2nNxQ+QgqQzwHrb X-Received: by 2002:a62:190f:: with SMTP id 15-v6mr13493518pfz.42.1527513623089; Mon, 28 May 2018 06:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513623; cv=none; d=google.com; s=arc-20160816; b=TuAkccGi2qq6HHc8/uDHvufzSmPdNRLzNIVRO0wvIX0Z10PffcxFsCu098dsXNwJYN DhIgmTvmt1QF0fPJ+jXUUVVRFMkIYWbUy0mJaXqq2YGDP3FhXRDiKf+8JeG8gbVJHBt0 3842fki3te0ez0mGZYUYiTh79qJHDtcM6crkI9OtcDuW/iqIhxC6XPRgLap/Pu/XXIym QBMKN1S3jlYckM01UO0LTCMUNuvwoXUdW7CrGEDzne2BElrC/CK7pwmz0Y9neZd03E8j xDI1fRQ597BDm8AE+otDbRvNUdOoXs8oabLJGjzvAxZIKC8xGY3FHhhWkcvXc4rcnrMF eEpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=C8gAVhjy02usGbMKts2fwuJ5kE8ip/INozW46dD1RIU=; b=N1ufQ/px/tXAL0X4kTnu19w0UA0t8n7QpGMRejFW8yqBncXYsZqjVibIoHVah90hkF rqiErqJQ/JBAnUbA1MRaXSqSDgNy1zb0BoCZZBK+UkwN9VL34nmj+tr20SlUfwFSJ/7x KBdJo5fJNfmqpzaVWUf1OchfSzCPYikNLIQ0E6fH+zySn/Xbfv6SKzr3Ch4Hu92i5m7T 9uMO9vOlLrLH0S4FoU4/8Nc9FW5J0a93aYiWXG1jVCnQGYS8q3j3hGozbWRNKAYyc0WE 3Tn12vm1KfDxHGBy/im6ZiK9jm7AYamXwfThE3k+5kQc+Hjl0CvFuzN7D0jcYPOApseG Ukcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SsKfpGLN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3-v6si30425943pfc.336.2018.05.28.06.20.08; Mon, 28 May 2018 06:20:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SsKfpGLN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163550AbeE1Kti (ORCPT + 99 others); Mon, 28 May 2018 06:49:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:39198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163537AbeE1Ktb (ORCPT ); Mon, 28 May 2018 06:49:31 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1370520660; Mon, 28 May 2018 10:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504570; bh=YhhrU1OrMuMluhPKMY119f4NPbj971d43v+MFNtm6cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SsKfpGLNRcj236zeUDDHy7el1NAC1snBHf/b3ZR8lvnyhZrB3Rs++6PKf0KcY5Fo2 h4wqjRnjuqVrwP/iKArVEozPQgq47BFdZw0CaOdhihRHNTEFX/d7W/TQgaZxYiwsxT AIdsG9ar/uljbWfvVwzU6dFO/WKdRNPBZHbOuDb0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom St Denis , Alex Deucher , Sasha Levin Subject: [PATCH 4.14 187/496] drm/amd/amdgpu: Correct VRAM width for APUs with GMC9 Date: Mon, 28 May 2018 11:59:32 +0200 Message-Id: <20180528100327.840413630@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tom St Denis [ Upstream commit 585b7f161c85bd5ca675b97580faf21c506541e3 ] DDR4 has a 64-bit width not 128-bits. It was reporting twice the width. Tested with my Ryzen 2400G. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -456,7 +456,10 @@ static int gmc_v9_0_mc_init(struct amdgp adev->mc.vram_width = amdgpu_atomfirmware_get_vram_width(adev); if (!adev->mc.vram_width) { /* hbm memory channel size */ - chansize = 128; + if (adev->flags & AMD_IS_APU) + chansize = 64; + else + chansize = 128; tmp = RREG32_SOC15(DF, 0, mmDF_CS_AON0_DramBaseAddress0); tmp &= DF_CS_AON0_DramBaseAddress0__IntLvNumChan_MASK;