Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2255795lqt; Mon, 22 Apr 2024 06:11:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPClLNid/t82Tn42d2Pc7ddd9EelAUkm3Au/bPNjy4ajYVecXqx3/ixrlyjQXvV5VbregeOXkThWTi8+LR5ANHIE2BtAClfkownUgSFg== X-Google-Smtp-Source: AGHT+IFZCmgqhjcU4j6v7SeyPVzPCG0g31y0m25PGGoO0hV8I8Kbs/PaGMRLoxjcd5F2uPpueCi/ X-Received: by 2002:a05:6a20:2d09:b0:1ac:eb73:84a6 with SMTP id g9-20020a056a202d0900b001aceb7384a6mr7118966pzl.1.1713791487756; Mon, 22 Apr 2024 06:11:27 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n17-20020a639711000000b005dc15e82c4fsi7941768pge.170.2024.04.22.06.11.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 06:11:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=VrG9amHW; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-153396-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153396-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D1CA9B20F1C for ; Mon, 22 Apr 2024 13:00:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF61914A4D8; Mon, 22 Apr 2024 12:59:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="VrG9amHW" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2084.outbound.protection.outlook.com [40.107.223.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFC0A746E for ; Mon, 22 Apr 2024 12:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.84 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790798; cv=fail; b=O3sIzisWy333BXeMJ3nlSxKHKHtNwcHQhnNIovWz10lZ3DxzVCxtpepnRTunY2Y1bz8DqmUKIIeElT/8roAcrvyaz2UqgR7UL76YcU0WCRASYUACTLNaYKXQS7EB7ZB4YClIpvXlOuC0/CHDmM/nan2IKvJcyt/KiagFBh0CwXA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713790798; c=relaxed/simple; bh=0uz/aVjv4L3tLeFCixbmrGIYXLOJ/x7Zb1zoooyIGuw=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=k2GTlTocLGUuCSm+KTKJnZ8llN+ukGq7nqmJUEJdxWctT1Bp2BGS1QjrLtVb3K7JI8sxdl/NULBn+56AG4PFLR1pI4kSDeiFB0RGntKNvgslb0IixOxbhRdW3j7TT3MZfkrZ/gCAPLal1dWr889D2mN/bLijSfLSPvtVRxuZLOY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=VrG9amHW; arc=fail smtp.client-ip=40.107.223.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HmQd+JG1cfNA2Sta1e6cdsPU+ivHYst5iJzul93OIjiuMRoLHdpqh/RpIcKPmxZtoQxiZRnBGjwfecLoXSMFfpP38sGIvD1uHSA8LaTfZORu8u7hB2M9gRZqQdVFclQGRZF6USeOAqsncamAUJCOFcwnJV8AmnwSvkXD77N0g/KRe6B6XLu99nhD9GfIv+Jn87z9pOXR+zFwnTW/3pAuVGC10PGdtt5d5nfD1xkW/ay80QOnAvGIh8ZQ9IOrkNH6827E2l108uEmqPS/baipLs/NnW7fg+SheoS/4zFf6sOOv4stENh6mjYYo6gk917dgoqGxNRM9QE9DEx1migrxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L8jgRiAYAd1BsPB6QpTsacuss6Jx1qChFCNYuIK215I=; b=G3D/R4iWy0jyorEA83la6N/NBHshh2uTwrXL34z9VZK37XcENICVK7ygbxDexO5kPwjThbuUszbgeiGmXJPmg1isiunMWeOSdQv4tJHy0t84U4FONghLah//sew8Sl07nQYmi5savrBEsGo20G/6+DCZ5THgJZ7SJVGzd0UAi2dLb5aoRZzt/eLSbO0SvH14s14TNggN4zl0k9o5oWzeJmEcSryCIvlG4NfGSLOSXCASx3C0ISai9JYEMF2gZzq+IZuTG0eoajfNJFWD/IpKLYJgnPn5Ek4WscFyIEJ8umJmLtJBGA1QWpuieh1xgdHfl31iZsUdnZlBBfH0yEXIog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L8jgRiAYAd1BsPB6QpTsacuss6Jx1qChFCNYuIK215I=; b=VrG9amHWqzPkBcKsU6fPuCmvcRrj3iFRPN5ta1O4w8IWSKInCMGqOulhI/lTYRNYV7VOLJp9U1kzKisNOCdx3EB1FZ4+tTLy8iFo5LAoTJ33iHBnryFxoc0fbWtWW3FQiKmOTbF1dly4xJLXZ7Qy7mrRGTj1Gjx/neLw2uYtJfQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) by SA0PR12MB7478.namprd12.prod.outlook.com (2603:10b6:806:24b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Mon, 22 Apr 2024 12:59:54 +0000 Received: from PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::f2b6:1034:76e8:f15a]) by PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::f2b6:1034:76e8:f15a%6]) with mapi id 15.20.7472.044; Mon, 22 Apr 2024 12:59:54 +0000 Message-ID: Date: Mon, 22 Apr 2024 14:59:36 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/amdgpu: Fixup bad vram size on gmc v6 and v7 To: Qiang Ma Cc: 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 References: <20240422052608.5297-1-maqianga@uniontech.com> <68f02c5c-5591-4d6f-9926-b0fc6f9f6287@amd.com> Content-Language: en-US From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA9PR13CA0173.namprd13.prod.outlook.com (2603:10b6:806:28::28) To PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB5685:EE_|SA0PR12MB7478:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cb35cd7-65a1-4eb6-601e-08dc62cc1ad2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dTN3M1I2aG1qTkJETDJwMVFjN1hiUlNuTlRRcy96MWszQzBTcWRLVVVOZTlO?= =?utf-8?B?ei9Ga1ZjSU4zUmkwVjNXb21jYlBJa0dKeW9GeDh2V0lTRW5za1h0cHM0bGd5?= =?utf-8?B?R005V2wvUjRCcUtqRk1uS1FFczh1WDB2TUtuM1VzMlNtZ0cwdWMxSFFqMGV0?= =?utf-8?B?YUQrZE5wOERSdUhjQ01BeTByc3F5MUNnMXBJVklsS2FlVE9WbjdObGx2Umpy?= =?utf-8?B?M2hDOHgwemhTZ29tWkMrcDhrdndvMTZ4VWwwWDRXM0VRb0NCNi9pYTUxQ2xW?= =?utf-8?B?MElPK0dLL3AvNDNVNVdFcnd3bXdsRlIyOXd4aklmb1VSMW5pNUwyV0JKZXMy?= =?utf-8?B?OUxxT1JUa05lSUE4SWFsayt1QUhvMmN3ZE1BYmdNQUZHdHNOY3pyRkc4ajVN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YrQmhLTXBwelc4WEkvMEU4LzJUWVZp?= =?utf-8?B?cTErakFCbnFJR0Ruei91dGowdVErVXZ6RkdWMzJrNWZPV3JlcGpDa3dPTk1L?= =?utf-8?B?eVRiOUVLSmFCZis0VWtZZnJhNDdnckhIbDN5dTJBR1pqWTZ4d0JXWUtvTFhr?= =?utf-8?B?UStTZlk3a0NNd1h6QVJTeDcxYmhUS1M0QjJmREw3eWNBaFJhOUw5ZW00UlNL?= =?utf-8?B?dS9OS0UwY0FPbnZRMVF6ajFHZHlGdVJUNWdCWFVSMGoxMkk0cENnVjZDRUgy?= =?utf-8?B?dDdnOTNYUjJJNXBGUVlWUmQ4UFJ2Z0xIR3Yyd1RoV1pWWEhkWlVMYzFVNXZa?= =?utf-8?B?OVY5NjZ2ODdTK3lyYjFQVlM0UFFKYlk5K3NXeG5yazJUejRiSERWWVVVV0V1?= =?utf-8?B?YVMxenJzb2M1L3FENi9wZ3c3M0x4VUl5UFQvNXl2TVN2aFpFU2pxTit3PT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB5685.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWxVcmF3VnNZT2VBSVZORGV1QUhXSks5Um1xMFIxT29ib3N1L1RySStsUThF?= =?utf-8?B?TWNiS1FKa1FTWmlraWhFNDM0WmhZU2xhYzJvcWhsR1lkUXNWNmhuWlpsS1ly?= =?utf-8?B?Qkk3NkRCWkxlcysvRjVVWGdqTzdPUENMbVBScE5oVTFrR3VSM0wrdUx5dGp0?= =?utf-8?B?Q0VkQmd4VHhOVkFRbVFmYnRsYW1VclBVTnlTUG9EdU14Y0s2Y05WSmlvS3M1?= =?utf-8?B?YmFML0NGZHpJRlNFL3BT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?d0ZkNWZ5VGw2SlkrTzM1TlNvcDdsUTB4ZTgyZ3RvZVppRWsrVjV5ajd1Y1cz?= =?utf-8?Q?4Mi8=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cb35cd7-65a1-4eb6-601e-08dc62cc1ad2 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB5685.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2024 12:59:54.4206 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iPuy+/5XAhyCCUqu40EEp+IM/iQqRMqkJ+6BhvAiiEf+0N91B3W2rvw/C0U0VgxV X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7478 Am 22.04.24 um 14:33 schrieb Qiang Ma: > On Mon, 22 Apr 2024 11:40:26 +0200 > Christian König 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=2256537600M, BAR=256M >>> [ 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=2048M, BAR=256M >>> [ 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? 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 = numchan * chansize; >>> /* size in MB on si */ >>> - adev->gmc.mc_vram_size = RREG32(mmCONFIG_MEMSIZE) * >>> 1024ULL * 1024ULL; >>> - adev->gmc.real_vram_size = RREG32(mmCONFIG_MEMSIZE) * >>> 1024ULL * 1024ULL; >>> + tmp = 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 &= 0xffff; >>> + } >>> + adev->gmc.mc_vram_size = tmp * 1024ULL * 1024ULL; >>> + adev->gmc.real_vram_size = adev->gmc.mc_vram_size; >>> >>> if (!(adev->flags & AMD_IS_APU)) { >>> r = 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 = >>> 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 = numchan * chansize; >>> } >>> /* size in MB on si */ >>> - adev->gmc.mc_vram_size = RREG32(mmCONFIG_MEMSIZE) * >>> 1024ULL * 1024ULL; >>> - adev->gmc.real_vram_size = RREG32(mmCONFIG_MEMSIZE) * >>> 1024ULL * 1024ULL; >>> + tmp = 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 &= 0xffff; >>> + } >>> + adev->gmc.mc_vram_size = tmp * 1024ULL * 1024ULL; >>> + adev->gmc.real_vram_size = adev->gmc.mc_vram_size; >>> >>> if (!(adev->flags & AMD_IS_APU)) { >>> r = amdgpu_device_resize_fb_bar(adev); >>