Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp685507lqb; Wed, 29 May 2024 07:46:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHD7rI4lEGnWEzbtAGUvJItojujW4MQYkaS/GApkzWu4+BV2z97RN2QYmyoysX93TlS48U/4ZxfGTer3qi/8xT4nLsRXE+yu2MLO6QGg== X-Google-Smtp-Source: AGHT+IHCJQe/HIpTmgNLVEA7jnaIiOFFiOmoBagi1NGxBayKLKNIGnk/Zx1AdadpTMRS6aQgCh6u X-Received: by 2002:a05:6870:d0c9:b0:24f:c77f:1e94 with SMTP id 586e51a60fabf-24fc77f5b1cmr11548093fac.56.1716993974647; Wed, 29 May 2024 07:46:14 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd0b0bbsi1257389485a.363.2024.05.29.07.46.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 07:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=I5dr4BWc; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-194295-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194295-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4BB6F1C2350B for ; Wed, 29 May 2024 14:46:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9091415A861; Wed, 29 May 2024 14:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="I5dr4BWc" Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2066.outbound.protection.outlook.com [40.107.92.66]) (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 84FB479DC for ; Wed, 29 May 2024 14:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.66 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716993966; cv=fail; b=KVTEWOLk1nIqwvkzMbkJuebkX4AgZnIbjaADMQGIvoCU4KtkvNlGhXTLWAQSqCc8NdhbpTGwn6M/mJ3/lZXkNZirn3iUBNr1dwzisoGXLGGDgyUrNqkZM8Zp8a0PrGM0DZknUjwxvU5GK9wFo9j5ojnpPgtJEOpmBrIFA+KSxV8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716993966; c=relaxed/simple; bh=blu5sb/oUKLvmRtKVVsIEkECNpmqxwR2TjUp73G6tfw=; h=Message-ID:Date:From:Subject:To:Cc:References:In-Reply-To: Content-Type:MIME-Version; b=B98nrnEIM824ia3QtY9KfB/KK+PPSnPGhJgO8sQpVECXB6Rrqq//sQQRTSiKHwj0TSodAOz69sf6W5YY007hnJidoiU7+wMa848WDBhkDSrMLwflFdBtVMCDdycL+mSql0ZAcMIiRaziEBARlzieM4BuYk7d9KT2QxthhEF96Qk= 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=I5dr4BWc; arc=fail smtp.client-ip=40.107.92.66 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=lDxddvTPGhn41msssMtWeoPDjTzkk1LB2AZiJVNFXWpjxE/zwoOwT2Cqr6ieiATRy/Z2wLrztjOkPKkP6kIwmjIVc7acxQzYIp+W4Jm6PXiA1r2FVvAjmnalaj7MM+r0LTMWDYee/yoHjtOeI0yK3LfxLtv768FMrn73Lw/CTrHNei1masf6w98ZLPo7xZhXLCmiZDEklueGpyYOI+zAExoBJ44IsauAVmCHD1Nr7HGElMQd094KkWB/U7ua3SLFFx2szZAonYSEc02Whz7j4RLgMBDgNkGHIB27DB/cdEVWJ/yU7TMT1hXFTAdCeTHFkWpLGCynE71Qr3KjwQie8Q== 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=fcOi31UY4GZC28UNCXKl0viT0RzuAyEwF37iLciwK0I=; b=TJXTPQTMKeJPwq5IlpsXWbT3DgmNzpfAmC2boMp8l1S8iVfYI8t2TMnP9zTG1OGZqLKVvSRVX+gGzhZxk/J6DqQTz5E5ujUFfKki6CrvlGc6IpQVh8hnd6YpDd3CnUP8XQbXZY1NauEP+pQj9kaRDf8j4nvW5vMBnaPd+Zr1Q1hLwet6sMSkhrIn5AL3ZUvcPpCUmjZs1TaROoVvxzzJrLi/dVHbLaMjKG06QiVjjwI2q6nvx0h1xx15uyb5ecof1uV8y+xqb0INgGi6EKEz/SRyvYcbgfDLj8dBWNRbU+aaG6V9BOxT0Ip+gjmUJF8DeF+gNrHMAfzdTU+qYwNHOw== 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=fcOi31UY4GZC28UNCXKl0viT0RzuAyEwF37iLciwK0I=; b=I5dr4BWc+IIJq6i+7lFRlwzUNFnNurlsjbuUKz5urTsWEiyUy/ak9pwsTKZ3UcOjCymloar8+pssnGT4EbVxkQ7g3BZgf+MSadCUshauWrvA3I6IOWTP9Iy9LR8v/K9eIhdEG4fTd6zX5FlZYZ0H1jEji8qxVjFEbxMds4HpDec= 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 DM3PR12MB9349.namprd12.prod.outlook.com (2603:10b6:0:49::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Wed, 29 May 2024 14:46:01 +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:46:00 +0000 Message-ID: <197d195f-9206-41dd-8ff1-f4bb4988fb9b@amd.com> Date: Wed, 29 May 2024 09:45:55 -0500 User-Agent: Mozilla Thunderbird From: Mario Limonciello 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> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BN9PR03CA0709.namprd03.prod.outlook.com (2603:10b6:408:ef::24) 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_|DM3PR12MB9349:EE_ X-MS-Office365-Filtering-Correlation-Id: f621f36c-e6b6-487c-8c3a-08dc7fee0ede X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|7416005|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dzhYbllHWWdlRm96N2dxeHRjQmh3N1BCSjFXMjV6bm1veGsvZDVacmx2R0JB?= =?utf-8?B?MFZkNHlBNU1qRGpDdVBRMDZ2OWNXTS9JZUVPdm15NDlOWmpvWXUybTduWlFs?= =?utf-8?B?N2tnRzRTbU5UK3hxb0JYc0RpQUhnc1pzbFF4Q3czZGtkbkdVem53K1pWcjlO?= =?utf-8?B?ZlR4d2FtSW4vMGFoUThCQ3ppb2xNOCsydlN3N0tpNFRRb0lSUXdBOHZ0QzFJ?= =?utf-8?B?K29WR2VqSHdwMW4zVFFaSTA4bDRNcDUyNEZOSzZ1aFlucXk2aThYTlZSQWE2?= =?utf-8?B?QWZZQzlyOVhUMGJVeTlNc1dUMUk2NzNRQkNpSGJTS3B3Zk1PaXNBa2xjb1Mz?= =?utf-8?B?TmU1bUEzZE1YUmRVY25PMm9jM29EYXZDSW9jVnN6LzhEWTZYakJ4K0YwOWdj?= =?utf-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UltVlVWcmRX?= =?utf-8?B?YWZwRWZGV1V1LzJ3OUUrMWlkMEJrbjkxcnFCWTljUytjYlVsbWdNSSsrMnBw?= =?utf-8?B?L004VzNTeC9WdXMwMFI4ZWF0K3MxQ29MUnhZVXhhQkxVZFFZOVR0S2Q1Z2xz?= =?utf-8?B?cHY2ZkZ4cDBhY0RoN29OWkNFa3orZEM5bGFnYlpwYU9LdDhYaHp6S0JrNkxO?= =?utf-8?B?L0dTeUJlWnUwdVJIZ2xsdEZxNHVqUUhSakNGRmo0c0l0RzlHaE1vMjd4ZEFB?= =?utf-8?B?MUNnQ1VSM25GeGsrRHdtMUhYcUZjZmRZYXFQQjR2a2RtOW4yYWxTVFAwbktv?= =?utf-8?B?SlNtbzU1T2twTUpYSklFbTlNYklYMmc9PQ==?= 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)(7416005)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TlhydWVGZkoyazZzYkh6b1BqNTBjTWwwNG5iMHArN1NYWkRYcjhvTzZMSXBl?= =?utf-8?B?QlY2YmhpeVNiaEE2ZmZBL2ZjV0pHai9DdTFFUzQ0QitXMW1VN1F3R0tsM1o0?= =?utf-8?B?UUQwckRmTEZneWNwS0NOWkN3ZnJzdlVkckJ3eW9VS0JPRTk5TjRFamZIOUU5?= =?utf-8?B?ZnF6Y3NGRWxZd2FONEwwdHVPWVNFem9BaWNQckxWYmdZbnE3KzFKalB4eEdn?= =?utf-8?B?YytwRGpEdTdxbHgwOUpzZ2lUQllTWEhCenV4THlqQWY1V01wNXdjUkpHSGla?= =?utf-8?B?alB6UlplVlpLSFAzRXN6eWl1bXE1UmZkMGNDbHpTVXZKVWJYNTMvdTZOR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-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f621f36c-e6b6-487c-8c3a-08dc7fee0ede X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 14:46:00.9150 (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: UuVa5hPkb7HzWwT8qnlHUe6X+8hiIXX/L7bf1NjKN8xIQDKtg26shwsluKKQkSLt9ya4dIyGogEVB3gvSzoqsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB9349 On 5/29/2024 09:14, Ville Syrjälä wrote: > On Tue, May 28, 2024 at 04:03:19PM -0500, 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 >> --- >> 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; >> + } >> + } >> +} > > 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. 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. Let me ask this - what happens if no DRM master running and you hotplug a DP cable? Does a "new" clone configuration get done? > >> + >> 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 >