From patchwork Thu Dec 22 18:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13080216 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 4FE4CC4167B for ; Thu, 22 Dec 2022 18:30:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F292B10E0C0; Thu, 22 Dec 2022 18:30:44 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2052.outbound.protection.outlook.com [40.107.244.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF7D610E55B; Thu, 22 Dec 2022 18:30:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=frerjaMUG6s9VP3xjbuhhqPGMTDWO5qA0V3uQ3Z7tFJt1q0YWz504dA58+90VgD/L/YZRb46hfWVTH2TlT6vRCAcHXKzkwCz4GhkGJUDoQNLKXJPbE+irXiLUKxUVV2LHPrbOvruWeYIydf4luvhgOdgkqbJ/6SieoA+z2slVgErbdRh3owQlm0fBnRTAdhTHy9gtPFgW4HAgKgI/GhIv8GCMN1Ll9F9RtmOYKPYn6fmFltqO8SR3grQ80+BtDX3YzVpL8CdtzIib3086ghGwqD2N8HKcwcXNr+2FJZSwVdgzy66rE5pbOWuMdhhLeflnETkB1gMcm8fz5oPGJJPCQ== 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=fq0e4oNG7njf83chmhbaJQI5EkdxF2YMq4q3F2jEOl8=; b=RNHW+XMIqhtTt6OAkFuYYtE9/dendYY69O28Xquu1TEquOh1uSEvQ6ezttztwYCwrwvi7p529r0HCc+VP8xGtglOa+D7LbgaRxH8zHrHO3ieI2xXq+YiEhDKhn9oGU+8VSQEinUY52v/vqec2SN/+t4Lz3zyZ99wOJmH/qiMX8yAjPmsFZYh6OlGYmnSwFvNVCR8YkOaSkkzr+aYLrSgormT4NlbSkJAZayHPs0YF4AB8oXmFIkzVsMfLGQBxdTgVQL/+U1PmBc5KXiV3seBxu2v3Mc1CNy1wBBFyvhZPjknTd5QiYrk9MOuKFBI97eDUUs8BtJ+oq44KVQAx4HthA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=fq0e4oNG7njf83chmhbaJQI5EkdxF2YMq4q3F2jEOl8=; b=4bOL74HnQm0A/DIZhUq11En6VsVVkpPd51C91CbvaaGhmq3lFv6rbHAoDjYWitCbgJ5rgcA1spz8P40C03zt0HToKGq193+8JkHiRz2BEO83JHcwARUUaUkoygBc8JFo6M8Wo51Z8NBSQe3eeuqeQUyin357Wv1g6xJQOgeMwRA= Received: from MW4PR03CA0121.namprd03.prod.outlook.com (2603:10b6:303:8c::6) by DS7PR12MB6005.namprd12.prod.outlook.com (2603:10b6:8:7c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Thu, 22 Dec 2022 18:30:37 +0000 Received: from CO1NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8c:cafe::52) by MW4PR03CA0121.outlook.office365.com (2603:10b6:303:8c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.12 via Frontend Transport; Thu, 22 Dec 2022 18:30:37 +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 CO1NAM11FT048.mail.protection.outlook.com (10.13.175.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5944.6 via Frontend Transport; Thu, 22 Dec 2022 18:30:37 +0000 Received: from AUS-LX-MLIMONCI.amd.com (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.2375.34; Thu, 22 Dec 2022 12:30:35 -0600 From: Mario Limonciello To: Javier Martinez Canillas , Alex Deucher , Ard Biesheuvel Subject: [PATCH 1/2] firmware: sysfb: Allow re-creating system framebuffer after init Date: Thu, 22 Dec 2022 12:30:10 -0600 Message-ID: <20221222183012.1046-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222183012.1046-1-mario.limonciello@amd.com> References: <20221222183012.1046-1-mario.limonciello@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: CO1NAM11FT048:EE_|DS7PR12MB6005:EE_ X-MS-Office365-Filtering-Correlation-Id: bc03415b-680c-4e48-9429-08dae44a9f0b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vr7gvCWJrfY0+6h1S8mXJpSBMhS/Drt9Xd5d178LrkUbfG0V7ZnpAC9Xl3Yyf/rq6OJKO4eCZbZT9HZI9KE6moMJt0eVeWPQAEI7FiYCLxi6xIAy5ogkhrFPM739bDYs/d0G5fVSukAFg4bd21dAiXL1GZ6gieFKvlOI0mmuSViBudJeqBWUoP9t2TlPWjcu9Fgv23BdNAgPHqCtNSckUTmc1KRoXu5ZZGm9Y4HdR7tpalxgZ04RCpqvaVGWQdy1gmvuUeKX7dWL2mwYWnN6vP5yYlGBM/aNtwLxwVJI4bWtPuue6cj1owdCJK2P4RrAWbRUb7HxlfdIVX/mb2LN7lQgWqr0km7pQL9NGgf6NhY1kKyE00UuThkfQOJD5umFDInjs+qB+Jwcmth873XWoBKAC86MXkjMWHJfcmjxNsrzpZHTFGN1F/HXKOQLF4FFSpMa/ivEkr4fLMGfHe1hXadZcP/d7/Fvq2nKWr5k/ebITHthtqyoC9SdDhgszGKJe0wYLOcvBeU+mwvjCzdrypq4ncP3cQ7N3U3LKJTFsqLIcoePlMOkTEUmYbQ8qPqE1wpIQY9PC/RB+3eloN22li+uaBSjhEMLs6Q9NjdcxGfXPKbEvRT1YW6YAVOSI9zdJ7oo/1GcZfvgHxsEjSluqfTOb4y8yrV2S0sf3clh9qo0VmnKQR6BOk8ixgcjhw7JQhFeJI5becfZLoM5mX4a7f06HE+ZSexf4MlSnSs2E14= 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:(13230022)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199015)(40470700004)(46966006)(36840700001)(6666004)(478600001)(66899015)(7696005)(70206006)(70586007)(316002)(40480700001)(2616005)(16526019)(26005)(186003)(110136005)(86362001)(54906003)(1076003)(8676002)(4326008)(2906002)(44832011)(81166007)(336012)(41300700001)(47076005)(83380400001)(426003)(5660300002)(356005)(82740400003)(36860700001)(82310400005)(8936002)(36756003)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2022 18:30:37.1833 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc03415b-680c-4e48-9429-08dae44a9f0b 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: CO1NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6005 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: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Carlos Soriano Sanchez , christian.koenig@amd.com, Mario Limonciello Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When GPU kernel drivers have failed to load for any reason the current experience is that the screen is frozen. This is because one of the first things that these drivers do is to call `sysfb_disable`. For end users this is quite jarring and hard to recover from. Allow drivers to request the framebuffer to be re-created for a failure cleanup. Signed-off-by: Mario Limonciello --- drivers/firmware/efi/sysfb_efi.c | 6 +++--- drivers/firmware/sysfb.c | 15 ++++++++++++++- drivers/firmware/sysfb_simplefb.c | 4 ++-- include/linux/sysfb.h | 5 +++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c index 7882d4b3f2be..a890cb6d44fa 100644 --- a/drivers/firmware/efi/sysfb_efi.c +++ b/drivers/firmware/efi/sysfb_efi.c @@ -185,7 +185,7 @@ static int __init efifb_set_system(const struct dmi_system_id *id) &efifb_dmi_list[enumid] \ } -static const struct dmi_system_id efifb_dmi_system_table[] __initconst = { +static const struct dmi_system_id efifb_dmi_system_table[] = { EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac4,1", M_I17), /* At least one of these two will be right; maybe both? */ EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac5,1", M_I20), @@ -235,7 +235,7 @@ static const struct dmi_system_id efifb_dmi_system_table[] __initconst = { * pitch). We simply swap width and height for these devices so that we can * correctly deal with some of them coming with multiple resolutions. */ -static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = { +static const struct dmi_system_id efifb_dmi_swap_width_height[] = { { /* * Lenovo MIIX310-10ICR, only some batches have the troublesome @@ -333,7 +333,7 @@ static const struct fwnode_operations efifb_fwnode_ops = { #ifdef CONFIG_EFI static struct fwnode_handle efifb_fwnode; -__init void sysfb_apply_efi_quirks(struct platform_device *pd) +void sysfb_apply_efi_quirks(struct platform_device *pd) { if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI || !(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS)) diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c index 3fd3563d962b..7f2254bd2071 100644 --- a/drivers/firmware/sysfb.c +++ b/drivers/firmware/sysfb.c @@ -69,7 +69,7 @@ void sysfb_disable(void) } EXPORT_SYMBOL_GPL(sysfb_disable); -static __init int sysfb_init(void) +static int sysfb_init(void) { struct screen_info *si = &screen_info; struct simplefb_platform_data mode; @@ -124,6 +124,19 @@ static __init int sysfb_init(void) mutex_unlock(&disable_lock); return ret; } +/** + * sysfb_enable() - re-enable the Generic System Framebuffers support + * + * This causes the system framebuffer initialization to be re-run. + * It is intended to be called by DRM drivers that failed probe for cleanup. + * + */ +int sysfb_enable(void) +{ + disabled = false; + return sysfb_init(); +} +EXPORT_SYMBOL_GPL(sysfb_enable); /* must execute after PCI subsystem for EFI quirks */ device_initcall(sysfb_init); diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c index a353e27f83f5..82735ff81191 100644 --- a/drivers/firmware/sysfb_simplefb.c +++ b/drivers/firmware/sysfb_simplefb.c @@ -24,7 +24,7 @@ static const char simplefb_resname[] = "BOOTFB"; static const struct simplefb_format formats[] = SIMPLEFB_FORMATS; /* try parsing screen_info into a simple-framebuffer mode struct */ -__init bool sysfb_parse_mode(const struct screen_info *si, +bool sysfb_parse_mode(const struct screen_info *si, struct simplefb_platform_data *mode) { const struct simplefb_format *f; @@ -57,7 +57,7 @@ __init bool sysfb_parse_mode(const struct screen_info *si, return false; } -__init struct platform_device *sysfb_create_simplefb(const struct screen_info *si, +struct platform_device *sysfb_create_simplefb(const struct screen_info *si, const struct simplefb_platform_data *mode) { struct platform_device *pd; diff --git a/include/linux/sysfb.h b/include/linux/sysfb.h index 8ba8b5be5567..14d447576e57 100644 --- a/include/linux/sysfb.h +++ b/include/linux/sysfb.h @@ -58,6 +58,7 @@ struct efifb_dmi_info { #ifdef CONFIG_SYSFB void sysfb_disable(void); +int sysfb_enable(void); #else /* CONFIG_SYSFB */ @@ -65,6 +66,10 @@ static inline void sysfb_disable(void) { } +static int sysfb_enable(void) +{ +} + #endif /* CONFIG_SYSFB */ #ifdef CONFIG_EFI From patchwork Thu Dec 22 18:30:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 13080217 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 8044DC3DA79 for ; Thu, 22 Dec 2022 18:30:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9562B10E55F; Thu, 22 Dec 2022 18:30:45 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2066.outbound.protection.outlook.com [40.107.92.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3589810E0C0; Thu, 22 Dec 2022 18:30:43 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3B+xO7DkzFna+c8+vqRoJ8EnpQIgWUOfHBE2P0EcnZ71L0lCLba+Sez/zU882r4wpDW38BeJ/lkEuWlnvZ/aRCbAL8Al+DTYzPWzr0mGeAsOy5u7BUAnEQsTsfpM/GO/FuvnVNZ2HaBFKNh1RbrauwCBCnNNArg5fi8llako/p3RSEo4bZqRcLVwqz58kjOEM9jwxPGkPL8CWQr5zeQ8slO6K1IKFpd84eBz49ljHkTq/gSVEuEtLkhuZ2FlmDumZ8xcKV7R5b3mmA1izAoh8pZ6gYSwpG91UTfWXpkyLDmkIBQDekAlgXzw7Q7pv3RpprnhId9kq311V0cuw/Lug== 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=cH1qMhRE9Ggw3CGUNYB4BLxIKgkwh2qMbD5kFyCG6YE=; b=GyLmvJE0PtJv1WGd08yC3W722JhCYSmMUo8eG1IyNx2w9Fm3FCnc9qrqR0I4RmVboDcchxVXi7jw7BMji7zd4hly3+a3NWEOUEhqX+BhjVlxqp97cVc3HWIuHJhiG/IiZDcBpE049RjIBBDFU7bi7WTmPoDq2W2tUEl32b0tNr6/iFyW+FZ0bLUgR6l4X3yOg7LDqYQNJtyZ8KXNiZcB8DBhR6oM6dO8al39YNX5WgSI1oJvNCjIA8JluXqc6V6l0hyJ6Gj96rsRT812MeWQpO4766HbIme0cD/nEgqlomXyuo4AFnFxbYr/gWHrRwV5pQrODzqb6wbXvDenoI5kuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com 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=cH1qMhRE9Ggw3CGUNYB4BLxIKgkwh2qMbD5kFyCG6YE=; b=y8uzRtQiCp1m6bMPrEJB+DZKtyNeqzsqDkONp8vKwd+FhV1ru0TotO8ck4Kq44fQ7OEvgfV6DVFmGjMm4HTMD1uK3iPzALV9W1vHKAoSPhSJW1nhEBl8nn0we3CCxuTfGTkW7gUJZjWv68qzISSGBJetAT7BuKzkZ6jKJQ2n5V4= Received: from MW4PR03CA0138.namprd03.prod.outlook.com (2603:10b6:303:8c::23) by SN7PR12MB7855.namprd12.prod.outlook.com (2603:10b6:806:343::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Thu, 22 Dec 2022 18:30:40 +0000 Received: from CO1NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8c:cafe::ff) by MW4PR03CA0138.outlook.office365.com (2603:10b6:303:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Thu, 22 Dec 2022 18:30:40 +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 CO1NAM11FT012.mail.protection.outlook.com (10.13.175.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5944.13 via Frontend Transport; Thu, 22 Dec 2022 18:30:38 +0000 Received: from AUS-LX-MLIMONCI.amd.com (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.2375.34; Thu, 22 Dec 2022 12:30:37 -0600 From: Mario Limonciello To: Javier Martinez Canillas , Alex Deucher , Subject: [PATCH 2/2] drm/amd: Re-create firmware framebuffer on failure to probe Date: Thu, 22 Dec 2022 12:30:11 -0600 Message-ID: <20221222183012.1046-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221222183012.1046-1-mario.limonciello@amd.com> References: <20221222183012.1046-1-mario.limonciello@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: CO1NAM11FT012:EE_|SN7PR12MB7855:EE_ X-MS-Office365-Filtering-Correlation-Id: 63a68fb0-c963-42f2-4c2d-08dae44aa012 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E59BtYrQGV8TTFTzJlKDAa1WE/fhHNkvclmh+FshUfYsBJKlfVQE7c2MvDZAREf06WRz0mCMqDIv8jfD9DP7qlGewy0zEvdZ/cfY/xD4TMAF7QbV80Fss8VW2Kl9kWfoDs7DC8z9BnMOq986cZUdTPbAnUXy1HfxNSO6UidT7m2n/ySfDgNMmcuMj7e8wTSYmm4SRbN4yaO/7jGneC/CMM+tPMoLmixxF4lYkDORgkb6+iUY6OEpPNvYPeTecGtQLlRtxjHAALaQ7w/ESV15KEjIc0mo+hZdjMzZfojySmOh36Q8Rr8Ao/7IVMif2AkTbwI2U70Lpc5yZMflTHTnIO/sjBYJw5YmnQU2KzXDv/zMo0aK4qhzMrku0fgV/WTs9VNtgxVSzoiasSVDjRBdBGElDv2sQhuvzbE9nv6ayAfp3RKf+fC+Ie9kF6qNux/T+XGqjA6csSxW6vq848BdHvaS3z89JNPQ23VCOTWTctUQk/dQPRB/5CE+la0DBhXNcl4MeLCCkS0lkwvZ4lSonhrKAyHLM1zke8CBAABquE35Q7Nu/4EOvL89ZKjppDzdVrEBXVfFvB4zf7O2n+vDjWRkO09vght62+UdyZPLbNJ4k9koGMGvEhb+sijEu4+iMpYbXBIwmGtnMKOqZBbRaogwd3lA0iPdsY1OB5HY7AFQIMTXfybzJG5mYENFriIn4rdMILu5nYmbRhR1gBzuw2TRNxW1BtIUDwt7D2KOtp4= 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:(13230022)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199015)(36840700001)(40470700004)(46966006)(478600001)(26005)(41300700001)(54906003)(8936002)(36756003)(6666004)(110136005)(7696005)(336012)(70206006)(70586007)(16526019)(186003)(8676002)(82740400003)(5660300002)(4326008)(40460700003)(2906002)(81166007)(36860700001)(1076003)(44832011)(82310400005)(356005)(47076005)(2616005)(426003)(86362001)(40480700001)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2022 18:30:38.8894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63a68fb0-c963-42f2-4c2d-08dae44aa012 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: CO1NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7855 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: "Pan, Xinhui" , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Carlos Soriano Sanchez , christian.koenig@amd.com, Mario Limonciello Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" If the probe sequence fails then the user is stuck with a frozen screen and can only really recover via SSH or by rebooting and applying nomodeset to the kernel command line. This is particularly problematic as newer GPUs are introduced because distributions may take some time to land newer GPU firmware. So when probe fails, re-create the system framebuffer so that the user at least has basic graphics support. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index bf2d50c8c92a..8961c62ab29b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "amdgpu.h" #include "amdgpu_irq.h" @@ -2187,6 +2188,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, err_pci: pci_disable_device(pdev); + sysfb_enable(); return ret; }