From patchwork Fri Sep 8 14:55:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hamza Mahfooz X-Patchwork-Id: 13377574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EABB6EE8012 for ; Fri, 8 Sep 2023 14:56:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 261A610E0E2; Fri, 8 Sep 2023 14:56:09 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2068.outbound.protection.outlook.com [40.107.92.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7D0010E0E2; Fri, 8 Sep 2023 14:56:07 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=caVQBHHWNxPm/JXt3VxzaBt3t7BNSgFBNpB+neHIvuPpcm3bCAEa2kJVTtxVZVehQyaQ065NH8CbknFzlbU8NAVVnCv56eOJylLDTxCcqhxS6BvFLYkB4eQGmPHZ48hK2diBRLSLMYdtQR0UkLWcuO2BbWOI00qhOHmZcK1bLG/orkoVY6x2REHb1eb4/smLJf3vMXkXNl7SF/QXhBUXpYmGaZdbFW/v6GLF3eaYTtq+k+XVkBW2Mx3GhpDBTMWQq/GaZIS34hDBp1+ItkunDNx6gWPEfVBHp6C2tE7/X8vXcAwARlEGjrMJBSiPrTDXaPAoFj2WnfYqUKyvQW9nWA== 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=kYosKuGwEHSV0ARvvNJr9fo0tUJ2iy2V6hiPHh1ZbCk=; b=VzlktNn619nPxV75sn5HOsNwF0JhlVVH8m7tdAvGzqkhaQg8hBGp/B0Vdd1XjV8vXPtdZiqPg2HG4YpqVo7oMp1N8Ue6dapeJQ3OPKqdn4936oo+olCgzb7kEHzQGhKDztknrJHEBsaDerEg79vG6DhRhaK3ElRcoXxLRbrBsyFH8rIg/HeFujEvd3s9DkQxiiVHFw6AYpknp/ZH7cIya6J6c+MoMWaGS1QzyZ+znpnuHgNqQeHJR+qfFhnn531rxoTACoCjav3vdwLzkFD6evKFStEmI7x7ngW6K6BKxI4punxCl4VFH7mIBlPlf+v0EbWArSDGhRaDABQgAMcpzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=kYosKuGwEHSV0ARvvNJr9fo0tUJ2iy2V6hiPHh1ZbCk=; b=KZ1Qzm4JVsms2yyL6FqAgaIZBaxujR+1HY4N1iaPAbrjkUpmxMS3L1CasBANJB3qQLXD743Skj7bthCysXGsVp30KOfs4tG5omoUHxb3GREzxvG2PohMtVd/GWW6z70Lh7NOtiqrlLlzPySIs18TmRH9VfgAW1+M5sHTGeXG3X8= Received: from DM6PR03CA0069.namprd03.prod.outlook.com (2603:10b6:5:100::46) by DS7PR12MB5743.namprd12.prod.outlook.com (2603:10b6:8:72::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.18; Fri, 8 Sep 2023 14:55:59 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:5:100:cafe::84) by DM6PR03CA0069.outlook.office365.com (2603:10b6:5:100::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34 via Frontend Transport; Fri, 8 Sep 2023 14:55:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.11 via Frontend Transport; Fri, 8 Sep 2023 14:55:59 +0000 Received: from hamza-pc.localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Sep 2023 09:55:53 -0500 From: Hamza Mahfooz To: Subject: [PATCH v2 1/2] drm/amd/display: fix the white screen issue when >= 64GB DRAM Date: Fri, 8 Sep 2023 10:55:12 -0400 Message-ID: <20230908145521.39044-1-hamza.mahfooz@amd.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|DS7PR12MB5743:EE_ X-MS-Office365-Filtering-Correlation-Id: 8dba505b-2e6b-44bb-6858-08dbb07bb6a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SMG0lj8Nx9+bP/neHfmkH+7uFVRmUDA8bXfM0KHX6hY4XKwRtpI2j8PglBHxt1jNOZ4H7FiADr3oHg5q+qwrgiDSvs1nS5yFuload7QK8F80esicmdH3Re6hNpXMBKuXTfmaN4KhBZIL8C776e55vxWdTAfZh4Df3DbhT+J2h5b8Bd0In3OhqCdOdtjK8qiAbvJgVF+M77nLqF7J1StpF8j6iSWZGr1rlPKEPQK77Foe8+Rknd/ztyIKlMy3UiD6F2oBzTAnoEV6XYF5L2ylDAA9gMT0WfD8RTA9QoZ/OewHIzvSCyEMLRvFzjnNMZ90lF1gU/kNxE+7y+95X4bat4xXARsx0wUXvX4Ui+iFArzQBIattQ8owaw5C+DIfRt6Wt6dluGQl89XIprSL+ishMeTAxdHtFZPw6iuOlQiX+KMfrvulFtSHuCTwQeBwUAk4XiVqeAsf7Tw9QI5ZLQjQd29yEmw0KJNul1Eum89NA1kJa1lTFMsrmnZo4c8vYSYHIJjdR4hUxjHhNG+sumQBeXY2aOgxRkc8RdjXgCyEWeLiuI7HUhJGMZ/J5Yi55puwcFZwUHPldfuw090w0T34qegHvuKVlrPH+meci4lUuTobZY5rO00rBy8Z8YaqFENoKswBEuLF4GhJajknJmil+jIpNWxJdxTuPMqcWH2h/vU1QMGgRit1In+KvSj8bQ+NXVpgTxMKQ+likW3VNRO3VjY32dS2LDQCrV+pXemV9uz72lnvi74IIBMTf1hJrdRal1a3DtNaJpM1VFl84Wv+6wJ2DT0gay/xXxU2WEO1ro= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199024)(186009)(82310400011)(1800799009)(40470700004)(36840700001)(46966006)(356005)(36756003)(36860700001)(40480700001)(40460700003)(1076003)(8676002)(83380400001)(4326008)(8936002)(5660300002)(6666004)(44832011)(2616005)(336012)(16526019)(478600001)(86362001)(426003)(41300700001)(26005)(47076005)(81166007)(966005)(2906002)(82740400003)(70586007)(54906003)(316002)(6916009)(70206006)(16060500005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2023 14:55:59.4297 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dba505b-2e6b-44bb-6858-08dbb07bb6a9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5743 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Liu , Lijo Lazar , dri-devel@lists.freedesktop.org, Mario Limonciello , Shashank Sharma , Rodrigo Siqueira , Aurabindo Pillai , Qingqing Zhuo , Stylon Wang , Victor Zhao , Srinivasan Shanmugam , Leo Li , Le Ma , Hersen Wu , Yifan Zhang , Felix Kuehling , "Pan, Xinhui" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Hawking Zhang , Wayne Lin , Alex Deucher , Candice Li , Lang Yu , =?utf-8?q?Christian_K=C3=B6nig?= , Luben Tuikov , Hamza Mahfooz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Yifan Zhang Dropping bit 31:4 of page table base is wrong, it makes page table base points to wrong address if phys addr is beyond 64GB; dropping page_table_start/end bit 31:4 is unnecessary since dcn20_vmid_setup will do that. Also, while we are at it, cleanup the assignments using upper_32_bits()/lower_32_bits() and AMDGPU_GPU_PAGE_SHIFT. Cc: stable@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2354 Fixes: 81d0bcf99009 ("drm/amdgpu: make display pinning more flexible (v2)") Signed-off-by: Yifan Zhang Signed-off-by: Hamza Mahfooz Reviewed-by: Alex Deucher Reviewed-by: Christian König for the series --- v2: use upper_32_bits()/lower_32_bits() and AMDGPU_GPU_PAGE_SHIFT --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 1bb1a394f55f..5f14cd9391ca 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1283,11 +1283,15 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_ pt_base = amdgpu_gmc_pd_addr(adev->gart.bo); - page_table_start.high_part = (u32)(adev->gmc.gart_start >> 44) & 0xF; - page_table_start.low_part = (u32)(adev->gmc.gart_start >> 12); - page_table_end.high_part = (u32)(adev->gmc.gart_end >> 44) & 0xF; - page_table_end.low_part = (u32)(adev->gmc.gart_end >> 12); - page_table_base.high_part = upper_32_bits(pt_base) & 0xF; + page_table_start.high_part = upper_32_bits(adev->gmc.gart_start >> + AMDGPU_GPU_PAGE_SHIFT); + page_table_start.low_part = lower_32_bits(adev->gmc.gart_start >> + AMDGPU_GPU_PAGE_SHIFT); + page_table_end.high_part = upper_32_bits(adev->gmc.gart_end >> + AMDGPU_GPU_PAGE_SHIFT); + page_table_end.low_part = lower_32_bits(adev->gmc.gart_end >> + AMDGPU_GPU_PAGE_SHIFT); + page_table_base.high_part = upper_32_bits(pt_base); page_table_base.low_part = lower_32_bits(pt_base); pa_config->system_aperture.start_addr = (uint64_t)logical_addr_low << 18; From patchwork Fri Sep 8 14:55:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hamza Mahfooz X-Patchwork-Id: 13377575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65FCFEE800C for ; Fri, 8 Sep 2023 14:56:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FE8110E8E1; Fri, 8 Sep 2023 14:56:09 +0000 (UTC) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2060.outbound.protection.outlook.com [40.107.243.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBE2E10E8E1; Fri, 8 Sep 2023 14:56:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EHML0CRuVcQ2kUvigH4LUSLZa2SPpJj9NLNKsmiHPAAz45Ub8ShTFxeKAOjeup/OPqgEDP0LfNRRcoZR0ro5/409qFNWjtDYiQ2vOqqfLmR1g6+S09EZvkE2r5N5J1QxKTK+pwaPT9/5Ddwzm40QEOHDUaj2OSvQKRngphgAn7gv9s14JEsJtSZzQ1F6n90RsjX3btnHcZ41N+mzh73wimSiZfbh0f4UIo86ehED0PHTOWKnNN2IlSmMZWNao4CRAdSTOuovxEhMnNWbQSicBOOYcD03OpL/0dGLCVoZsGToPSURUiCGfb2RbcDJCaQcsJFMSWnyGeb7Kp/AqR/a3Q== 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=pmzntxb0gHbuT/oLSNvz/e8QfagEgsSkgHFMfu5wYR0=; b=NwGasClcKUUuKRTO31RINOwwpyYM0L4FwBnJ9CSIMmkBVmoKrxdOpelwTlxnPO1rLD+zS0ohWxUykWPmnIaL9H3NV9FT+I7IEkveEHyAMvOa5hcyv4tDNp5k/PBG9mHGCjLmH+LugmhTgqElmv+AdHiy/UeM3n1iviIna1A1WAUiMionvgY51RGoLUB/WCdLcPIVpJ5dqb7uMO2+114nIKMP56obhOdhhdLCctEzbll3Xw/x3tTyBZyVyidGAgfsazWPkzmMW1yd8zb8qU1udWf6HY75MOUXfU27UivY3cgEkQtETfdmZLfEDBgVLSdDnh7b6WgJGFsnJHBhS8pVww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=pmzntxb0gHbuT/oLSNvz/e8QfagEgsSkgHFMfu5wYR0=; b=Y8Z7DFnKxklhVrfvtfioqUZe5G6A7bCO+izeTvwuPjz7ri0L9X37gAxMQMFLtdEjdM+zgKOgsAmEpBuJPhDAj6hP1LRosPMaYVie29QddXh+2V/A9C77v7GpzNmkjKKtCpWB9MOLZAGM1AFhGANr2+z+nv4y8Hff7EWjTXfjuQE= Received: from DS7PR03CA0196.namprd03.prod.outlook.com (2603:10b6:5:3b6::21) by CYXPR12MB9441.namprd12.prod.outlook.com (2603:10b6:930:dc::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Fri, 8 Sep 2023 14:56:01 +0000 Received: from DS1PEPF00017091.namprd03.prod.outlook.com (2603:10b6:5:3b6:cafe::39) by DS7PR03CA0196.outlook.office365.com (2603:10b6:5:3b6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30 via Frontend Transport; Fri, 8 Sep 2023 14:56:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF00017091.mail.protection.outlook.com (10.167.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.11 via Frontend Transport; Fri, 8 Sep 2023 14:56:01 +0000 Received: from hamza-pc.localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Sep 2023 09:55:59 -0500 From: Hamza Mahfooz To: Subject: [PATCH v2 2/2] Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory" Date: Fri, 8 Sep 2023 10:55:13 -0400 Message-ID: <20230908145521.39044-2-hamza.mahfooz@amd.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230908145521.39044-1-hamza.mahfooz@amd.com> References: <20230908145521.39044-1-hamza.mahfooz@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017091:EE_|CYXPR12MB9441:EE_ X-MS-Office365-Filtering-Correlation-Id: fe5c4660-dff2-4ce7-02fe-08dbb07bb805 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6pNHeDspQ41NgkyUo3TWEiAKGXD1M4XmftxXSI5FXYtGQDjrq36jJRyhGswa1WRGTfflVcys0D7YVNX6elgv6mXLM6kFnrmYU2GKcLTtB+9RQse6AWr0q6eBiifKZvIyP60SFSfpvnuG1O5UXioGjjfTm4L/bwS4Ys2+5+uR8qTR8cBVis9BPMsoorRq9r5+nIBrPWzZSNtZdIfWhMNQNUincd/0o5KWNYzxrz7Ooz5ld9sBIN2CNLAZ06Z2fdo7LE8xmVE8D49O/yxo9u24V+yeTKVlh5x8lhkaZBLIKTP9H2o8XPJlv1M7vzynppvFhnXqDEkt0xw2fWz+5J1UhZsprNpOOb1N16iFtmXlZSHqseDMJ1r2yQYReIOxZm4G376/XbbsFrfYMskkGwUoP51QYHsTRoFRPj/fZDmcvq6K01HlUsKSq429yYVoTx4lCAC0dc0xxvTPW12rwsC3tmVZszSj0rFH0XQVYWgQZYWIJhcURFG9aeL2/7MD19Dog11hiZgWht60Ckz3Y7NcIXeQ0tvCP8sDhbLvi/8/PWxV4QQuYCt9P1BdETw5WIoi0Bu38mJqpG1QwLkx2QOea5NM/9io6HsOoRQPKaOAOoBrTYwbEBRpUkbUsmqbqgVOJIUzUoTmrHIaeT9QWUhkAP+8/zHEMN2dkkturvWiGcW39rdSv7Bk5VhmW35N/NCGdXKj92qQlqf01nXRYtT0Zr8SBS86U7pzPAtOkQxXBE66gBGPu/JGhqwSBhx1IIJxCKnAjGDhU5uq2XXtvZfa4QXgrPRP9pOl3qnUzuru7+8jNMPcAxaLi6FP96S6pzhMfyQDkYEt4cFjkW+qGo9EGA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(376002)(396003)(39860400002)(186009)(1800799009)(82310400011)(451199024)(46966006)(36840700001)(40470700004)(6666004)(966005)(83380400001)(478600001)(26005)(2616005)(1076003)(426003)(336012)(16526019)(41300700001)(2906002)(4326008)(6916009)(54906003)(44832011)(316002)(70206006)(5660300002)(8676002)(70586007)(8936002)(86362001)(82740400003)(40460700003)(47076005)(40480700001)(36860700001)(36756003)(81166007)(356005)(36900700001)(16060500005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2023 14:56:01.7078 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe5c4660-dff2-4ce7-02fe-08dbb07bb805 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017091.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9441 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Liu , Lijo Lazar , dri-devel@lists.freedesktop.org, Mario Limonciello , Shashank Sharma , Rodrigo Siqueira , Aurabindo Pillai , Stylon Wang , Victor Zhao , Srinivasan Shanmugam , Leo Li , Le Ma , Hersen Wu , Qingqing Zhuo , "Pan, Xinhui" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Hawking Zhang , Wayne Lin , Alex Deucher , Candice Li , Lang Yu , =?utf-8?q?Chris?= =?utf-8?q?tian_K=C3=B6nig?= , Luben Tuikov , Hamza Mahfooz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This reverts commit 5b7a256c982636ebc4f16b708b40ff56d33c8a86. Since, we now have an actual fix for this issue, we can get rid of this workaround as it can cause pin failures if enough VRAM isn't carved out by the BIOS. Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Hamza Mahfooz Acked-by: Harry Wentland --- v2: new to the series --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 ------------------- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++-- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 83a9607a87b8..3a86d11d1605 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1316,7 +1316,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, void amdgpu_device_pci_config_reset(struct amdgpu_device *adev); int amdgpu_device_pci_reset(struct amdgpu_device *adev); bool amdgpu_device_need_post(struct amdgpu_device *adev); -bool amdgpu_sg_display_supported(struct amdgpu_device *adev); bool amdgpu_device_pcie_dynamic_switching_supported(void); bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev); bool amdgpu_device_aspm_support_quirk(void); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 5f32e8d4f3d3..3d540b0cf0e1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1358,32 +1358,6 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev) return true; } -/* - * On APUs with >= 64GB white flickering has been observed w/ SG enabled. - * Disable S/G on such systems until we have a proper fix. - * https://gitlab.freedesktop.org/drm/amd/-/issues/2354 - * https://gitlab.freedesktop.org/drm/amd/-/issues/2735 - */ -bool amdgpu_sg_display_supported(struct amdgpu_device *adev) -{ - switch (amdgpu_sg_display) { - case -1: - break; - case 0: - return false; - case 1: - return true; - default: - return false; - } - if ((totalram_pages() << (PAGE_SHIFT - 10)) + - (adev->gmc.real_vram_size / 1024) >= 64000000) { - DRM_WARN("Disabling S/G due to >=64GB RAM\n"); - return false; - } - return true; -} - /* * Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic * speed switching. Until we have confirmation from Intel that a specific host diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 5f14cd9391ca..740a6fcafe4c 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1654,8 +1654,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) } break; } - if (init_data.flags.gpu_vm_support) - init_data.flags.gpu_vm_support = amdgpu_sg_display_supported(adev); + if (init_data.flags.gpu_vm_support && + (amdgpu_sg_display == 0)) + init_data.flags.gpu_vm_support = false; if (init_data.flags.gpu_vm_support) adev->mode_info.gpu_vm_support = true;