Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3334461lqo; Tue, 21 May 2024 13:55:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5DUYNNiJ5FyFV0Pmbc03qyPkJF2Ifdl7pVEjQ8zzzZ+7lJT5gFMw0XjZfhygHfFiGSN6Suz+tvEwnOjpgefiOQEpgWSmI7ag0DxG7OQ== X-Google-Smtp-Source: AGHT+IEEcLufS6WN3YtSinWsLl5Hau7aH0/POBqEPYHDUMTWY3iXa5GkapbasvIII/Ek4gd4zigV X-Received: by 2002:a05:620a:2807:b0:790:ec77:4c1a with SMTP id af79cd13be357-79470f304b9mr1845567185a.39.1716324951854; Tue, 21 May 2024 13:55:51 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf297281si1232961785a.170.2024.05.21.13.55.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 13:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185442-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=KRtHag5v; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-185442-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185442-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 537831C20902 for ; Tue, 21 May 2024 20:55:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26EEF149C71; Tue, 21 May 2024 20:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="KRtHag5v" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2077.outbound.protection.outlook.com [40.107.220.77]) (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 3625C14901B for ; Tue, 21 May 2024 20:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.77 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716324943; cv=fail; b=ntMGmHYogiyOATvVmAbLKOUkEZPd1/so8ip8ukc6V7Da7cEkEYXszDQXkxat//QOUah+9jy2TbrveMF2PgkCMN/6EPVyp6kc6Duc543hPz5Vag8IsWyFshDbP3tfFVGbJDPXHWlNsoCGsEo2z3N5cgx4ArzrySoaKG30Gtd3O4Y= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716324943; c=relaxed/simple; bh=Dh3WbnTi0pyh40QB3fv3UKQMr6ykeQ6C1n3er37jqa4=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=se8ZnOWjOslOYgo6VFxP6ecPaCVNvcB8FJa5lOqDmgrWNxjyLFnDSaRrzwsLTl4rw5fptNmc2nhGvbGMvDM3o5/HhsfXePeaa2y5ZDPU4x3iF/6vNxB6/chsSegY2OocVY3MZhlhZxcNrWusO07hf5X6wCsBcsFUi/J+E5zl8RQ= 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=KRtHag5v; arc=fail smtp.client-ip=40.107.220.77 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=TA2UG1w1PjH+lNduz/V31W6Sbi+XOrtegbPKuZLykDj3jis06kBwOrM7WpNsbW2P0pVJxYqKq5KfDvKzMAyDRCSZPAMLGP8eioJ0A75tehMQ3YOzK8mChtL7rAjdg999UKcyctHcS2/vprG7oiSOBV0I/5UlQx2Qbfw3IuY1Z2JZlCy+hOjc7Dx2UDsEZNNqsP0qu6v1s4nxNNSzuIbqoF6eJOQqmqRThfMxfCjRI+DH/eN00nejANRSOHgJPWoV4J0bTk6ouiYQsHZ/+wDolSXxg1f8Vf/XiOR/pz+1QhlYHVnp923fI6QgyRaTeFvzCbs2BwOHz/4coEymKARxkw== 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=ra/m8SPhuAFG8yVTiJt7GuzOH9Erjcn7Go7B5oFpukQ=; b=Fv2sRdmkyjKXDPZkfe1nU3dr0QEAQbSfSIoyza7oW5iU3SS5fimREhzgNcrlgSET+pIjh8E96TBDzsrNSB2av2Xmxi0HoX/BDSJe6NxX/d8ExAk55PYRS/duR7GG1jHnsurD7sv51u9JI3LorPjizmtAW1Zf12F+TVvHM/tI0pKV5HIuZekX9BjrXykPpKleEO+eXMuEqQVgF2ijLG3Z4NJbZ832z4G+nrs5g2TU/PzceQ2lr2oCrkUY4VauD+xed620fM3vvHAGmrx07gnmgvUQBbH9dXXnSEmfeNsJNlrPOQJSXyIRu5EeDaBhT/Lj2d0Li+LrBHDQzSN8pmfxAQ== 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=ra/m8SPhuAFG8yVTiJt7GuzOH9Erjcn7Go7B5oFpukQ=; b=KRtHag5v37vTwp2Sw3OT+sr9fK0BBfPXlAP/I9jEPnUYK5fyaVZmXUdTI1aJ+s35s9fhQzAB1gxQmOYvxs6kh+f0+D8PaQPdCrSNGv1LOW+Je9jxNBsuHbFtJswao5gUMHfjC3xUW4rIBzHz2hZ2Efcv9Q1fl/Sk3C9lqAuVIMU= 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 MN2PR12MB4190.namprd12.prod.outlook.com (2603:10b6:208:1dd::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Tue, 21 May 2024 20:55:38 +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.7587.035; Tue, 21 May 2024 20:55:38 +0000 Message-ID: <86410711-9b88-448c-9148-109f81b1ca55@amd.com> Date: Tue, 21 May 2024 15:55:34 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] drm/amd/display: Add pixel encoding info to debugfs To: =?UTF-8?Q?Rino_Andr=C3=A9_Johnsen?= , =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: alexander.deucher@amd.com, Harry Wentland , Leo Li , Rodrigo Siqueira , "Pan, Xinhui" , David Airlie , Daniel Vetter , Aurabindo Pillai , Hersen Wu , Hamza Mahfooz , Wayne Lin , Srinivasan Shanmugam , Fangzhi Zuo , Tom Chung , Nicholas Kazlauskas , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20240521051140.30509-1-rinoandrejohnsen@gmail.com> <17782a6e-db84-4c20-874a-342b9655ffc5@amd.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: SN6PR05CA0016.namprd05.prod.outlook.com (2603:10b6:805:de::29) 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_|MN2PR12MB4190:EE_ X-MS-Office365-Filtering-Correlation-Id: cc825d0b-dc1e-4438-2b25-08dc79d85e2b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?N0RQZVY2VkdzZS9aTkVjeDIyVDFlS0N4eDM1VDhUOVAvKzRCZUNPdkxRUmwy?= =?utf-8?B?Z0hVUENoM3NvdWphSEdxY0ZMbHc2bEdQVjBodWg3Z3R1UkN1aFJUdTI1TExG?= =?utf-8?B?SnpZcGNDN25INjJVSjZDME04RW1QbGxZNXlEVGhMR1ZhSFdUZW9nR3FUOG9I?= =?utf-8?B?SFB6YmpydkEyaE1KV1FLMkplYzVKc1c5RTdxRDNWRytDUmJIUmFENy9QWk0y?= =?utf-8?B?d1FLcWIya0ZBL1F4cnpsODUyVlY4RDJod3BxMERMWlorbitSQjNXUHo2TEZy?= =?utf-8?B?TGJQVmNVNmlKd1cvTWZET2Z5Q3J3N09BNmY3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djU2xpYlJsTnJ5U3BLRUFkSmxybERMVExkZ0JBakVyVTZpa3ZpSGd2?= =?utf-8?B?M200K2FITy8vZGFJMVlJZGFMR3dvRDdGT0tBSGxFdFVIV3VCNktKd2xKSG80?= =?utf-8?B?NWo0L0o1NVhRZmtRRnAxby9NUnpXR3RleUx3SlBJZE1KRUpVcHdzeEltYzI4?= =?utf-8?B?dkhlUG0vTHhiRm5FNGJ2Wm1XdHVrRTJSM3dMNVpPVzFpR09yTTQrVkZoVnls?= =?utf-8?B?S0x0dDRRd1hia0QyQmZWTUI4Wlp1RFFsaEpvaXczQmJtTVFyU21hWitVczBQ?= =?utf-8?B?OGN6VzJodmlFVkRpZnByMmpXcG0vSnFpdjlIdnhjdm1EZTVGT2JucFJ3NXNm?= =?utf-8?B?L3N2a3dla0c2SDUwS3FUMDRzYytaYStoczM2MW52UjU5eGIyQkhac0pSZTV6?= =?utf-8?B?TWxjWkI2VWxSNklYd3dzQXdWTytCNlNiM3h5RmRuajd5MWlFb3Q4WW05MDho?= =?utf-8?B?TUNyTDIzWDVjRGRzLzlyVWFuaGYrNzFXTXJ0N1FiQnZYenhWQXBoamlnPT0=?= 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)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YU94Y09rajRBSll5Y0RpMThXTGorUzVrTGtHSm5hQkIxS0N3NVQyTTZsdG10?= =?utf-8?B?anh6bTJ4MzB4NVNCTW04WXZ5Mm5vQkRhNU9ia3djK244K1MyNFVaek1ObzNx?= =?utf-8?B?bnNFenpwZ2lLTnhzK2dmY3c0K0QwY3NrRFBLSENOaktIMHRHQ1hEdHBFcWhH?= =?utf-8?B?ZzU1UFV6ZH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1FMWTVV?= =?utf-8?B?ZHY0aDZYTjRNeWdadStxaWtuUVZzcC92VVpwaDFZS1hCTDZQbW12eUk1KzdT?= =?utf-8?B?c0FiM08vU09JQkx1WkM2U2V1SWVkWEtjWnYyb2grZWIyOExlV09hSWR1VUlX?= =?utf-8?Q?lnnSjnlyKiWeRsNRwmQUaNIST?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc825d0b-dc1e-4438-2b25-08dc79d85e2b X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2024 20:55:38.1554 (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: 9damzV22SyGcmymWHphXOz8FcHfkFRVi7Ftoe+Nss9Y1qix/lebndvDaZwL7kOL8Zjw+3PxWSOi0TZoJKxezEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4190 On 5/21/2024 15:06, Rino André Johnsen wrote: > What is already there in debugfs is 'bpc' and 'colorspace', but not > the pixel encoding/format. > I have searched high and low for that to be able to verify that my > monitor and computer are using my preferred combination of all those > three values. > > I do think it should be available as a standard DRM CRTC property, but > for the time being, I figured that a simple debugfs property would be > sufficient for time being. > It's just about as much work either way to populate it though, why do it twice instead of just doing it right the first time? > Rino > > > On Tue, May 21, 2024 at 9:04 PM Christian König > wrote: >> >> Am 21.05.24 um 07:11 schrieb Rino Andre Johnsen: >>> [Why] >>> For debugging and testing purposes. >>> >>> [How] >>> Create amdgpu_current_pixelencoding debugfs entry. >>> Usage: cat /sys/kernel/debug/dri/1/crtc-0/amdgpu_current_pixelencoding >> >> Why isn't that available as standard DRM CRTC property in either sysfs >> or debugfs? >> >> I think the format specifiers should already be available somewhere there. >> >> Regards, >> Christian. >> >>> >>> Signed-off-by: Rino Andre Johnsen >>> --- >>> >>> Changes in v2: >>> 1. Do not initialize dm_crtc_state to NULL. >>> --- >>> .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 47 +++++++++++++++++++ >>> 1 file changed, 47 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c >>> index 27d5c6077630..4254d4a4b56b 100644 >>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c >>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c >>> @@ -1160,6 +1160,51 @@ static int amdgpu_current_colorspace_show(struct seq_file *m, void *data) >>> } >>> DEFINE_SHOW_ATTRIBUTE(amdgpu_current_colorspace); >>> >>> +/* >>> + * Returns the current pixelencoding for the crtc. >>> + * Example usage: cat /sys/kernel/debug/dri/0/crtc-0/amdgpu_current_pixelencoding >>> + */ >>> +static int amdgpu_current_pixelencoding_show(struct seq_file *m, void *data) >>> +{ >>> + struct drm_crtc *crtc = m->private; >>> + struct drm_device *dev = crtc->dev; >>> + struct dm_crtc_state *dm_crtc_state; >>> + int res = -ENODEV; >>> + >>> + mutex_lock(&dev->mode_config.mutex); >>> + drm_modeset_lock(&crtc->mutex, NULL); >>> + if (crtc->state == NULL) >>> + goto unlock; >>> + >>> + dm_crtc_state = to_dm_crtc_state(crtc->state); >>> + if (dm_crtc_state->stream == NULL) >>> + goto unlock; >>> + >>> + switch (dm_crtc_state->stream->timing.pixel_encoding) { >>> + case PIXEL_ENCODING_RGB: >>> + seq_puts(m, "RGB"); >>> + break; >>> + case PIXEL_ENCODING_YCBCR422: >>> + seq_puts(m, "YCBCR422"); >>> + break; >>> + case PIXEL_ENCODING_YCBCR444: >>> + seq_puts(m, "YCBCR444"); >>> + break; >>> + case PIXEL_ENCODING_YCBCR420: >>> + seq_puts(m, "YCBCR420"); >>> + break; >>> + default: >>> + goto unlock; >>> + } >>> + res = 0; >>> + >>> +unlock: >>> + drm_modeset_unlock(&crtc->mutex); >>> + mutex_unlock(&dev->mode_config.mutex); >>> + >>> + return res; >>> +} >>> +DEFINE_SHOW_ATTRIBUTE(amdgpu_current_pixelencoding); >>> >>> /* >>> * Example usage: >>> @@ -3688,6 +3733,8 @@ void crtc_debugfs_init(struct drm_crtc *crtc) >>> crtc, &amdgpu_current_bpc_fops); >>> debugfs_create_file("amdgpu_current_colorspace", 0644, crtc->debugfs_entry, >>> crtc, &amdgpu_current_colorspace_fops); >>> + debugfs_create_file("amdgpu_current_pixelencoding", 0644, crtc->debugfs_entry, >>> + crtc, &amdgpu_current_pixelencoding_fops); >>> } >>> >>> /* >>