Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp621706rdb; Mon, 15 Jan 2024 08:07:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXNPLPZfKyXWyqrIUj1ioGl75KdWTkVsd+gq+Q+QX3o1Gr/lDri/+YMX+jzKD49F8TPWMt X-Received: by 2002:aca:230f:0:b0:3bc:202a:e1f0 with SMTP id e15-20020aca230f000000b003bc202ae1f0mr6221213oie.52.1705334852004; Mon, 15 Jan 2024 08:07:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705334851; cv=none; d=google.com; s=arc-20160816; b=VdFGW31e0Mkq0HjDsXq+JQTj3aVhlX0vmRMvSAdnQ0K8O0hqcpGZ6zNbImJYC7xOxT clOaYXB+uxXCF2mUgOecYFJWJGRaJNmHHz+XxyyNetOif2F/7svEmUnkEDeD2XWtKZGk //ZWygC7EMDiAIVz1AfQkJ9MrJ35PM3Xs+y6R0hqBTX/rwL+VnQAzzcUppJZ5ttFjt8B U2IkqwnV6GA+l+aE2/aHXi0sfJVRcPN36pyxUeA1cQH/L0Izw6+JeuNhZO8bRslaObUN A9w9HtTIGjxeX7W5aRjMGHPsj0xUhKwzuJjtBwXqJH7MZ8v16OHQcFrv8V1+zXI5xpgN 17Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KS6uEFfS17C84C/JkCgS0wU+p+hCSHHIkna0klpWICo=; fh=vnyRExF+TaZcJXA/e4cgSa3m5Xa+Ng4WaJ7mAJU0CoE=; b=uSsgoA72fzPp1Q6Uu0IScb/nuMNVLLSVOrVnGa9xGt3MelMF5cfujRIpqKhDhsKukt mfFDfznbfnBWnRqdQEJ7ZoZncXzCqK/V8LvNjZpl1odhC/JZ7TgLfAVdRtqOKHmPzTDG bZYBLy6RUP+vlIgo46gUAF+M8t7906ReubjongaPJgiRYMFfNouNZ22fu53MLMzdy4QA OYcDoafutxDsMfQsDV8YF0z6V3VngIBg2mT85JNX2KJk5NZlgf2A8zEuG2FmTmkXE/6z e6Qx8BgeUYnUKBpoJPJzXjMcHEA2JPMLDIwwgD0VVAFSo3bwCwr9sQChSU73hytHcHEn vy9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yngvason.is header.s=google header.b=IBpUvbjF; spf=pass (google.com: domain of linux-kernel+bounces-26219-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=yngvason.is Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w13-20020ac857cd000000b00429feb2fc47si293879qta.373.2024.01.15.08.07.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:07:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26219-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=@yngvason.is header.s=google header.b=IBpUvbjF; spf=pass (google.com: domain of linux-kernel+bounces-26219-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=yngvason.is 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 BCF911C2159C for ; Mon, 15 Jan 2024 16:07:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE5DF182A7; Mon, 15 Jan 2024 16:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yngvason.is header.i=@yngvason.is header.b="IBpUvbjF" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D4DF1802F for ; Mon, 15 Jan 2024 16:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=yngvason.is Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yngvason.is Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-40e800461baso4099925e9.3 for ; Mon, 15 Jan 2024 08:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yngvason.is; s=google; t=1705334799; x=1705939599; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KS6uEFfS17C84C/JkCgS0wU+p+hCSHHIkna0klpWICo=; b=IBpUvbjFF1VwQWOu945p9bQfwFn7nh+nz7kYiV0HQol0DcWV1O00cuZ1NWKk/gKrs/ VeRjFFZdMdC4b8qVqyykSsry/Awd15U1H0/R9V4rW2Zx9VNyiuECJ+kWrrqG+a40Wzd+ 3RuPHZwfuzmmdwBLwEEYU8hJg6D5VlZUMMh1M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705334799; x=1705939599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KS6uEFfS17C84C/JkCgS0wU+p+hCSHHIkna0klpWICo=; b=NNFjvH+I1wjMKABjuFzm+TUg0QU1NoPPJcbSVzc3mQQOzRpaDejjjQyVMU7NLwwGrd 4okwEOtaQfIFHRvJ1SVOZuGppBLs8gdljBGutxFq41tXMmomwXABg1n7NCN75VXTrTyS uDmOWD2lRWvh9M4FT4/F4EuNbfppJ+0sNqzKO22g/3T824JZ/GSq3kQIQHd3jSwfL8TT nwYyc1+wq9j8nWIfBXP4i1j4LerGfYuiTC+MxPMgGbuCiRawE8cmghAERZpAohG0+w6u /W/UF61ZkRqA0PWgJ/5FAoVO3QbVwksM3zgVyIUrCL/EInat08Q/XeJvQYhDxzfqRKg/ 8RrQ== X-Gm-Message-State: AOJu0YxZMT7hjn5ouA6CC5xjmCOud37FIhA8bzrz0VnatOIWw0Z9TFi5 h00NDCr3d5pRuiZiDqE8fwcYG5WNk0vdWA== X-Received: by 2002:a05:600c:a0e:b0:40c:34f9:6c2a with SMTP id z14-20020a05600c0a0e00b0040c34f96c2amr1712919wmp.159.1705334799361; Mon, 15 Jan 2024 08:06:39 -0800 (PST) Received: from andri-workstation.turninn.appdynamic.com ([2a01:8280:aa07:ad:7285:c2ff:fef0:4baf]) by smtp.gmail.com with ESMTPSA id l22-20020a05600c4f1600b0040d6b91efd9sm20174140wmq.44.2024.01.15.08.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:06:38 -0800 (PST) From: Andri Yngvason To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, Simon Ser , Werner Sembach , Andri Yngvason Subject: [PATCH v2 1/4] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check Date: Mon, 15 Jan 2024 16:05:51 +0000 Message-ID: <20240115160554.720247-2-andri@yngvason.is> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240115160554.720247-1-andri@yngvason.is> References: <20240115160554.720247-1-andri@yngvason.is> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +----- 1 file changed, 1 insertion(+), 5 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 f6575d7dee971..cc4d1f7f97b98 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5575,11 +5575,7 @@ 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) - timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; - else if (drm_mode_is_420_also(info, mode_in) - && aconnector - && aconnector->force_yuv420_output) + || (drm_mode_is_420_also(info, mode_in) && aconnector->force_yuv420_output)) timing_out->pixel_encoding = PIXEL_ENCODING_YCBCR420; else if ((connector->display_info.color_formats & DRM_COLOR_FORMAT_YCBCR444) && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) -- 2.43.0