Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp760834lqb; Wed, 29 May 2024 09:42:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMOBfsPkVUZ2olrnoDYFdPR92Q9MYfdikcbbbEmQX/VLITKLZoszjtEsNdNXbkgPMs1CupQf3Ar+s161qkwkhhjEKrw9fVhe79+z6n8w== X-Google-Smtp-Source: AGHT+IFcbqXsz14vGV21Ah6hghmNrpsNQS7Zg0J1UVapUzd1xyMjE5Wz9WFKAp4OM/oSVTXWrSLo X-Received: by 2002:a05:6a00:8a0d:b0:701:e698:7c0b with SMTP id d2e1a72fcca58-701e6987ca1mr4761634b3a.5.1717000938256; Wed, 29 May 2024 09:42:18 -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 41be03b00d2f7-68221c6ab8csi10769917a12.87.2024.05.29.09.42.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:42:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194439-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=sMghtErF; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-194439-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194439-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 B459DB21822 for ; Wed, 29 May 2024 16:27:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65D501836F7; Wed, 29 May 2024 16:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="sMghtErF" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2057.outbound.protection.outlook.com [40.107.220.57]) (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 8072BE576 for ; Wed, 29 May 2024 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000025; cv=fail; b=luE1yDyWwzI0jXkSuSCJ3Y20wEhTZx53+t5WYr66ZGaN10kDJJAQ6yHhAv3pYEz9Q/DcHWjtpuvE8Q1rcdJdhBcogWlmfii3Gca99RxBYtzqWdytIiPqus3ziQB8K2e8os1eo/WZM9aCdPM5gqZNIid+h3POXYwv+g339FNe1pI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717000025; c=relaxed/simple; bh=rCuFTl618a0Ji0f4eymwxr9zX/bfCQ8S5G7+BJhHvWw=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=WsvfB9wYUD+fhJKvLrJuy2ehAynid2+fvMSGihFmiFVkjHGjTBgTQSS2liTWWB4VtncSxnVU/z9hzTGMV3SRyESuN07HzfSPVncPiN1uds+os8KYpYAFQeY9HiQLMgTHn5iQUXdlwfIxd8e9gLe2w2uKOdyG8TPXfAXO4Q4Wqkw= 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=sMghtErF; arc=fail smtp.client-ip=40.107.220.57 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=mUy41B7gMg0U5uyiyEckZPjURztlfzkwR2hjsBKPGod3q5f54AnbNBQ8gfiotT4eMJiv/EitOvTA16sb0p7LET15fkzIHU/8n4O2khtZo85xWodLLaoI+PPLodG/n2XM6RpAYUK3Z9NHsC8UmnRTZ031OjPSt18GrMqziRhkV84RImKZMz4BnrHoPldVBLZmfVbofyBWA/Cc+tXDYQErBSCvICyxGLZBejAcSqkekZI0+TLOuFYGP/eLqSlPg6avSpbiy/lVCbGcmI8AjBMcb4eqtQ3oXbMtfam+6gzWBZFSYkjF3gIfBsXxeFfEwWNp8F0SzL8RMcTFuBUmvq8T9g== 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=EPlMl405g6R3ZzM5JERXRdiMHDwl21YG7klWfzkUWCk=; b=W9pb8dXAglNaATc4++k3GCz3aEi6X8FNmLzilnnPQqzLNoYDaMjxI1uEANomJi1yzVE3O1HFByoDgV+2lhcmoTxhhzPk7jNMmSygQ88RX/ocJy28uZsELWlu9Dzf2qlo66ms4Fo8QqH5iBb0f04QFJhu8wZWTcYh2VvL7iSDE6CJxgzIqNhC4il0nOlFvCHiCSTWg2lD0uexG0dMz9GSX2JDr16bFBV4ESkzip8DDlnIAfM8yZs7XJT/hjOw1EnPHReeqHG/lIwhQvafK85WXnvIN9D94UDS8PM/TaeDiQtxu0hvat0UTO0HjDJqjYzUh8EFIZb2s7tZ4YpSogtHWg== 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=EPlMl405g6R3ZzM5JERXRdiMHDwl21YG7klWfzkUWCk=; b=sMghtErFdY84Cltu7jZLzsVStuR+WDn4mQodVLfP3QCjT++F0262d2tZT55dxN8bOcxHcEgyyHGEfSkyItEN2+asXVjRsLdf+SbuleoJz31WHw6i9AIseuvwpKcGkNocpjEm4LIwT93TzLwnfslPu6iapkdYtEfPvlJMSv5OazY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by IA1PR12MB8311.namprd12.prod.outlook.com (2603:10b6:208:3fa::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.26; Wed, 29 May 2024 16:27:00 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca%7]) with mapi id 15.20.7611.030; Wed, 29 May 2024 16:27:00 +0000 Message-ID: <1f8ccefa-204f-4477-814f-4a1dfbbe6741@amd.com> Date: Wed, 29 May 2024 11:26:58 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, Chris Bainbridge , hughsient@gmail.com References: <20240528210319.1242-1-mario.limonciello@amd.com> <197d195f-9206-41dd-8ff1-f4bb4988fb9b@amd.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA9PR11CA0015.namprd11.prod.outlook.com (2603:10b6:806:6e::20) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) 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: MN0PR12MB6101:EE_|IA1PR12MB8311:EE_ X-MS-Office365-Filtering-Correlation-Id: dab408f2-08ea-4119-bcb0-08dc7ffc2a98 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|1800799015|376005|366007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VS9YWVk4ME5nN2x1MTh3M2ZkeHZmSk9pU0oyWWlueTVSK0M4d2QzaEFvbU5F?= =?utf-8?B?VzlwcjBVUWZSaktEamlPNThFK2luNHU2cHF4YXFvTFl2SmFZNFY3cXQvRGU1?= =?utf-8?B?M0Q4bHVVRlZ6WG9wNktaZUQ1ZnB3S0ZMMTV1THVmOTdKZGJISTdSREx5cGdM?= =?utf-8?B?UFNldFJ0RU9rc2VSdWlLUHpsVk9PcjZid1J1c280SHZSWjhKM1BxWERmV3F5?= =?utf-8?B?aHZScm56RlphaFB1ODNNYWFxOEtDekd5TXJ4d08rYlV1OU53akxoajUxZGM1?= =?utf-8?B?V2NQcUNQcmUvOVRXaE1sMFg0QnFEUmhLNzdMUGxDMWpEdk1nUWZLQ3hMRjg0?= =?utf-8?B?N3BZSFVMTGRPR2hmUlR1aTZJNlRZc3hRTDFrWEJZRk9lNkdLeGdRODdGUTBv?= =?utf-8?B?ZmEvWDdpSDZxR3VYNkZBUmh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WxDU24wUHhXUTJmUmV1K0JSQjBmem1iT2ZUM3NoYk5ocGoxelo3U05V?= =?utf-8?B?WXhFdmpESklZbE4yYVk2ZTFjaVp2SlRCQnV6T3ZSdHhMT1FXcEFEaEpmbThO?= =?utf-8?B?bGR1aHRsOEdWVWNlMDRHak5BQjByZzJQaVNDMDR4b1FoczRSbTZVVWNGVGt6?= =?utf-8?B?U0RYTGxlcmUxSUV1Wmp0VjlUazk4aG44TlVQYlovU0toVGpUd2w1d3V5dTdY?= =?utf-8?B?ckRrLy8xQ0pmcnJoSk03d29HV3o0M0RGS1BBbUlEcFJYR1c4WWtqcHdHc2I4?= =?utf-8?B?bmRLUGlTaFpSRUJybjdNdlNpdW9OSjROS3Z0T25kOWNDN0hDNTY3YmNnam45?= =?utf-8?B?dzR2dGtqOWdqd0hidVQ3dURRd2ZVNVlHYnZrV3RkM1hvbWxEcG9lOXFBPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(1800799015)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dHROUjRzMCtmMTdKMjhhS2pQcVFXd3I0UXZVWHJJbzlXYlBqemhXbVpxaWlh?= =?utf-8?B?dXE0RmNURzhZQ2lnNXN3WXZvcnJiNjZWcUt4V3pxYmZCMHFFYTVTYWRjQTVS?= =?utf-8?B?L2MvUmtwQ0prWTd3ODJRTnpPWkhaU045UkZsNXM4Yy9BSW1wRXdQek9YaU5N?= =?utf-8?B?MDdEaUhHbVBHRHpvdjJRbEcxYUc3Ylh6eEhlRTI0OWlkYjFGWmErcEhsNDdM?= =?utf-8?B?dzFQSWNQVGF5YjI0eEswY29oSVhGMHhuSVRWZW5lMEEvWkN3bEMwT1FaRi9V?= =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txYXRrQ2IzTzltUVcyemIwS0tqeFFVZ0dZ?= =?utf-8?Q?99OqamNGHiw2r64m0G3m0Y6iE?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dab408f2-08ea-4119-bcb0-08dc7ffc2a98 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 16:27:00.4543 (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: jR8o9Z/YcgQjAp0exN2trRsG3eXaRT/RLRJ3xOx6a9FHyr/7OUwKmjmjaKN1ss8wK6DpNYhamXszOXNL63XdLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8311 >>> >>> If you don't hook into some lid notify event how is one supposed to get >>> the display back to life after opening the lid? >> >> I guess in my mind it's a tangential to the "initial modeset". The DRM >> master can issue a modeset to enable the combination as desired. > > This code is run whenever there's a hotplug/etc. Not sure why you're > only thinking about the initial modeset. Got it; so in that case adding a notification chain for lid events to run it again should do the trick. > >> >> When I tested I did confirm that with mutter such an event is received >> and it does the modeset to enable the eDP when lid is opened. > > This code isn't relevant when you have a userspace drm master > calling the shots. Right. > >> >> Let me ask this - what happens if no DRM master running and you hotplug >> a DP cable? Does a "new" clone configuration get done? > > Yes, this code reprobes the displays and comes up with a new > config to suit the new situation. Got it; in this case you're right we should have some notification chain. Do you think it should be in the initial patch or a follow up? > > The other potential issue here is whether acpi_lid_open() is actually > trustworthy. Some kms drivers have/had some lid handling in their own > code, and I'm pretty sure those have often needed quirks/modparams > to actually do sensible things on certain machines. > > FWIW I ripped out all the lid crap from i915 long ago since it was > half backed, mostly broken, and ugly, and I'm not looking to add it > back there. But I do think handling that in drm_client does seem > somewhat sane, as that should more or less match what userspace > clients would do. Just a question of how bad the quirk situation > will get... > If the lid reporting is wrong it's not just drm_client that would falter. There are other parts of the kernel that rely upon acpi_lid_open() being accurate and IMO it would be best to put any quirks to the effect in drivers/acpi/button.c. If it can't be relied upon then it's best to just report -EINVAL or -ENODEV. > > Also a direct acpi_lid_open() call seems a bit iffy. But I guess if > someone needs this to work on non-ACPI system they get to figure out > how to abstract it better. acpi_lid_open() does seem to return != 0 > when ACPI is not supported, so at least it would err on the side > of enabling everything. > Yeah acpi_lid_open() seemed fine to me specifically because non ACPI hardcodes to open.