Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp162261lqd; Tue, 23 Apr 2024 19:52:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxpv5kZOuxAAoz9hta4P6e5YFZ5CzeAHG2rwhz2YB4amBdZ7L1Y1vejSDJDV+XjVhTKYCncPguOUZVlXO0Vj8V1rB9Wk/BZibSHcKl0Q== X-Google-Smtp-Source: AGHT+IGQ/VXBxDAEMfpTT07Ho3rL0znQgV1EFiKqUMr6TYvmvyRao1h1QWVWb0Mz0NOWeALJCLPn X-Received: by 2002:a05:6a21:32a8:b0:1aa:965d:1332 with SMTP id yt40-20020a056a2132a800b001aa965d1332mr1778528pzb.26.1713927152649; Tue, 23 Apr 2024 19:52:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713927152; cv=pass; d=google.com; s=arc-20160816; b=KxgXAdA7fwH6Ql0jOUHMNdmoSmolpbymE+w9ItDwE1SeQ7qnhrhkifOTNUEad5ubBB Wk9UCq9//BlqLJuTk3tg+KOPiT2JxMMJEd4GG1En1sTeAGmYuqUvP749Thxbu1SczufE x6bTRmzGTYBLWwfIqhSZTBfXqvWVi2xaY9fup8K74qmv7Oqfgkxx9JVUvZdYyEoELOEd wa+gys7nwqm/hCChrIv+7r8KKeRJ+CvvunsAYiE+hdFJGbIftQMMkNxCaCDt4fFFCkHu HwGZgFu5bSORwB7pTujb5t30vFV35tMNWUJWZh8twcARI3HQZgOEQZCqPwIJwwqEhCoE MajA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=gZh6ePaIOuCwDbpk3olt/lwItI0lVW6WJuNX6TqYyCY=; fh=2bEoRi/hvL5T2OtBH7UtmE7y7vJiFAGPouvKFKocfOY=; b=NoENDtHzOhI4ssZQg/GW/weMXB8hKIiwVhjp411duT2iy8d3Qb1P4XrQpzt0gvdf45 HEgjsD5BL3o9/2BlQpzX7f32EDbjrgj3VYRJV3CbK49mpOTwGK/qV7Bev2Vtt4llHlbX Oaxc/aV9eindZxsldRRIcem08O6GbPVfEwdqSIkm+0R7FDRsRtirJKKY4d8YsodVGO3U A+7ZdJuWp77FUL1a48YtylXN7Wdo9YyUkNR4cub+fC/euL8DEmJJdtkKu024HyvIMJzd qDlOwOfPoRo7+QZnaqpBnv17hMbRjCEVT9P/cRigmx4v4qfQ0wX4XshL02sWOtybtUHI nfBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bvzmc2N1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-156154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156154-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p12-20020a631e4c000000b005dc87bb5496si10223578pgm.132.2024.04.23.19.52.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 19:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Bvzmc2N1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-156154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156154-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 537B128760A for ; Wed, 24 Apr 2024 02:43:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC07783CC4; Wed, 24 Apr 2024 02:43:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bvzmc2N1" Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE25680BF5 for ; Wed, 24 Apr 2024 02:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713926627; cv=none; b=gzjHDgd26ghGSSY53mn0mP59PIKf+meiAy7owbPTPvrFmzzdgzZauqas1wwewzvFHBcl00w89KGtt0U8y4zF+6+VSR54W9dsl8vW2FKzVK8IchAZJYSacOvzT966+uAUDpkKpuHrBSU42lDw91EatYiEspALaPdfAY90E8S6DbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713926627; c=relaxed/simple; bh=YBH+ybySjpxZoSXfJc6QAoUaOMcM5HQ0FOTUR3WkT28=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Fjfqxt4AMlRnXjYtbrPK8gT+n2n5iNxRTg2Mvc0F3f32HSNj7HowE6VSgtf0nOSYlfopHHOYNSBQ/8l03apSzoLHeds21WCaOaxQ1MHK3oXH91ZCXwpEy0pEE6riGfXledH+Us4O6/+ryTCO7h/P961Z5J+Dp53K7VFNwmbvs1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bvzmc2N1; arc=none smtp.client-ip=209.85.215.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-5dcc4076c13so343933a12.0 for ; Tue, 23 Apr 2024 19:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713926625; x=1714531425; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gZh6ePaIOuCwDbpk3olt/lwItI0lVW6WJuNX6TqYyCY=; b=Bvzmc2N128ZhYCd+PbJFO1KzjCuloMlekStZ7mJUasTuOMZc/pDq5db3EqglxtcqTv 3W0husnW3hb1pYV5jAvyOFFf4oj+hWOImn+hwPx9rIZIj6v8AFid8vkfWbuMOJkGmkqE IBdWnHRQpj6J2DGMoqMrzJtbwX0JZciQkUG2kCrvw0FvFuGFHvM9dW2PvxUBHSGw0JVA thS/gz4m2NK4rgpv9/77QMmv7XeWG6UrGs/6L8V5+ebGBDH5RVltdTMt0WdgbOR7vwRB nTkWIxOUzfzt59Fpq4bHLeeZ/KhkuEh3Rs9qBkriqopry0E4oI0mWMRUtNsJVsHf5XVN ubUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713926625; x=1714531425; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gZh6ePaIOuCwDbpk3olt/lwItI0lVW6WJuNX6TqYyCY=; b=D6mlYQ9ZIQX1qM93vXvdlr1oVGPctWHq3EI5rJvNtRwqFCDDiRQwKY63R8KACUmtZO i+pHvN5CLQYtChCgVuhvoFVvL71uihY5SoPXHTKWT6I2s8/4Xq+d7fOUOxuieGuqOQlX rQU3km81lFyfEONqNZHqL8GDCCDp4PMjv1QlZNSsfB2li46XhpCpNFa+Ag6yMmrSz1zO petYvPWNHc+e4lJtxFMt89YYxnmvPkwEJVVNaWBKcTY1qogkqM7jsoifII9VW9aljXRg ArWnAtEnGB6HL0UF03a/kwuBZgAA9D5jm3TeJGolYnCIO5CeNjK72H95WnyRkKKondmi Rpbg== X-Forwarded-Encrypted: i=1; AJvYcCVVWkEBcWlEXOWUgVYfS352CMTWAQTDFIC78AcqnLZFqwL+YcNbktX5R84/niZkpGNnOPnhTWA7MgN0NQBD/F/SzyWI3IrrmAdtSQ6p X-Gm-Message-State: AOJu0YzDumskF6sNb8qXs2/KPwwwxJ8TlhkWDMU3947CdmdRFuIqBjSa 2wXGYpEVTFhx/xm8KitBqWFZO516M3FNuYTNXYBSMT4BZtm+STx/XEJH1BqA82iIy0uRvwRJnnC uQSyqmrmBmOpB5eyhH655xxHy0mk= X-Received: by 2002:a17:90a:a381:b0:2a6:217b:4492 with SMTP id x1-20020a17090aa38100b002a6217b4492mr1644346pjp.3.1713926625028; Tue, 23 Apr 2024 19:43:45 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240422052608.5297-1-maqianga@uniontech.com> <68f02c5c-5591-4d6f-9926-b0fc6f9f6287@amd.com> <94BEDC76B25ADCE8+20240424103025.74a98199@john-PC> In-Reply-To: <94BEDC76B25ADCE8+20240424103025.74a98199@john-PC> From: Alex Deucher Date: Tue, 23 Apr 2024 22:43:33 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: Fixup bad vram size on gmc v6 and v7 To: Qiang Ma Cc: =?UTF-8?Q?Christian_K=C3=B6nig?= , alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, srinivasan.shanmugam@amd.com, Arunpravin.PaneerSelvam@amd.com, le.ma@amd.com, Felix.Kuehling@amd.com, mukul.joshi@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 10:30=E2=80=AFPM Qiang Ma = wrote: > > On Mon, 22 Apr 2024 16:47:36 +0200 > Christian K=C3=B6nig wrote: > > > Am 22.04.24 um 16:40 schrieb Alex Deucher: > > > On Mon, Apr 22, 2024 at 9:00=E2=80=AFAM Christian K=C3=B6nig > > > wrote: > > >> Am 22.04.24 um 14:33 schrieb Qiang Ma: > > >>> On Mon, 22 Apr 2024 11:40:26 +0200 > > >>> Christian K=C3=B6nig wrote: > > >>> > > >>>> Am 22.04.24 um 07:26 schrieb Qiang Ma: > > >>>>> Some boards(like Oland PRO: 0x1002:0x6613) seem to have > > >>>>> garbage in the upper 16 bits of the vram size register, > > >>>>> kern log as follows: > > >>>>> > > >>>>> [ 6.000000] [drm] Detected VRAM RAM=3D2256537600M, BAR=3D256M > > >>>>> [ 6.007812] [drm] RAM width 64bits GDDR5 > > >>>>> [ 6.031250] [drm] amdgpu: 2256537600M of VRAM memory ready > > >>>>> > > >>>>> This is obviously not true, check for this and clamp the size > > >>>>> properly. Fixes boards reporting bogus amounts of vram, > > >>>>> kern log as follows: > > >>>>> > > >>>>> [ 2.789062] [drm] Probable bad vram size: 0x86800800 > > >>>>> [ 2.789062] [drm] Detected VRAM RAM=3D2048M, BAR=3D256M > > >>>>> [ 2.789062] [drm] RAM width 64bits GDDR5 > > >>>>> [ 2.789062] [drm] amdgpu: 2048M of VRAM memory ready > > >>>> Well we had patches like this one here before and so far we > > >>>> always rejected them. > > >>>> > > >>>> When the mmCONFIG_MEMSIZE register isn't properly initialized > > >>>> then there is something wrong with your hardware. > > >>>> > > >>>> Working around that in the software driver is not going to fly. > > >>>> > > >>>> Regards, > > >>>> Christian. > > >>>> > > >>> Hi Christian: > > >>> I see that two patches for this issue have been merged, and the > > >>> patches are as follows: > > >>> > > >>> 11544d77e397 drm/amdgpu: fixup bad vram size on gmc v8 > > >>> 0ca223b029a2 drm/radeon: fixup bad vram size on SI > > >> Mhm, I remember that we discussed reverting those but it looks > > >> like that never happened. I need to ask around internally. > > >> > > >> Question is do you see any other problems with the board? E.g. > > >> incorrect connector or harvesting configuration? > > > I'll need to dig up the past discussion again, but IIRC, the issue > > > was only seen on some non-x86 platforms. Maybe something specific > > > to MMIO on those? > > > > I honestly doesn't remember it either, but in general it's the job of > > the VBIOS to init this register. > > > > So if we see the upper bits mangled the VBIOS hasn't done that > > correctly and it's quite likely that this is only the tip of the > > iceberg of problems. > > > > Yes, this problem was found on the mips notebook. Check log vbios > signature incorrect, I don't know if it has any influence. > After add patch, drm logs are as follows: IIRC, the patches for the other generations were on similar less mainstream platforms. I've never seen anything like this on x86. I suspect this is something platform specific. Does this platform have an x86 real mode emulator to post the GPU? If so, I wonder if the problem lies somewhere in there? Can you disable that or test with a secondary board which does not post the GPU? The driver can post it itself. Another thing to try would be to call the atombios asic_init sequence and check if the value is correctly written in that case. The asic_init sequence should write the mem config register as part of the sequence. Since asic_init is just a programming sequence stored in the vbios (and interpreted by the driver), you should be able to audit it to find out what is going wrong. You can use atomdis (https://cgit.freedesktop.org/~mhopf/AtomDis/) to print out the programming sequences in the atom command tables. Alex > > [ 2.554687] [drm] amdgpu kernel modesetting enabled. > [ 2.558593] [drm] initializing kernel modesetting (OLAND > 0x1002:0x6613 0x1028:0x1002 0x00). [ 2.558593] [drm] register mmio > base: 0x45400000 [ 2.558593] [drm] register mmio size: 262144 > [ 2.558593] [drm] add ip block number 0 > [ 2.558593] [drm] add ip block number 1 > [ 2.558593] [drm] add ip block number 2 > [ 2.558593] [drm] add ip block number 3 > [ 2.558593] [drm] add ip block number 4 > [ 2.558593] [drm] add ip block number 5 > [ 2.558593] [drm] add ip block number 6 > [ 2.578125] [drm] BIOS signature incorrect 0 0 > [ 2.746093] [drm] vm size is 64 GB, 2 levels, block size is 10-bit, > fragment size is 9-bit [ 2.746093] [drm] Probable bad vram size: > 0x86800800 [ 2.746093] [drm] Detected VRAM RAM=3D2048M, BAR=3D256M > [ 2.746093] [drm] RAM width 64bits GDDR5 > [ 2.750000] [drm] amdgpu: 2048M of VRAM memory ready > [ 2.750000] [drm] amdgpu: 3072M of GTT memory ready. > [ 2.750000] [drm] GART: num cpu pages 65536, num gpu pages 262144 > [ 2.750000] [drm] Supports vblank timestamp caching Rev 2 > (21.10.2013). [ 2.750000] [drm] Driver supports precise vblank > timestamp query. [ 2.750000] [drm] Internal thermal controller with > fan control [ 2.750000] [drm] amdgpu: dpm initialized > [ 2.750000] [drm] amdgpu atom DIG backlight initialized > [ 2.750000] [drm] AMDGPU Display Connectors > [ 2.750000] [drm] Connector 0: > [ 2.750000] [drm] DP-1 > [ 2.750000] [drm] HPD2 > [ 2.750000] [drm] DDC: 0x1950 0x1950 0x1951 0x1951 0x1952 0x1952 > 0x1953 0x1953 [ 2.750000] [drm] Encoders: > [ 2.750000] [drm] LCD1: INTERNAL_UNIPHY > [ 2.750000] [drm] Connector 1: > [ 2.750000] [drm] HDMI-A-1 > [ 2.750000] [drm] HPD1 > [ 2.750000] [drm] DDC: 0x194c 0x194c 0x194d 0x194d 0x194e 0x194e > 0x194f 0x194f [ 2.750000] [drm] Encoders: > [ 2.750000] [drm] DFP1: INTERNAL_UNIPHY > [ 2.753906] [drm] PCIE gen 2 link speeds already enabled > [ 3.507812] [drm] fb mappable at 0x503E4000 > [ 3.507812] [drm] vram apper at 0x50000000 > [ 3.507812] [drm] size 8306688 > [ 3.507812] [drm] fb depth is 24 > [ 3.507812] [drm] pitch is 7680 > [ 4.632812] amdgpu 0000:05:00.0: fb0: amdgpudrmfb frame buffer device > [ 5.023437] [drm] Initialized amdgpu 3.27.0 20150101 for > 0000:05:00.0 on minor 0 > > > Qiang Ma > > > Christian. > > > > > > > > Alex > > > > > > > > >> Regards, > > >> Christian. > > >> > > >>> Qiang Ma > > >>> > > >>>>> Signed-off-by: Qiang Ma > > >>>>> --- > > >>>>> drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 11 +++++++++-- > > >>>>> drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 13 ++++++++++--- > > >>>>> 2 files changed, 19 insertions(+), 5 deletions(-) > > >>>>> > > >>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c > > >>>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index > > >>>>> 23b478639921..3703695f7789 100644 --- > > >>>>> a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ > > >>>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c @@ -309,8 +309,15 @@ > > >>>>> static int gmc_v6_0_mc_init(struct amdgpu_device *adev) } > > >>>>> adev->gmc.vram_width =3D numchan * chansize; > > >>>>> /* size in MB on si */ > > >>>>> - adev->gmc.mc_vram_size =3D RREG32(mmCONFIG_MEMSIZE) * > > >>>>> 1024ULL * 1024ULL; > > >>>>> - adev->gmc.real_vram_size =3D RREG32(mmCONFIG_MEMSIZE) * > > >>>>> 1024ULL * 1024ULL; > > >>>>> + tmp =3D RREG32(mmCONFIG_MEMSIZE); > > >>>>> + /* some boards may have garbage in the upper 16 bits */ > > >>>>> + if (tmp & 0xffff0000) { > > >>>>> + DRM_INFO("Probable bad vram size: 0x%08x\n", tmp); > > >>>>> + if (tmp & 0xffff) > > >>>>> + tmp &=3D 0xffff; > > >>>>> + } > > >>>>> + adev->gmc.mc_vram_size =3D tmp * 1024ULL * 1024ULL; > > >>>>> + adev->gmc.real_vram_size =3D adev->gmc.mc_vram_size; > > >>>>> > > >>>>> if (!(adev->flags & AMD_IS_APU)) { > > >>>>> r =3D amdgpu_device_resize_fb_bar(adev); > > >>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c > > >>>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index > > >>>>> 3da7b6a2b00d..1df1fc578ff6 100644 --- > > >>>>> a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +++ > > >>>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c @@ -316,10 +316,10 @@ > > >>>>> static void gmc_v7_0_mc_program(struct amdgpu_device *adev) > > >>>>> static int gmc_v7_0_mc_init(struct amdgpu_device *adev) { > > >>>>> int r; > > >>>>> + u32 tmp; > > >>>>> > > >>>>> adev->gmc.vram_width =3D > > >>>>> amdgpu_atombios_get_vram_width(adev); if > > >>>>> (!adev->gmc.vram_width) { > > >>>>> - u32 tmp; > > >>>>> int chansize, numchan; > > >>>>> > > >>>>> /* Get VRAM informations */ > > >>>>> @@ -363,8 +363,15 @@ static int gmc_v7_0_mc_init(struct > > >>>>> amdgpu_device *adev) adev->gmc.vram_width =3D numchan * chansize; > > >>>>> } > > >>>>> /* size in MB on si */ > > >>>>> - adev->gmc.mc_vram_size =3D RREG32(mmCONFIG_MEMSIZE) * > > >>>>> 1024ULL * 1024ULL; > > >>>>> - adev->gmc.real_vram_size =3D RREG32(mmCONFIG_MEMSIZE) * > > >>>>> 1024ULL * 1024ULL; > > >>>>> + tmp =3D RREG32(mmCONFIG_MEMSIZE); > > >>>>> + /* some boards may have garbage in the upper 16 bits */ > > >>>>> + if (tmp & 0xffff0000) { > > >>>>> + DRM_INFO("Probable bad vram size: 0x%08x\n", tmp); > > >>>>> + if (tmp & 0xffff) > > >>>>> + tmp &=3D 0xffff; > > >>>>> + } > > >>>>> + adev->gmc.mc_vram_size =3D tmp * 1024ULL * 1024ULL; > > >>>>> + adev->gmc.real_vram_size =3D adev->gmc.mc_vram_size; > > >>>>> > > >>>>> if (!(adev->flags & AMD_IS_APU)) { > > >>>>> r =3D amdgpu_device_resize_fb_bar(adev); > > > > >