Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D306FCD3439 for ; Thu, 7 May 2026 15:52:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6658710F1F0; Thu, 7 May 2026 15:52:24 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="1T+Kw+EC"; dkim-atps=neutral Received: from CH1PR05CU001.outbound.protection.outlook.com (mail-northcentralusazon11010033.outbound.protection.outlook.com [52.101.193.33]) by gabe.freedesktop.org (Postfix) with ESMTPS id D51CB10F1F0 for ; Thu, 7 May 2026 15:52:19 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=y5eTpPRaqU0WBzfe5Kb7zHMqW5Iyi5/ByOkmVlp97PuKcgBQyw0vmdBxks9sb51hbnHfvyQLIW1x5l1eQzMv7ANTIANZ7YRDb3qKR7yW4/HP3cYOZma23NO4vm0Jlak8WCNS60s10z4UX4odOp8bNO828LXDUq2jCHjDCw2NQ8t0dRCkq1mmbMX8fKB1j2m41CdZtFOSwYuzAlrtU+tOvhUPggW135ApO3C7tQl8RR9FKAo5QiMOs1bKJcB/K/IFBuYt41BSjTKLRGXZfu/u2W4QrPVToT+gAS+5WdXz46dHsubTxHNC2cPgIHAvhZcHJh+6PqT0yCqfsYEyYNPJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=v6x0cSk0ojBXIoxoZjv0k9b1RU6hTfpGpaLo3B4Kcjw=; b=jSnQuJV0azNOsR2XiMXc7INwliEG3zqozTy9dev5sjSEvMpIsv9cN60RaK9g7Jm5uadHwuSA+gRrcUQerTdcxpj35EzK8ffY+hgotNBCEMmeJV1F7hI9l28T+/LRVuMwYb7Bm8RFtg1S+L98BE3sonKw95nwtWJzvBCD2/KkHZb4QA5mBmaKAI130LbUazRPqR11JUMNVdgTy6eNvtgZV0+RKY8RRI12mDU/h89IgDBZDqGVo29/Ld/zVqUWLHaprMuI9W6OkMMtNZtnVJh6jpujEwfM3Kadk6Ygr3Ue5hPVt6ZrTq3gRVdcRq83px0rMBseIp2dMjhY5FcGS9Tu5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=v6x0cSk0ojBXIoxoZjv0k9b1RU6hTfpGpaLo3B4Kcjw=; b=1T+Kw+EC1v74QYJXqYciYg9qVKPIcT4UlecyzYSiI+5sF1/mCVTMxcGl1XU3mDibwX/O8aASWKGfPxjLkjSIs7sj+YhKv4pPK6d0VHm7a7ucZWxxz1JrAguXgkRlVlIGwQcJzL989CuSJXV/MqZcqlKgLRl9Xr/qYID40KL53kw= Received: from MW4PR03CA0307.namprd03.prod.outlook.com (2603:10b6:303:dd::12) by DM4PR12MB6112.namprd12.prod.outlook.com (2603:10b6:8:aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9870.25; Thu, 7 May 2026 15:52:14 +0000 Received: from SJ5PEPF000001CB.namprd05.prod.outlook.com (2603:10b6:303:dd:cafe::1) by MW4PR03CA0307.outlook.office365.com (2603:10b6:303:dd::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9870.23 via Frontend Transport; Thu, 7 May 2026 15:52:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by SJ5PEPF000001CB.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9891.9 via Frontend Transport; Thu, 7 May 2026 15:52:13 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.17; Thu, 7 May 2026 10:52:03 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 7 May 2026 10:52:02 -0500 Received: from hwentlanryzen (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Thu, 7 May 2026 10:52:02 -0500 From: Harry Wentland To: CC: Fangzhi Zuo Subject: [PATCH v2 21/22] drm/amd/display: add HDMI 2.1 Compliance Support Date: Thu, 7 May 2026 11:51:43 -0400 Message-ID: <20260507155147.182540-22-harry.wentland@amd.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260507155147.182540-1-harry.wentland@amd.com> References: <20260507155147.182540-1-harry.wentland@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Received-SPF: None (SATLEXMB03.amd.com: harry.wentland@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001CB:EE_|DM4PR12MB6112:EE_ X-MS-Office365-Filtering-Correlation-Id: 4061afd9-e1d0-4943-4e4d-08deac509b7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700016|376014|82310400026|1800799024|3023799003|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: AigfXCFWm6sypfYQIWH3ZE7HkJ/1s1JokSl5RjCH2ljGe2TGvZ/J95f9iKq53gslfEPOX+zYuBz5MD2IcDX8UzwdjFgs8hwnUaVQhClbbv4C1rDPG4ljpAVK3bSfsmY050Bh/Dli2YmOO0iW7uJPKyflkfsrwjCWJQI2SsqCG3ia4W0Zdq3w/KQZun+GNWIhy3JWvS0FNNWDLWwk1vv7Wx/ydkrteyDrbEjA+VFfc23lQWaGEzaEsnoQPzFdOGzl3QEkdqzPf6JqOvmpwXL49vHpQ/AttM3yRPU2D4Wmdw5Om6ohC2UR5KTakQZUDfuqQ9RSYPF+B/UkmMcGn9Cv2emS+D23F8m6RrvKwYDJlJRWuYJDmrx+B725oMDbT2Vouqz4EJbmyOmlX8AsjHppj9iDAaV9cRZ9z8KoDFi86hHXfz5n6e6/HXMYnqP6VhPmLND5143McR0dvIAmP8i0puTgCiTBoY7wy7K0CHWO6V0dIHykLluWuNf0fX6LtWlGxtwB0mkIhNQzs7OeJlwZOmtwHQOsw8v60db8idmQVW+nl7GBz5FJCxvJ605t42poPeLJNNRWOuMPFj8m/uuLo4Ky+yLCSokuB76CUSk1NpC5b6kNSibN0AaN1EFHp/O4my6ifKS5Lusc14k+Meib/6Pn2kmsjj14q8PetbasSfoegUXmymQTciTI3chNhu1iizq6FdSD9mOCuKBNPiCiUxmGDb9iOFYIGCrQ1RtTmXk= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:satlexmb08.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700016)(376014)(82310400026)(1800799024)(3023799003)(18002099003)(56012099003)(22082099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u6Zy1aCUMTxn2uKVttzA5c1qQgcMR/AdMC95KvlBMkn+7IGuQH8dI8v/9kCuDZV6xuEUF9+yhizgajRRtOxtUx/LWioe4o46LzE6mi0rrn9YllQLwReBmtSwZQ05GSitjTeKlOSQMZEw/tbG6QuL58nlxU2NWv6FD66TXl0ebLwTdwHfHs/chEzTVPdyB3cWyINmhQf8nt/XpYttP8+yP6Uv4XeZtoUxZUQGZZVbqYUhe3qAt5IQjA85AlxZ2rIsWwXqzSX/gOKDk4mULAnIzZGRe3ZESXA50yGJprbaY9oc5w0+axxNnp3YATsD9abNZPbr6MOyiY1yg7Ub2Kks3Rzme8tu3bcOovJdDF63WYGUEUYDnd9uCVthF5RaiNvjfy4MDX/H1HyeWlbCKppIbiXtOP8WbVYGMunCcgOao2FFvaRhI33fW4CAP40RPr0n X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2026 15:52:13.8248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4061afd9-e1d0-4943-4e4d-08deac509b7b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001CB.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6112 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" From: Fangzhi Zuo Add force yuv format from igt for compliance test. Signed-off-by: Fangzhi Zuo --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 28 +++++++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) 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 99d03cb536b5..be4b66b00be9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6933,18 +6933,26 @@ static void fill_stream_properties_from_drm_display_mode( timing_out->v_border_bottom = 0; /* TODO: un-hardcode */ if (drm_mode_is_420_only(info, mode_in) - && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) + && (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A || + stream->signal == SIGNAL_TYPE_HDMI_FRL) + && aconnector + && aconnector->force_yuv_pixel_format == PIXEL_ENCODING_YCBCR420) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if (drm_mode_is_420_also(info, mode_in) && aconnector - && aconnector->force_yuv420_output) + && (aconnector->force_yuv_pixel_format == PIXEL_ENCODING_YCBCR420 + || aconnector->force_yuv420_output)) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCBCR422) && aconnector - && aconnector->force_yuv422_output) + && (aconnector->force_yuv_pixel_format == PIXEL_ENCODING_YCBCR422 + || aconnector->force_yuv422_output)) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR422; else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCBCR444) - && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) + && (stream->signal == SIGNAL_TYPE_HDMI_TYPE_A || + stream->signal == SIGNAL_TYPE_HDMI_FRL) + && aconnector + && aconnector->force_yuv_pixel_format == PIXEL_ENCODING_YCBCR444) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR444; else timing_out->pixel_encoding = PIXEL_ENCODING_RGB; diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 8af11bfda6fe..d871f7f6b233 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -850,6 +850,7 @@ struct amdgpu_dm_connector { bool fake_enable; bool force_yuv420_output; bool force_yuv422_output; + uint8_t force_yuv_pixel_format; struct dsc_preferred_settings dsc_settings; struct psr_caps psr_caps; union dp_downstream_port_present mst_downstream_port_present; 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 49226d6d0311..f10188e567cd 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 @@ -3137,6 +3137,7 @@ static int force_yuv420_output_set(void *data, u64 val) struct amdgpu_dm_connector *connector = data; connector->force_yuv420_output = (bool)val; + connector->force_yuv_pixel_format = PIXEL_ENCODING_YCBCR420; return 0; } @@ -3156,6 +3157,31 @@ static int force_yuv420_output_get(void *data, u64 *val) DEFINE_DEBUGFS_ATTRIBUTE(force_yuv420_output_fops, force_yuv420_output_get, force_yuv420_output_set, "%llu\n"); +static int force_yuv422_output_set(void *data, u64 val) +{ + struct amdgpu_dm_connector *connector = data; + + connector->force_yuv422_output = (bool)val; + connector->force_yuv_pixel_format = PIXEL_ENCODING_YCBCR422; + + return 0; +} + +DEFINE_DEBUGFS_ATTRIBUTE(force_yuv422_output_fops, NULL, + force_yuv422_output_set, "%llu\n"); + +static int force_yuv444_output_set(void *data, u64 val) +{ + struct amdgpu_dm_connector *connector = data; + + connector->force_yuv_pixel_format = PIXEL_ENCODING_YCBCR444; + + return 0; +} + +DEFINE_DEBUGFS_ATTRIBUTE(force_yuv444_output_fops, NULL, + force_yuv444_output_set, "%llu\n"); + /* * Read Replay state */ @@ -3528,6 +3554,8 @@ static const struct { const struct file_operations *fops; } connector_debugfs_entries[] = { {"force_yuv420_output", &force_yuv420_output_fops}, + {"force_yuv422_output", &force_yuv422_output_fops}, + {"force_yuv444_output", &force_yuv444_output_fops}, {"trigger_hotplug", &trigger_hotplug_debugfs_fops}, {"internal_display", &internal_display_fops}, {"odm_combine_segments", &odm_combine_segments_fops} -- 2.54.0