Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp404289pxv; Wed, 30 Jun 2021 08:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsjrv7egShlo7oqNbOfnjaxP2rD1E4JoByfJwn0HT/zLfLimI4gCvML16LbHMIyH386vYI X-Received: by 2002:a17:906:7302:: with SMTP id di2mr34985030ejc.409.1625065918257; Wed, 30 Jun 2021 08:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625065918; cv=none; d=google.com; s=arc-20160816; b=r/XzmZzzox1wfiyiHUdybCs195UKrDkMIXE2Nq6bOX6TPREbNAl/zjtBQVeFM+yj7N 72OXKREvQkxEU3ql1uRMyNp3dqq3wVlVNta18HyC+hEQ/pN6pepZ2l5Hf99fJleMikDV 6D/6d6eAp7Kbis+Ex0tCEr4xwM6yRszWoUjMHXbsgaAB8hhU09PxA0bfcGMXwO+aeco5 plWvimgoxRKQUMX3HiQi/vxtaTAYAY0V6kUpCMfcbn2LmKJbNpnIZuFCgjAnk8XG5ex+ w5k59UBzuUjXQdOgx7IUMiSYKoChiCJVZKiu3t1Hb2jKRuvOaHUTCpzsU/vKRJ6ULLCq uoVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QRYILhtau3QIWqD0bglIc87e4BuueSf/67BREId0UlI=; b=vbcvmiGj0FBrAppGt48kLaNZbe1BltYmcLGerVPoS3ik3Y0kulS3lI4RW/iWpudAvH XZlr72ZB6inYLzEXLERQmpn4dXH3ouRuq07+Q+Pl707vEF7MMAvk7ndbFXzu526SDscW qJpFkmNcBJarB2iwY8LH2+yq1PAv3ZQIndQ90VN//HbkUQV6MUgtMaO8JDa7d847cfhd 0a3fQXgYxHtILFkd7XRrlV7aiiJP8MQP6R0WkN1K0WcIWZfGt50o7UhqhvfXnNZj8n/U W5HDkOWamBKcPz/KZC/g2ZLntUBkD5Ez9PWXPMwpmWybreCaKo6wXpraxQ9aXU1DH4rY Dg9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si5671153ejy.290.2021.06.30.08.11.33; Wed, 30 Jun 2021 08:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235860AbhF3PND (ORCPT + 99 others); Wed, 30 Jun 2021 11:13:03 -0400 Received: from srv6.fidu.org ([159.69.62.71]:45238 "EHLO srv6.fidu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235752AbhF3PMz (ORCPT ); Wed, 30 Jun 2021 11:12:55 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id 77EDAC80068; Wed, 30 Jun 2021 17:10:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at srv6.fidu.org Received: from srv6.fidu.org ([127.0.0.1]) by localhost (srv6.fidu.org [127.0.0.1]) (amavisd-new, port 10026) with LMTP id TBGbVrtUKNB0; Wed, 30 Jun 2021 17:10:24 +0200 (CEST) Received: from wsembach-tuxedo.fritz.box (p200300e37F394900095779a208783f8e.dip0.t-ipconnect.de [IPv6:2003:e3:7f39:4900:957:79a2:878:3f8e]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id 1D42DC8007C; Wed, 30 Jun 2021 17:10:24 +0200 (CEST) From: Werner Sembach To: harry.wentland@amd.com, sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, emil.l.velikov@gmail.com Cc: Werner Sembach Subject: [PATCH v5 01/17] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check Date: Wed, 30 Jun 2021 17:10:02 +0200 Message-Id: <20210630151018.330354-2-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210630151018.330354-1-wse@tuxedocomputers.com> References: <20210630151018.330354-1-wse@tuxedocomputers.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 10f878910e55..e081dd3ffb5f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5348,10 +5348,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_YCRCB444) && stream->signal == SIGNAL_TYPE_HDMI_TYPE_A) -- 2.25.1