Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp494270rdd; Tue, 9 Jan 2024 10:12:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4QxKmbj1cOdqSqPPmiXoMrbt1zndBvKbQuYJsAUQMOGwaZqulsi8wZa8dip3XeBs7/oW5 X-Received: by 2002:a05:6808:23cc:b0:3bc:37eb:584d with SMTP id bq12-20020a05680823cc00b003bc37eb584dmr8337364oib.22.1704823935686; Tue, 09 Jan 2024 10:12:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704823935; cv=none; d=google.com; s=arc-20160816; b=GotPPN8OrQNBz9j5sGM3pU+c7NuAvPsx6rCnTtx3YHp7P0gXtbIOLI0hVN14ykssZJ dATjTkkFPBCFlA98i3m+phTtqsuViMdEWvsP0NOQ+xsyxzbAS8KH2Hgf0J0VgA83fYhM 0KkwdAex6mB5MP+XI5/cNnoy1odcYBAM9/yP9Ifywma4f8sLfTZD9A8N/6eV+y5SJuBe MhQYLmULa9J8DvHhTplAqULSGz9XBLK1u4QfGsgK+uIVM869nmImbpgYZ1Bv4odsPl2B iTsF23KXuHfJFrV1ptBoG04uqCGUzKh0XFGpOLdA8B9VSRQnWsfgLS0nlE13Q0S3UNIo L2tQ== 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=j5TmlSqr2R0DSFOwP1jgxjjJC7p4LGOYCLeSujiTr2s=; fh=vnyRExF+TaZcJXA/e4cgSa3m5Xa+Ng4WaJ7mAJU0CoE=; b=oRw6qpQpVGtz0YQfw8DB2szW+7C5pgrM9oVfHiP4OHe/E6oLc3q97wmriIhS9cjmTt 5X7w+wJUbPUVWrF5E7akrn78aKZOytPvHMtxbQM5ejs+z5RFcjHTwC6zCSjOHa5rqxKX pzbo56i+Uh9NfIxtCE6ZVmWckLPczih+omXNXSNq9m3sSAbq3H9Sk6KGhB3g0G4WbZlW Emyh9nil1zFGLdpwhur2bPdGc5PUlbuEt2q6jZLO+MORQFSL+KoUYNyt068VvuDuqdq4 DslLFbHUKqV8SgCvC4pqY01SJZEwAoYmqs1rqd1LmMMCuUdsYnW3d15hZzS5ZiOyZRrx FnZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yngvason.is header.s=google header.b=NFyOBa68; spf=pass (google.com: domain of linux-kernel+bounces-21219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21219-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. [147.75.199.223]) by mx.google.com with ESMTPS id x12-20020a0c8e8c000000b00680a23efbbdsi2792469qvb.556.2024.01.09.10.12.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 10:12:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21219-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=@yngvason.is header.s=google header.b=NFyOBa68; spf=pass (google.com: domain of linux-kernel+bounces-21219-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21219-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 6BD2A1C23A1B for ; Tue, 9 Jan 2024 18:12:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF2FC3D0B4; Tue, 9 Jan 2024 18:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=yngvason.is header.i=@yngvason.is header.b="NFyOBa68" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 6A0153C6A4 for ; Tue, 9 Jan 2024 18:11:23 +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-f51.google.com with SMTP id 5b1f17b1804b1-40e4f71288bso9849915e9.1 for ; Tue, 09 Jan 2024 10:11:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yngvason.is; s=google; t=1704823881; x=1705428681; 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=j5TmlSqr2R0DSFOwP1jgxjjJC7p4LGOYCLeSujiTr2s=; b=NFyOBa68JSBivYbQH0MOufyWc2LTeC9fzzWCLqo5MyR8S74VtriYTjyi7CbKsmbxBQ Jo2vJYt6mR0ObOGPBPS4GUthV+fKNBR5PSDA7TFZB88oVG0yLQ5n4KQ9RohvH3OtjMzM ORjB+0Tveacfdk3r8xudlzdIEyKp1O16XIlT4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704823881; x=1705428681; 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=j5TmlSqr2R0DSFOwP1jgxjjJC7p4LGOYCLeSujiTr2s=; b=UjlI3n2DCcABYX77Zku1GgjIFWgqNz4yx+sG2kGLNGFolZLp8ZSjCQ2uFGDpXaPHZ3 Wt0eDhXypwtdScLrKBC4rSQ+vVvYE3yyJ9lokjCChiunGcYev1RNO+IwOi4B6L+R4Nbc AZLC2zZy5JmpEyDPhcEEFAY03PUsOyVmEitk2JpLPjZwiflybYSa69d5j4m5lQrArv3g UBjDo6qdNFdCVQCK9bdGVxTISrjbL5dpk4uQewVrvzFFcP5jWwLs3MXrUOL/yYibR6cP VNq6U/YdwIpbLy3eaTvF90Rjk0VzLt9p1vm5Y6Ab05xgIVhZHZLYxnxp5fyUZMZUVAU6 IGMA== X-Gm-Message-State: AOJu0Yxh50Crrb6xZa2uZ6QDAaU2dPClHq/iSRP4WA34CxuWv2Vjib+7 JvQxaYvC7IUyqnrThW+mOUA6gN0piOTt0A== X-Received: by 2002:a05:600c:468b:b0:40d:8909:b3a3 with SMTP id p11-20020a05600c468b00b0040d8909b3a3mr2205592wmo.20.1704823881662; Tue, 09 Jan 2024 10:11:21 -0800 (PST) Received: from andri-workstation.turninn.appdynamic.com ([2a01:8280:aa07:ad:7285:c2ff:fef0:4baf]) by smtp.gmail.com with ESMTPSA id n25-20020a05600c3b9900b0040e527602c8sm2104579wms.9.2024.01.09.10.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 10:11:21 -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 1/7] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check Date: Tue, 9 Jan 2024 18:10:58 +0000 Message-ID: <20240109181104.1670304-2-andri@yngvason.is> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240109181104.1670304-1-andri@yngvason.is> References: <20240109181104.1670304-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 | 5 +---- 1 file changed, 1 insertion(+), 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 c8c00c2a5224a..10e041a3b2545 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5524,10 +5524,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->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