From patchwork Thu Dec 8 01:09:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 632926 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DACCC4708E for ; Thu, 8 Dec 2022 01:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbiLHBJf (ORCPT ); Wed, 7 Dec 2022 20:09:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiLHBJa (ORCPT ); Wed, 7 Dec 2022 20:09:30 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55DC38B1AA for ; Wed, 7 Dec 2022 17:09:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oJWS/LWJGmjo4Xid+fuhVvYCOULNB0jvmNN1CPtvVpHdkgmDYfXWazUn9HZfiwFflXjA10ApOPiS9gf3Ajg/yrvVD/ewyUUxbj6NCpBR0HjDb2JadpLVSsqNOdxDr8YPDHybJYB6BtUxHACtz/xVH4CPNKL+ZwZBGd7VpQcEyIVODRmJvDcCyxf//9R47bO5KhO0JuJUH1hrXIG8J4F7DMGS+NeQnR20BLq8qX1YAxtQrJxJNBJK4L8xDdrYaB51oYnhjgYrBL2ePxp9sjEwsCiHfIeD4bxRCnwfZFgFN6KWj1ScurL+xUF6uBYbgb24C1thkXvePkgTMNa5Sd9S3w== 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=kDtid1ojx/lvZjBL2U+cgdTDrZrmuycQc30fbkxqeqE=; b=n97jhyAujooBvLG0dFGaDB8uy73RMzCzHf0c38ipK77V4I0ciovhXmpDHyizyVRWbyqfXJ0dWEdnGFvhW9RkgN2xZgwVm+ECsVqtWEa11dLfJovMQ6mIQ095m4nNmdyU3HAaoV94kw85YeUILd0yj2YVvP3PoNhoRob9OqwKqaguhGV+J0LLGx6e0JDvpkoV7GFQfiHJJx7mqo/LjJ9P39UXiAA42COUzQNEEiutVEK8+FHwi6P5bnfhJNente+OF/Z69NBklIqjpyY7t8LmSwMHaq77xVwZN9uDTEkVXTRIYjfGe+ld1mDljaiet0z3ytrqc1ELVkKUqbxxTZs1KQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=kDtid1ojx/lvZjBL2U+cgdTDrZrmuycQc30fbkxqeqE=; b=os8NSjt/mIseWJrdfaM4kJByyxhe3OsmAa/82iRs27KA0TGjOMVtTiwkjJOQufRgisXYgHChwnqsTJus7x/LpCL9RCk9wPsXNlv4rLnslt9ctuICmZrRIOdBhFQraFwf8Poa1Iw4ISskeJ3wM0YL9re2PWvXHXGwKgj74lOofvw= Received: from MW4PR02CA0026.namprd02.prod.outlook.com (2603:10b6:303:16d::25) by DS0PR12MB7534.namprd12.prod.outlook.com (2603:10b6:8:139::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Thu, 8 Dec 2022 01:09:25 +0000 Received: from CO1NAM11FT109.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::ef) by MW4PR02CA0026.outlook.office365.com (2603:10b6:303:16d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14 via Frontend Transport; Thu, 8 Dec 2022 01:09:25 +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 CO1NAM11FT109.mail.protection.outlook.com (10.13.174.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5901.15 via Frontend Transport; Thu, 8 Dec 2022 01:09:24 +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; Wed, 7 Dec 2022 19:09:23 -0600 From: Mario Limonciello To: "Rafael J . Wysocki" , Alexander Deucher , Hans de Goede CC: , , "Daniel Dadap" , Mario Limonciello Subject: [PATCH v2 1/3] ACPI: video: Allow GPU drivers to report no panels Date: Wed, 7 Dec 2022 19:09:08 -0600 Message-ID: <20221208010910.7621-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221208010910.7621-1-mario.limonciello@amd.com> References: <20221208010910.7621-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT109:EE_|DS0PR12MB7534:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ec2b907-7328-472f-b5e5-08dad8b8d91c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XcDlowsx/MbR5fIBQ9Mo3CvgMS7CustTKPTaaaoF9B4GADqyouYMcT4ltq5Biku2zHVluc0L0AIvTUem72CLP7Q0gnfJLtg1tKE/hNv13hD9aDKCnVAPHYE2THWkfKgBueVVJNPt5HWiI2eL6kTVQuJXQL+Bqmrh+vK4VeS7PkUqOolfLNiqBRoebG5z6BtNpTJ0H3i0Ln7s1csouZEziY4vitpCkqUsksHn4btEMp3b+AAEhOcX1vAdHFTeLgzTIz/w3yYvqYyJZlCUnNQJgSNOxLW/zh08z711A+fPfY+Mz7qsqAYa7P4lH970aEbg559uLvCOWPP0Ehq497OamzbVroX3LcIP0HB7fLPy78HQshQJ8zu5YhY9/pxm0U3KmxwFVPYD21Bv+flmzPxu4keLZN1OZbHB43NfyroE6pPV0MokElWNl/kpohLrghRMHr0IIagB0fBrEr+LGyTNF0tYy65+4kp9DCPwcg2lGMO9n5Pvelw37UloHw3E/iqVsPa9YsetzYUbUz4YRDqA3ju0C8WE7/pyL/JDaitra4EmRRnuea6Qd5HbPn4xzULitmqFbsb4xQpJBOkQhvwP5x6arPLltlZ50mLam4AzjSGy+LQd5KNrfj53EeoNPKZjwVcecjt/0bEutmfkniMPU7n16lp5D0LotLEFhO4bJmtKzZJyD1E+VM9XQrp7F35q4+S0Esc8SqUIMCh2XR4S0gZCBYKcHp35EjnxLyfET2w= 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)(376002)(39860400002)(346002)(396003)(451199015)(40470700004)(36840700001)(46966006)(36860700001)(83380400001)(86362001)(5660300002)(356005)(81166007)(4326008)(44832011)(41300700001)(8936002)(40460700003)(2906002)(82740400003)(70206006)(40480700001)(8676002)(336012)(6666004)(26005)(7696005)(186003)(426003)(1076003)(47076005)(82310400005)(16526019)(2616005)(54906003)(70586007)(478600001)(110136005)(316002)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2022 01:09:24.8372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ec2b907-7328-472f-b5e5-08dad8b8d91c 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: CO1NAM11FT109.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7534 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The current logic for the ACPI backlight detection will create a backlight device if no native or vendor drivers have created 8 seconds after the system has booted if the ACPI tables included backlight control methods. If the GPU drivers have loaded, they may be able to report whether any LCD panels were found. Allow using this information to factor in whether to enable the fallback logic for making an acpi_video0 backlight device. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- v1->v2: * Cancel registration for backlight device instead (Hans) * drop desktop check (Dan) drivers/acpi/acpi_video.c | 11 +++++++++++ include/acpi/video.h | 1 + 2 files changed, 12 insertions(+) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index 32953646caeb..f64fdb029090 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -2178,6 +2178,17 @@ static bool should_check_lcd_flag(void) return false; } +/* + * At least one graphics driver has reported that no LCD is connected + * via the native interface. cancel the registration for fallback acpi_video0. + * If another driver still deems this necessary, it can explicitly register it. + */ +void acpi_video_report_nolcd(void) +{ + cancel_delayed_work(&video_bus_register_backlight_work); +} +EXPORT_SYMBOL(acpi_video_report_nolcd); + int acpi_video_register(void) { int ret = 0; diff --git a/include/acpi/video.h b/include/acpi/video.h index a275c35e5249..1fccb111c197 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -53,6 +53,7 @@ enum acpi_backlight_type { }; #if IS_ENABLED(CONFIG_ACPI_VIDEO) +extern void acpi_video_report_nolcd(void); extern int acpi_video_register(void); extern void acpi_video_unregister(void); extern void acpi_video_register_backlight(void); From patchwork Thu Dec 8 01:09:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 632925 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D880C63703 for ; Thu, 8 Dec 2022 01:09:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229601AbiLHBJr (ORCPT ); Wed, 7 Dec 2022 20:09:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiLHBJp (ORCPT ); Wed, 7 Dec 2022 20:09:45 -0500 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2071.outbound.protection.outlook.com [40.107.92.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6609F8B383 for ; Wed, 7 Dec 2022 17:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMepFltpRHcdEjIe0bd4YyEhM07sfJmA6FZtqLhUbQv570DY8Sz/Y5ryNu5DIk6BF9EzARjoaBnGmK4Qxs/aHyfw9bnwXnnYXSItvSJ6kX1hSidiPRT2OXdsCXyj9ePG7ft2fqY2X3NhVPeBEzoJ1najsqUKXDo9CC4cQ6mt9Eh8h0FjMgnCVp1o92ECrQZbWPbJRmK7fWZ/ElPrMea+VIAMcPKe3NtZMdK6dlKHSXRkCdJW/46+ZEFIYdzAIR57jzAh+gLrBT5i7JOcUg/+L2Fq0ooxGe262oCAaGTaDZ0Kva2PrqrEsl5ne7efsA1xZ2PTaXKv1BdgVNDoY6gPPA== 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=1y3Dug+Vf3qRWQgKngqx3hIKZWxmrS9IvLJ4th8FhAI=; b=NMPsiLpoLZt1jGUPp+DIxPVl4zB0BtZrBxg2TF+lJSgzWwlVonfIvm5gB+KMuO/B3HbBNWtPpjTkYYPl0s8R7bAjuzu1ofyIvzvHx/t15T2PEL8iN+cXBM9jG3t4SKTNtGe6CPxBIDA/YOFwalsruLncw/dGwHpcd57i+Q4awmwL1lK67EAfX1fiy8I1x+skZn8cAoWU+z5T+iAMh1SUJXrtVt646aNV1KnT4RgS4JK0voYmkQsHLlb44Z16sXJ6FQM9UyDQr+HtX/aD1c7bOkYwSRNorcr2vN6xuyMo5tGZnUos4tvh8CrYpgS2TWvSRp1BxvSf48N2Y6Yj6xUoWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=1y3Dug+Vf3qRWQgKngqx3hIKZWxmrS9IvLJ4th8FhAI=; b=qb6wN0alITFZwKNv+xzOiM2YDOKS9Lo4zFOw3zE8I3RiE2nmTV0YAe1g06gVfRXorlb/c5OWMlooRc/me0AqyHpBAwphz8D/jrHIErQg60fBl4ihp76ZzR9ft9WBBbKi5BIjLhVE7a9GyoxBGb09KnMMOO7RQ2lfw5F3tFq6NIA= Received: from MW4PR02CA0024.namprd02.prod.outlook.com (2603:10b6:303:16d::9) by DM4PR12MB6325.namprd12.prod.outlook.com (2603:10b6:8:a4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Thu, 8 Dec 2022 01:09:41 +0000 Received: from CO1NAM11FT109.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::f6) by MW4PR02CA0024.outlook.office365.com (2603:10b6:303:16d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14 via Frontend Transport; Thu, 8 Dec 2022 01:09:41 +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 CO1NAM11FT109.mail.protection.outlook.com (10.13.174.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5901.15 via Frontend Transport; Thu, 8 Dec 2022 01:09:40 +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; Wed, 7 Dec 2022 19:09:24 -0600 From: Mario Limonciello To: "Rafael J . Wysocki" , Alexander Deucher , Hans de Goede CC: , , "Daniel Dadap" , Mario Limonciello Subject: [PATCH v2 2/3] drm/amd/display: Report to ACPI video if no panels were found Date: Wed, 7 Dec 2022 19:09:09 -0600 Message-ID: <20221208010910.7621-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221208010910.7621-1-mario.limonciello@amd.com> References: <20221208010910.7621-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT109:EE_|DM4PR12MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: 50aa6e6c-ef64-4f8f-624c-08dad8b8e276 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zdKfOP2HDi03WGXXTSF2hRmrpMASlpAeBEARaRbkcS2ew6CUITUG4Ed8umi5vJDHpqEDtUKBjt+9nlpmGm+bUJO1qR66O9qc0z8gD2IdKDwFc1AHB/V8sIRMdqvOEt94cMjbtJ+B+JAPpVdoCunh0ZXCxhzwMet8zNoDAiQc/1i629rlyuNo4RVPCKDuLeGH3kF3xCpjlIU/t4KknXXr3SfM3+VhNbV8EJ5p1VsypxKFexGNNHXUy4lH2O7AB/mWMT/GZNlqDKj9hcy2XCLegKgcL1d3Zs6vseJ/xIiCfgdZdA7Zq+ni81PI2WePoi5jR/wXieVauCnIdkNQt37OQLyTGT1VVSHmYNb+98cCnn7MsM06/AGa5V/CbzVuoy57SoqscGcXAiwQvMnbhcBPwHzfhtAK8jfjQdFbZv/pBgCJiphnZaJ7wFAMZuMVVwbX/DV6ZvJU3LS6YoLj/L5j1KPdalpX4LHZ1HuG0Pia306wZRwyOlXr/gVFBDHIEa0HnmPhmz35pMc1El+eOn8yJP5BpgMkj5WwCeDuGS5R4YKhvCkxT9ePEweT+a/ZV4kvmGtCv8CySuQQ+lPs6ZaXUxQL3Rs8tbrYHm8q6i5gXOAHGSNMaloa/qL4vXWLPJbWN7u/jUjmj8jKukNq+hc73dw3TYYhgNK2N4yqeY4wrE8AV5OaO0o9KzyXYy41IKnwZzmWJNRBwzITVIwNsfaeUuU2sY8DAG/t2KtT2a6BM3g8eXxQMDbgNvSKxcRvLi9W1YBcp3bbE7oHGK3d9/t9YQ== 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)(396003)(39860400002)(136003)(346002)(376002)(451199015)(36840700001)(46966006)(40470700004)(81166007)(36756003)(82740400003)(356005)(5660300002)(8936002)(82310400005)(41300700001)(186003)(47076005)(44832011)(2616005)(86362001)(1076003)(336012)(36860700001)(426003)(83380400001)(16526019)(966005)(110136005)(54906003)(316002)(2906002)(4326008)(6666004)(40480700001)(70586007)(40460700003)(70206006)(8676002)(26005)(478600001)(7696005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2022 01:09:40.9619 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50aa6e6c-ef64-4f8f-624c-08dad8b8e276 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: CO1NAM11FT109.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6325 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On desktop APUs amdgpu doesn't create a native backlight device as no eDP panels are found. However if the BIOS has reported backlight control methods in the ACPI tables then an acpi_video0 backlight device will be made 8 seconds after boot. This has manifested in a power slider on a number of desktop APUs ranging from Ryzen 5000 through Ryzen 7000 on various motherboard manufacturers. To avoid this, report to the acpi video detection that the system does not have any panel connected in the native driver. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783786 Reported-by: Hans de Goede Signed-off-by: Mario Limonciello --- v1->v2: * No changes drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+) 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 512c32327eb1..b73f61ac5dd5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4371,6 +4371,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) amdgpu_set_panel_orientation(&aconnector->base); } + /* If we didn't find a panel, notify the acpi video detection */ + if (dm->adev->flags & AMD_IS_APU && dm->num_of_edps == 0) + acpi_video_report_nolcd(); + /* Software is initialized. Now we can register interrupt handlers. */ switch (adev->asic_type) { #if defined(CONFIG_DRM_AMD_DC_SI) From patchwork Thu Dec 8 01:09: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: 631948 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E820C4708D for ; Thu, 8 Dec 2022 01:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiLHBJp (ORCPT ); Wed, 7 Dec 2022 20:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbiLHBJp (ORCPT ); Wed, 7 Dec 2022 20:09:45 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2040.outbound.protection.outlook.com [40.107.244.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 860D28B382 for ; Wed, 7 Dec 2022 17:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2rzWMw9WeJFmQQkbU0kFPxuJQpaUGTSDtf3Hb7VaKyR8HqyypDkjVWGLq22mvMIC9W/pQxmGkyAfj3uAmhwKgj2vnChj7Rpa23A/VB8SghGu2QaBEAbI/fPUChcFSwYR30m9pTXurQc/1QLPhgCnQ035KtW7SXQmZxy8dcN64ZaDzhcGIaLjN88xAQ9BnZvHDUoeSzY+g/qed6McPnWe1M1r7zMH0NkKnmveQLn14r3NjXzAtz3ewDzn/M5g08rqEhdTnwCAOzTAlB6zMsQD/mtKRmysrrqRu3/va2j839zNRgqrbuct2GfYNYRKqfE33sKMTjvftKc19e3VCrhJw== 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=9LDHwK/wRnCGWgM+7VSXlwcn8bmcIsBzNhRY5FcA0/U=; b=KvJBU5upFeaapoEMnkwnNjwwRPmcThAitlTixIoeAM2/ucjX2dJxJCLtdgsWMh5y1E54wp9QdSzsLpuhe3CFpZBRSmwwYCR7HpV6LQtpJp8iz01ECpPYrUrWeHJmJeJTxB0DAiRjzg4T9z7/q0ZV+0XlIGMXxpiu/cavhhdxrPSddTMqp2fPX/JMLBseYh2DaVTkLHpwOk46OwFb/BSF8+w2TADq9oUyJMLNLVaj8i2NpCCzgjX5cN+rXSxxdeLavN3+UexvHFv44i2YsuGLuN8X3EOVKiaFaoR3fxU0bMZlIhoA8DW4jnXxx0jUdIZwr7npqxT2KUiymZeJgD5CMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=9LDHwK/wRnCGWgM+7VSXlwcn8bmcIsBzNhRY5FcA0/U=; b=gO4Xp8JgOblDbvFRg2lK8XsgWBEUPIilHziLJsWmCwJ61D92PQ3s9TnD5BvvIuTRTw1wmWN5M/j1WE8I4cVznY/+GnEIhr5Qh9LiPrTfU1MjffgNSKG+1QzBo2EAv6T6NkDc+VmJwMjpfBl9TpPq42kpEw224FRWhu3IvfmDU20= Received: from MW4PR02CA0027.namprd02.prod.outlook.com (2603:10b6:303:16d::32) by SJ1PR12MB6218.namprd12.prod.outlook.com (2603:10b6:a03:457::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Thu, 8 Dec 2022 01:09:42 +0000 Received: from CO1NAM11FT109.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::15) by MW4PR02CA0027.outlook.office365.com (2603:10b6:303:16d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14 via Frontend Transport; Thu, 8 Dec 2022 01:09:42 +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 CO1NAM11FT109.mail.protection.outlook.com (10.13.174.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5901.15 via Frontend Transport; Thu, 8 Dec 2022 01:09:41 +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; Wed, 7 Dec 2022 19:09:24 -0600 From: Mario Limonciello To: "Rafael J . Wysocki" , Alexander Deucher , Hans de Goede CC: , , "Daniel Dadap" , Mario Limonciello Subject: [PATCH v2 3/3] ACPI: video: Don't enable fallback path for creating ACPI backlight by default Date: Wed, 7 Dec 2022 19:09:10 -0600 Message-ID: <20221208010910.7621-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221208010910.7621-1-mario.limonciello@amd.com> References: <20221208010910.7621-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT109:EE_|SJ1PR12MB6218:EE_ X-MS-Office365-Filtering-Correlation-Id: 969463f5-9bd1-464c-e3bd-08dad8b8e2fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Aw8HYCkqUpHwegsRGVSIcpuAK0yhtbvKYgO2MCOgMkDy3StvaNNow0CtNeVkBDiQ3apWl7f1S9/fiMSNEjRn7C2qXmf3ucPkHNyUot4E/kIcEQiNglsofalkh16s3b3crunk0inC2OEbAlUPsjH268B6hOVjQVx8B1mE0VsluZGtsXkCzZYErssSFuUVZT97gVBM0EkCOmyv1ChqcxKEaf1KnPZZag7gWICWZtgLVlvAOLg3i9vw994LvPoNOwR1AG3ingGHy08gDpTDlqijdfem3TBqPw3wuY3MV4K0i678TkWNhH7RPKiLeIzeKUbIR7ehyUZB1dYowUIS+W4mvRkEuBzb8QLZuD36xaJ1Ls5w7uVwr5kZhosCxBfNf3YLIEA64suYvJxDPRkhN9KM+ykZrmNeF7AbIonNiY4AF+IoPc0u4ruUpVLDBXspSjN81kwxbmJyBMA3afn2C0yJflaKMVzCPJor0QpuI1qBraMVA6jlaJ/k6tPUM4ddqhe2vywVW5IPCe4kkvCclGx7g3H5KwLIYapwQFzlzZr4dt6hJ3HOY5EGqlmsJq2EYnaCVlYA5lnm5WZwSVAcgh0SmzQw210auITh4if4jk+dkFgIk3Ej/6Dp4ZKHhPCXET01bSbsJ6HYiDYEl5St21E2Cyt/WWpBBTWOoYshzDdFhEL2F8OWtfMWjOrTERdzomqzDA/RNRIpysaWmDJbfLcozSHU/U+iUdJ42VNMdwl+JSE= 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)(346002)(136003)(376002)(39860400002)(396003)(451199015)(46966006)(36840700001)(40470700004)(54906003)(36756003)(2906002)(86362001)(70586007)(8936002)(356005)(40460700003)(5660300002)(44832011)(4326008)(81166007)(36860700001)(83380400001)(478600001)(316002)(2616005)(110136005)(82740400003)(82310400005)(47076005)(1076003)(8676002)(40480700001)(70206006)(41300700001)(16526019)(336012)(6666004)(426003)(186003)(7696005)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2022 01:09:41.6181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 969463f5-9bd1-464c-e3bd-08dad8b8e2fb 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: CO1NAM11FT109.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6218 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The ACPI video detection code has a module parameter `register_backlight_delay` which is currently configured to 8 seconds. This means that if after 8 seconds of booting no native driver has created a backlight device then the code will attempt to make an ACPI video backlight device. This was intended as a safety mechanism with the backlight overhaul that occurred in kernel 6.1, but as it doesn't appear necesssary set it to be disabled by default. Suggested-by: Hans de Goede Signed-off-by: Mario Limonciello --- v1->v2: * New patch drivers/acpi/acpi_video.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index f64fdb029090..0c79f463fbfd 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -70,11 +70,7 @@ module_param(device_id_scheme, bool, 0444); static int only_lcd = -1; module_param(only_lcd, int, 0444); -/* - * Display probing is known to take up to 5 seconds, so delay the fallback - * backlight registration by 5 seconds + 3 seconds for some extra margin. - */ -static int register_backlight_delay = 8; +static int register_backlight_delay; module_param(register_backlight_delay, int, 0444); MODULE_PARM_DESC(register_backlight_delay, "Delay in seconds before doing fallback (non GPU driver triggered) "