From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 82E93FD7F9C for ; Fri, 27 Feb 2026 19:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JGfV0R4Z96tYL3Bf2XqpwWlEz7+KZEZ8gusjeuqSK2Q=; b=36cODQf7CYDjDFv7NezE+HzTxs zoWM9/fA+TjgLLuP7BEcaLXiztbKh0qHxmtw85CkLNxlSWK5j0DTMnf86RSkD5YCvDyBOcoQqm7KV oQ5D46C4Ugbpng8N3V8VSxGnXl+RQgoav8jab+aro7HpkmU3FV8l6b2y8SPCR6ajuQFje4CL8Qc5M 81jlj+XBRMBK3z4wZyWOX2TtWkEG1/j/EKyFI4WzVynO85u8vWV/iJgFtw6yRPhmjPNNgsHctfJyu GmKJ135zvc26qsJtZvqEzBQ5FYahDKCuikpPlLi6APhYoUReuEdzhC+fcAV79KhboCosbJmOR9y3i Yl3/zZRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw3P0-00000008xAM-0489; Fri, 27 Feb 2026 19:21:30 +0000 Received: from sender4-pp-f112.zoho.com ([136.143.188.112]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vw3Ox-00000008x9z-1NlG; Fri, 27 Feb 2026 19:21:28 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1772220043; cv=none; d=zohomail.com; s=zohoarc; b=JGMRsMIfxoMGP7fGDGO2Q7Rrvv/gpLTotDfrBB329bKfFs25d+EweSKGqRNx9hsT1do2/M3GbcuY2gsYAe95osj8r9iQVV7DfqwKbRXxYcE8b/9GltpsouKK7/9o2oeQC3eCMy5RTjGVvGEH2wwEwhH6wWm2c9WgsQD5d4zYKa8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772220043; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=JGfV0R4Z96tYL3Bf2XqpwWlEz7+KZEZ8gusjeuqSK2Q=; b=nfczNW1oUkfsGqeRzAuLYebcpBi8Cwb4VHh29XovLBYFptoS6j/u9pAJpUGGpi5EVM8dua5EXN4+c71iXBUFWrM7gEomwe4jWoTxX6U7W2BiF1w99I0QA2P1/5OScbBry0mIKiDbAlvvJPUqiI9GyX+VoiF5uBeMJgajyofNS64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1772220043; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To; bh=JGfV0R4Z96tYL3Bf2XqpwWlEz7+KZEZ8gusjeuqSK2Q=; b=ALaO+RUuvYXGccCfTACukQlAU1epUJzVVUVcLx7JaYhVdSGzH5eqWpF+hXbcvWDi oeG9mu4TYQH/wQuBcsrxDqDEnCmdj66BS6JNnhpa36EHEG6zgTZeJtpGnUwC4QxIEz0 JMBq1I/4Tf6gi5e/bQO8pIbdyI3P1drCH/uW1dls= Received: by mx.zohomail.com with SMTPS id 1772220041335611.1012695620195; Fri, 27 Feb 2026 11:20:41 -0800 (PST) From: Nicolas Frattaroli Date: Fri, 27 Feb 2026 20:20:06 +0100 Subject: [PATCH v9 01/19] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260227-color-format-v9-1-658c3b9db7ef@collabora.com> References: <20260227-color-format-v9-0-658c3b9db7ef@collabora.com> In-Reply-To: <20260227-color-format-v9-0-658c3b9db7ef@collabora.com> To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Dmitry Baryshkov , Sascha Hauer , Rob Herring , Jonathan Corbet , Shuah Khan Cc: kernel@collabora.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-doc@vger.kernel.org, Nicolas Frattaroli , Werner Sembach , Andri Yngvason X-Mailer: b4 0.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260227_112127_445892_6493440D X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Werner Sembach Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check that was performed in the drm_mode_is_420_only() case, but not in the drm_mode_is_420_also() && force_yuv420_output case. Without further knowledge if YCbCr 4:2:0 is supported outside of HDMI, there is no reason to use RGB when the display reports drm_mode_is_420_only() even on a non HDMI connection. This patch also moves both checks in the same if-case. This eliminates an extra else-if-case. Signed-off-by: Werner Sembach Signed-off-by: Andri Yngvason Tested-by: Andri Yngvason Signed-off-by: Nicolas Frattaroli --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 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 2fe9044e1e91..6eac9a273f87 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6718,12 +6718,9 @@ static void fill_stream_properties_from_drm_display_mode( timing_out->v_border_top = 0; 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) - timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; - else if (drm_mode_is_420_also(info, mode_in) - && aconnector - && aconnector->force_yuv420_output) + if (drm_mode_is_420_only(info, mode_in) || + (aconnector && aconnector->force_yuv420_output && + drm_mode_is_420_also(info, mode_in))) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if ((connector->display_info.color_formats & BIT(DRM_OUTPUT_COLOR_FORMAT_YCBCR422)) && aconnector -- 2.53.0