Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp936019rdb; Fri, 2 Feb 2024 08:21:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfsJy+otNRInxe1P56cS7gi/CGFEEqDyWkbbwxfL1haP1BlH4I6p5FfO7r4KMvscpKxQE2 X-Received: by 2002:ac8:5793:0:b0:42b:f59d:8fc2 with SMTP id v19-20020ac85793000000b0042bf59d8fc2mr5926629qta.61.1706890890708; Fri, 02 Feb 2024 08:21:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUhMVUql8V/EMeFv/1nKTFKzCQpicVar/QiImeL0BD+l+Cp9YAPXO2cwUXFB4dRcagOFKzdjYQsfKejd+WNKfVnuFZQQHOwuMfp4i4M8w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u21-20020a05622a199500b0042bec1a9298si2224790qtc.692.2024.02.02.08.21.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 08:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50126-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=KWxniq+6; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-50126-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50126-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 A41611C2655A for ; Fri, 2 Feb 2024 16:21:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8E541482E1; Fri, 2 Feb 2024 16:21:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="KWxniq+6" Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2041.outbound.protection.outlook.com [40.107.243.41]) (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 DEC8212FB39 for ; Fri, 2 Feb 2024 16:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.41 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706890870; cv=fail; b=X+xjHThJyEZZRCM2+ltkuV+P1DbGpIs4N47e0s12GL0MxioLZmoelwgPgdcz/O6bwbrJhpi3uJOQQwAuo7S0bRv6QEAUUubd9+0rmVkhxU1JMLcqnaMjqZztnfq2UVvJZREWhWJWHK0Y4hAhIYmcRGWSry2oZc5yoCSaKRDKgYM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706890870; c=relaxed/simple; bh=o8QcZv/3QPGXTybfyG0S+iFO/toRRnsjGyAFLKxy3Nc=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=Fp4935bxTtvlQymgpMluL57C48RvqnBixJ7yTaF/7dQEdUu2LfNNun19Hh8p+m3VMjQPhiHm/6lh/u69rvW0i99Vu9UVcYQRbAfysUBiUK7sUJZ1BAljPC07usto49dEZJBnbqNDcK0FXFeWL/q2Ew2x7TJhX4o1oeAxM+nt+Gs= 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=KWxniq+6; arc=fail smtp.client-ip=40.107.243.41 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=j7prWDVAa5Fy/H+uvRuFiC7iLnSlIumDObZ72X7n9knyI2uqko4+6yIctEe0iKtj3Fa9r9WxGUoRKcsBF7QzjbeGj5APU/QRpfCuMuga9mveqk+JPCR5WMYcNqCt71f2VdWxvMw7FgGrR+r5g2/FZpC2y0CMER0OOOQMH6t7vIt/mHxyF97IZ25GZ8gViaFS/ZGmQAa6DSoUjEym1BIrR8qd69JHXOHpzKRr0SfoqpZwhA/uEvCqx7kxMhdHWqxB0aHbfMmhBStJglbEqTycGE7rY4mBJR/GGdOk9DApo0KUQxpY9agH7p110pPo4gwFQK0wWFRpnWPf5VttXyhnXg== 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=VcS1ewfbzPPr7dW1RsF7tEc6EdIi17/Rr/UTvDHHhMU=; b=T3QuZqQunQVifvY/Oz49Vn2tudM7iqbnKngcjKiTwcmb6oNQA8dPAh/io/576YFMASQC6DRIYUXp6MFcPr8xtEHhKm/2UEhjOKL/B0+JyAknBNxnmHBFayIe+IIhQxEuptxwlkP8bK1BGSpeNj2tN4FkpIpbEnyXbrh1/EhDGLlFZYQ2yBJOegSCKG+3xPYSBcyTVUP7WcybQJMwod3kX0kAujlZ1C/iZw9381SSjjj0t6mSgwTUkJ5a6TapAipVrCa6NEt7Lp2zFONzIaAXMTmYoH1LW4GVP6VqO9NwD4tfAdNgXLapB3mOSN8Waf1feulcgUCvS+7F1bHiWBXw3A== 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=VcS1ewfbzPPr7dW1RsF7tEc6EdIi17/Rr/UTvDHHhMU=; b=KWxniq+6YHFrieg0zqwSoxno13QEWmzZHgTa/y1z0CaqTZFgC+p/1tBajPzjMwNvFCcPtu2qdQvKDyR/Ygka/l+cs4UMQwPgW3cW8oBg7nSOY2e6TYXizzVWfwaxRK2LJrS9p2A22TVZlf+F1EjDr1snf5QMLt/csAeyHJvrrFk= 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 MW4PR12MB5644.namprd12.prod.outlook.com (2603:10b6:303:189::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.12; Fri, 2 Feb 2024 16:21:01 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::c30:614f:1cbd:3c64]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::c30:614f:1cbd:3c64%4]) with mapi id 15.20.7249.024; Fri, 2 Feb 2024 16:21:01 +0000 Message-ID: <0b94b25a-9ffa-41a5-b931-ad84e1892d36@amd.com> Date: Fri, 2 Feb 2024 10:20:58 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/amd/display: add panel_power_savings sysfs entry to eDP connectors Content-Language: en-US To: Hamza Mahfooz , amd-gfx@lists.freedesktop.org Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Alex Hung , Srinivasan Shanmugam , Wayne Lin , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20240202152837.7388-1-hamza.mahfooz@amd.com> From: Mario Limonciello In-Reply-To: <20240202152837.7388-1-hamza.mahfooz@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN7PR04CA0230.namprd04.prod.outlook.com (2603:10b6:806:127::25) 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_|MW4PR12MB5644:EE_ X-MS-Office365-Filtering-Correlation-Id: 22b5e6b4-e07f-4487-138e-08dc240af245 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xs5ZdwLQhmK6kTpqXr8itQoSgJim59tQhYU39R8IGMWU8tmjVIqvnCFj0r3pe67BYRReRFyZ1Lni7RRqKVOY1E8XlYRCWEF1bN4H36VPeczUF4WY3wtBubwc5DAsethnL5hRSHBJtNb5H0h80ya8isGA4t2nb4T4K+QeA+9NuDYmuihIKbtZUA/+DjCxz7iguX7fSHOXjxzWS5yqBR65vNiE4YftvBwCRDdP+9gvDA8jtOGtu+9X112YQVN9lERp0hFVJiMgHO7LgwcuffVhBapMTjCDVxSxknNrjFNC3ECUxTxddAo3bWwEzD1v0/pnS80aezHatHlbDVgpXbhIArKPOB7qav5fiqWd+96UDSNNMHIyezXTBxgEBlX9gvYdSxSsmKLLWWleG7X++Pljr+WX2o98glNcAW09+zh9ytirNvqGNTw1Sj5Wd8njU812rY3NRcDTiKAMzmtQWut4ZSpaDqyxofciUqI3nW1gIu3WfPJifA2xA2sCN0hHHOnraB9teduEJJg5MxAR9jHUI2+CKtINsbsbAr8eA7infbrCBoFYxxqYvQX/I0bcSGnKAh/k9xBDKhas7lpddckG8bgxIn3GxXvSuOG6FZhuWtTNp9mGIynyPmH13neN4qqibW4OFU6I9lyh1Wm43VLnKQ== 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)(346002)(396003)(39860400002)(136003)(376002)(366004)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(6512007)(6666004)(6506007)(53546011)(26005)(2616005)(31696002)(4326008)(8936002)(8676002)(316002)(66476007)(54906003)(36756003)(66556008)(44832011)(5660300002)(2906002)(66946007)(86362001)(41300700001)(6486002)(478600001)(31686004)(83380400001)(38100700002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dVpkTGNHZ0tUTWFMb0RJVVlYUkUzUGZkVjlkWVdoMmYwVERkbTh6S2gzd2Q4?= =?utf-8?B?K1hYMGRnSVZSaksyNE5NczZmY3ZCa0xscklGck9yRmtWaitaNDlMU21MOE8z?= =?utf-8?B?YkNCVUdaL25KRmE4c0grZnUvT08zUldGQ0dOMkxsb1JyQmxuU2FjdW4xa0Fu?= =?utf-8?B?bS9xRTR3eldVVjgydG9raFVNZGY0cU1SeWMvWWEzVndzQnZxR1NqZzVId01a?= =?utf-8?B?dHVvYmNqck9QTEVEclZHalppU0t1cHhMb0RBdnBZV2UwRHlUSE5tUGRZQkl5?= =?utf-8?B?U0szUmFwZ1IrRk1obU9lclhwelR4NWlOcWowSFZZMk05SnZ2U0FEaTB0b01Y?= =?utf-8?B?ZWJXVWFqdlk1QjFHdDIxdW9adEZkNUN2enk4dUVHcnNZa2s4c3VzbDhZUjFw?= =?utf-8?B?b1FoUlBkdz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Tenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 16:21:01.4260 (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: OIvzMHeLoHfYxHGuOEtBvh7SvTpnDDadGrfb9e7vaeCuQnZSqkASgYXGun0HfAtUjcYqHul3XAixDfU9nYryWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5644 On 2/2/2024 09:28, Hamza Mahfooz wrote: > We want programs besides the compositor to be able to enable or disable > panel power saving features. However, since they are currently only > configurable through DRM properties, that isn't possible. So, to remedy > that issue introduce a new "panel_power_savings" sysfs attribute. > > Cc: Mario Limonciello > Signed-off-by: Hamza Mahfooz Reviewed-by: Mario Limonciello Tested-by: Mario Limonciello > --- > v2: hide ABM_LEVEL_IMMEDIATE_DISABLE in the read case, force an atomic > commit when setting the value, call sysfs_remove_group() in > amdgpu_dm_connector_unregister() and add some documentation. > --- > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 76 +++++++++++++++++++ > 1 file changed, 76 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 8590c9f1dda6..3c62489d03dc 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -6436,10 +6436,79 @@ int amdgpu_dm_connector_atomic_get_property(struct drm_connector *connector, > return ret; > } > > +/** > + * DOC: panel power savings > + * > + * The display manager allows you to set your desired **panel power savings** > + * level (between 0-4, with 0 representing off), e.g. using the following:: > + * > + * # echo 3 > /sys/class/drm/card0-eDP-1/amdgpu/panel_power_savings > + * > + * Modifying this value can have implications on color accuracy, so tread > + * carefully. > + */ > + > +static ssize_t panel_power_savings_show(struct device *device, > + struct device_attribute *attr, > + char *buf) > +{ > + struct drm_connector *connector = dev_get_drvdata(device); > + struct drm_device *dev = connector->dev; > + u8 val; > + > + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); > + val = to_dm_connector_state(connector->state)->abm_level == > + ABM_LEVEL_IMMEDIATE_DISABLE ? 0 : > + to_dm_connector_state(connector->state)->abm_level; > + drm_modeset_unlock(&dev->mode_config.connection_mutex); > + > + return sysfs_emit(buf, "%u\n", val); > +} > + > +static ssize_t panel_power_savings_store(struct device *device, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct drm_connector *connector = dev_get_drvdata(device); > + struct drm_device *dev = connector->dev; > + long val; > + int ret; > + > + ret = kstrtol(buf, 0, &val); > + > + if (ret) > + return ret; > + > + if (val < 0 || val > 4) > + return -EINVAL; > + > + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); > + to_dm_connector_state(connector->state)->abm_level = val ?: > + ABM_LEVEL_IMMEDIATE_DISABLE; > + drm_modeset_unlock(&dev->mode_config.connection_mutex); > + > + drm_kms_helper_hotplug_event(dev); > + > + return count; > +} > + > +static DEVICE_ATTR_RW(panel_power_savings); > + > +static struct attribute *amdgpu_attrs[] = { > + &dev_attr_panel_power_savings.attr, > + NULL > +}; > + > +static const struct attribute_group amdgpu_group = { > + .name = "amdgpu", > + .attrs = amdgpu_attrs > +}; > + > static void amdgpu_dm_connector_unregister(struct drm_connector *connector) > { > struct amdgpu_dm_connector *amdgpu_dm_connector = to_amdgpu_dm_connector(connector); > > + sysfs_remove_group(&connector->kdev->kobj, &amdgpu_group); > drm_dp_aux_unregister(&amdgpu_dm_connector->dm_dp_aux.aux); > } > > @@ -6541,6 +6610,13 @@ amdgpu_dm_connector_late_register(struct drm_connector *connector) > to_amdgpu_dm_connector(connector); > int r; > > + if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { > + r = sysfs_create_group(&connector->kdev->kobj, > + &amdgpu_group); > + if (r) > + return r; > + } > + > amdgpu_dm_register_backlight_device(amdgpu_dm_connector); > > if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) ||