Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp678661lqb; Wed, 29 May 2024 07:35:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaEDZYIRHwdT2x9A9HvPN/bTPzMZXNggvTf9JSxky8jW/82RvR/M18GX3UEWlxgqfMcHrc7e/eGsyyCOBhu41JG35Wdj+oqs1G0cur5Q== X-Google-Smtp-Source: AGHT+IGDbmjEfLhbUSQp1w782rNdUPoJ1YKVgbWYCInFnOfhNRdgW5MsqlNVBPHIxoyhGwwtoyR/ X-Received: by 2002:a05:6512:3049:b0:51f:6324:4b77 with SMTP id 2adb3069b0e04-529b6378c35mr5139215e87.49.1716993310244; Wed, 29 May 2024 07:35:10 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cd95957si636782066b.873.2024.05.29.07.35.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 07:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=uXHh2yoK; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-194280-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194280-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BE9901F28337 for ; Wed, 29 May 2024 14:35:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D48A715920B; Wed, 29 May 2024 14:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="uXHh2yoK" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2068.outbound.protection.outlook.com [40.107.94.68]) (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 CD5D7159582 for ; Wed, 29 May 2024 14:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.68 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716993287; cv=fail; b=QddVIgRStrpw/yGmX/fE0bgi/NKWUEjpQBC4+1ZC2x8YZwJq38rbw84GIZsVv3WPxM95UhM2Wcai5nbkY89+f2oJ/PIzMY9QEDaTEatMoA5P40dKuyQosSJRuH4wa2R+WileECO78VOcY3oD3LsDCx9mrOsqdzl9BakR+TjfP/Y= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716993287; c=relaxed/simple; bh=nO6SlO7QLg7Umrg571/2RaGtM2kdnjlOPpyzBT5iFyE=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=mlOy9H0QGvWgZIAFhw0vUm5LyUXpAJb7RPVfrD7WDNVjBUmjlzCVl6qPoTsKfbqFVqv8s31W5Di41osiOj0CqiPxoptcbGoGZ7IzIofAot8RSoeEV3Zy+bul47mLpBgHRz0oB7J7CPGMfORtUxc39Cl0fULxNLaJtTlreQrOA7E= 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=uXHh2yoK; arc=fail smtp.client-ip=40.107.94.68 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=bNROEAIl5I0JG3o9xzGYgMrvlZhodlrfjLrOES3Sh7lBNEeXF/jXlu3q5ycHsoGB31eXjeyvnDJI4eAw55FZW6Utjqp95mOo5eJLW0dVN5Ct7fHYUz+1DDG73GB5epjw1sV+C+26RxkKJOFG9yoU5XhJb3zIItMjT+SFSZi2qfZC8KCXBsmyyWGZtPsCPAMKegOZS7k5+DjdpWcHUDNiXeZWhzInsDAO/z57maMnDtpH2WhNlKU+Ekj7vInM2SoCB1S9TyNrX2glAHYPyiyc/WZMdxSvxT6XIU8WDy/gtVeYWPT3k+NtrV4GfyX1PfpkDtr9ieOiVj9lakA/NzeLuQ== 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=D10IUCQ1GSE7YexWkBkM3tCRCfWCYNebXV4IvtBqMVo=; b=k6YBOk6c5vjGpUCTrvXqahIGtw/ZTBPOWcNRonuZn/ieUtANzx79l+dIveFiq+ieLMeQlJgPgS+1+WsUX47qUHj67RJTWj2ONDhSYILu3RR4FwibN+shMeKgZ/Bxr2ZQ+ijk4qfj1MAj6fqYf/NH9Uo+a7KcI/Jo4DqGyZvXi9WyuIpqvFOTEnWsPKZQJEgWeIu/nXfr1sfGg3cA/fxdy6wbuJJOlzIV3qj6Zr5DQN1JiCMsGrVkS7NF1FSfqH8K9tN21qilGNIKOUaauHZ/N10pihVWLThXHnQUsY+lD6c1Ri9oWIldvqHWQoblFWshcTbmOpBM7m9TyINniOIxdQ== 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=D10IUCQ1GSE7YexWkBkM3tCRCfWCYNebXV4IvtBqMVo=; b=uXHh2yoK3kxOrB8PtjV/2SeeSGmvcpEJifdx8hxBvD8zhJHar/aJV8Vgl7PLEe77nqoprbhbbMBMMKCSizDE9lUWyc1iurLuqmNEJJIvdPoNJ+47qQj001oR1T7oSTwxh1N0qalfMmcEfvAyxky/Wa39+pvv/HdIgwtyvFyxZzM= 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 PH7PR12MB6812.namprd12.prod.outlook.com (2603:10b6:510:1b6::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Wed, 29 May 2024 14:34:42 +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 14:34:42 +0000 Message-ID: Date: Wed, 29 May 2024 09:34:34 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/client: Detect when ACPI lid is closed during initialization To: Alex Deucher , Jani Nikula 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> <87r0dkiv4o.fsf@intel.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1PR04CA0013.namprd04.prod.outlook.com (2603:10b6:806:2ce::19) 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_|PH7PR12MB6812:EE_ X-MS-Office365-Filtering-Correlation-Id: fc73841d-ea1f-4952-a495-08dc7fec7a77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|7416005|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?RWFUZVBkWnZjRWlRWUtFY3hudUV6MkFOd1ZSTEhoc2RxODdESjhwUWRUNXE0?= =?utf-8?B?RTRHaUxJeWxqdnV3R245UjJYZXhTcEpyWGNyTlhsNHMybFEyOEtyYWJWN1pU?= =?utf-8?B?c1BTVmZoWGN5UGFPcjdESnNyRU5aQU9jV1RhdmF4R0tidDBVa3VKM1EvdGVX?= =?utf-8?B?b2VRd0FFV2xKMmEwdUhwZXNkZVJTano3YmVLWktDdzNhcnVqekRheThPMVVD?= =?utf-8?B?dFN0Q094eU9Gai9zNm1INWp2V0ZWMkswUUM2MXpEdlJpTzNvN3NwRU1oS3Fo?= =?utf-8?B?eTRlWFloMFBYS2pHY3dhMW9SVDVoazJqRW5xSVhEaldWQTY3Z3ErdWhjcytX?= =?utf-8?B?dVlHUTQ4Q09raUdSNGRGRXNkVEJyTjZuVHJuSDkyZVY1cEk4aGtmcy9RQXFC?= =?utf-8?B?R04xOGU1bUdHRm9yS2poREZ2WkxyWGJibk5zWTdOUGx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tM0x5SjJvRENQcTRLRXB5YkFjMWN4eDdX?= =?utf-8?B?WW1EdndzVXFhMk52ZVptNmNMRFU5MWFHT01KeFVPcVNOclRBc2cyT2NockdG?= =?utf-8?B?dVErRHdZRnl6TDR1WmhuQ25lQVhyalNnN1dJM01DWmxDTHA1aFYxZXhDZllK?= =?utf-8?B?MzFZcC9CeDZTQWxvUTFOZ05kWXg2ckR2YzhEUnpGQ01lSXUwbk02ckMxWUE3?= =?utf-8?B?VnBmL2hseDNheVhDZjVOTDlNSzdIQ2tFZzdBcXQ5N1M2eUtrVEZROXNPK3Vm?= =?utf-8?B?eWxJY0RZSVoyaE5sNnhIcUNrbDRnWnc9PQ==?= 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)(366007)(1800799015)(7416005)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M2VvSUZSK3hLQWZCNGlPQjBEOTUydER4bUZ3bk5NNXZQeW1MRnU4aTNhSnNZ?= =?utf-8?B?Q2xKbzVjbzJmVnREVjZYWHFnb0RXdENpMGh5TjAwY2UxYmRLcjAzMDByYldz?= =?utf-8?B?OVhOZ0tUdmVSbUt0YlBKSnJXbFVGZFNZcHlPQU5WMVZxU2lZenBMeFRTSFhk?= =?utf-8?B?WkxVMXU3OVpXMVVlai9WSWZWeWw3N01BRTJ2a1oxVWFqUC8rT3hsODNpN0k5?= =?utf-8?B?cnRTTkw4SWQ3T2VscmV2YlFRcTNTVm85UTZwczVwMXQ3U3YxTERZRzcwakpz?= =?utf-8?B?bHo5VytzOWJQVkhIN3lQaDBUbVdabW5vdlZKcUlpbG9pUW5wWXFyNGhlOGFI?= =?utf-8?B?UENaeCttTGtsc204bHZ2RjdlSU4yR1diTmdZLzUwUjB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Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 14:34:42.4835 (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: HQ7PdDPV8fCg4MBC6MdERioxopvfvhH77yoy22kNDw6mcfpyexAtN0REmnKDCQqoxznrpc3/pNmSXqJU1H3uIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6812 On 5/29/2024 08:55, Alex Deucher wrote: > On Wed, May 29, 2024 at 9:51 AM Jani Nikula wrote: >> >> On Wed, 29 May 2024, Alex Deucher wrote: >>> On Tue, May 28, 2024 at 5:03 PM Mario Limonciello >>> wrote: >>>> >>>> If the lid on a laptop is closed when eDP connectors are populated >>>> then it remains enabled when the initial framebuffer configuration >>>> is built. >>>> >>>> When creating the initial framebuffer configuration detect the ACPI >>>> lid status and if it's closed disable any eDP connectors. >>>> >>>> Reported-by: Chris Bainbridge >>>> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3349 >>>> Signed-off-by: Mario Limonciello >>> >>> Reviewed-by: Alex Deucher >>> >>> Do you have drm-misc access or do you need someone to apply this for you? >> >> I've bounced this to intel-gfx and intel-xe lists to get CI testing. I'd >> appreciate holding off on merging until we have results. > > Sure. Thanks for the review and pushing it to CI testing infra. I don't have any drm-misc access so if everything looks good then one of you guys please merge it for me. Thanks! > > Alex > >> >> Thanks, >> Jani. >> >>> >>> Alex >>> >>>> --- >>>> Cc: hughsient@gmail.com >>>> v1->v2: >>>> * Match LVDS as well >>>> --- >>>> drivers/gpu/drm/drm_client_modeset.c | 30 ++++++++++++++++++++++++++++ >>>> 1 file changed, 30 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c >>>> index 31af5cf37a09..0b0411086e76 100644 >>>> --- a/drivers/gpu/drm/drm_client_modeset.c >>>> +++ b/drivers/gpu/drm/drm_client_modeset.c >>>> @@ -8,6 +8,7 @@ >>>> */ >>>> >>>> #include "drm/drm_modeset_lock.h" >>>> +#include >>>> #include >>>> #include >>>> #include >>>> @@ -257,6 +258,34 @@ static void drm_client_connectors_enabled(struct drm_connector **connectors, >>>> enabled[i] = drm_connector_enabled(connectors[i], false); >>>> } >>>> >>>> +static void drm_client_match_edp_lid(struct drm_device *dev, >>>> + struct drm_connector **connectors, >>>> + unsigned int connector_count, >>>> + bool *enabled) >>>> +{ >>>> + int i; >>>> + >>>> + for (i = 0; i < connector_count; i++) { >>>> + struct drm_connector *connector = connectors[i]; >>>> + >>>> + switch (connector->connector_type) { >>>> + case DRM_MODE_CONNECTOR_LVDS: >>>> + case DRM_MODE_CONNECTOR_eDP: >>>> + if (!enabled[i]) >>>> + continue; >>>> + break; >>>> + default: >>>> + continue; >>>> + } >>>> + >>>> + if (!acpi_lid_open()) { >>>> + drm_dbg_kms(dev, "[CONNECTOR:%d:%s] lid is closed, disabling\n", >>>> + connector->base.id, connector->name); >>>> + enabled[i] = false; >>>> + } >>>> + } >>>> +} >>>> + >>>> static bool drm_client_target_cloned(struct drm_device *dev, >>>> struct drm_connector **connectors, >>>> unsigned int connector_count, >>>> @@ -844,6 +873,7 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width, >>>> memset(crtcs, 0, connector_count * sizeof(*crtcs)); >>>> memset(offsets, 0, connector_count * sizeof(*offsets)); >>>> >>>> + drm_client_match_edp_lid(dev, connectors, connector_count, enabled); >>>> if (!drm_client_target_cloned(dev, connectors, connector_count, modes, >>>> offsets, enabled, width, height) && >>>> !drm_client_target_preferred(dev, connectors, connector_count, modes, >>>> -- >>>> 2.43.0 >>>> >> >> -- >> Jani Nikula, Intel