Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp437117pxj; Fri, 11 Jun 2021 02:59:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAY0YVt12FDTV2rQeGKbD73Qcyi5RijNIZvtV5/TGZdQ4afspCI0xpDBmmPDm+pYH5Ze1A X-Received: by 2002:a17:906:4483:: with SMTP id y3mr2999503ejo.92.1623405589666; Fri, 11 Jun 2021 02:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623405589; cv=none; d=google.com; s=arc-20160816; b=cL+UdsXkTv4XOKXJ6bkfmfvAugqj4NSJ4QUd7QYKsz2MYYw9psF4gu0QxVfgftLhoq 71lNq1vTSRb/gwrnqfRIfD2A8p26ENww/YTgQMX9jDf9umCkn1N3e7IeuznTvecwgboV KKw3br4FoV636BD0fjP3+ASHfx+xaNtoSrErqscYAOwfT/H7qsX0Vt1ZAYxlo3xx5Xst hqzzCZc7zFFUUwWWhMTz22eOYrPiyFbjcK4VIm/yftFBDLjGPzu5Bx101DSX2sps977Z 9H+Hj+uC3G9eCz3XkA1/tMEbNfp7EiETz09eQHxIaekqXzxlE3xfaBdCpmGmv/tbTjId l8Tg== 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 :message-id:date:subject:cc:to:from; bh=3oYxbWictTDyltxR5sg6cosrrD9QgoZ1CGW25Yd9gvg=; b=Hc/wLPdWpJM6TmOoVOCisHlzhveBeMT4EP1KDJ7YqztTiC40nozdJeWE6DUuX7Qu+L gOGw8JdX6amC21uzrRJ/IbkKwzG92fNDn+sszuCStK4o0kaJTPSRe47OE7Y50uCJoIdk eLpcewAHTPp/3kMfcEHEYoAY+75bhWaisV+rJO6r1Scx3TBcrXqfOjjxrI4IHcWZElXX POrHw5vujxx96QNCgD42+8JWC0AP62ypUG2L8J5nDnnFaKvcms3CQCRGv+3q9pG1wEjL 3C4InqjNKegBZyn3L9eMG4NTD6DSwdLExuEzE7aFC/8tHLKUkgO0V4hhMjNy8dEl7Btx X3FQ== 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 y13si4411725ejk.111.2021.06.11.02.59.27; Fri, 11 Jun 2021 02:59:49 -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 S231145AbhFKKA3 (ORCPT + 99 others); Fri, 11 Jun 2021 06:00:29 -0400 Received: from srv6.fidu.org ([159.69.62.71]:60874 "EHLO srv6.fidu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbhFKKA3 (ORCPT ); Fri, 11 Jun 2021 06:00:29 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by srv6.fidu.org (Postfix) with ESMTP id 144E4C800B7; Fri, 11 Jun 2021 11:58:30 +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 sW16WlGy1DhK; Fri, 11 Jun 2021 11:58:29 +0200 (CEST) Received: from Lyrae.fritz.box (p200300e37F4f6000f5f44cdd80159770.dip0.t-ipconnect.de [IPv6:2003:e3:7f4f:6000:f5f4:4cdd:8015:9770]) (Authenticated sender: wse@tuxedocomputers.com) by srv6.fidu.org (Postfix) with ESMTPA id BAFB2C800AF; Fri, 11 Jun 2021 11:58:29 +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, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Werner Sembach Subject: [PATCH] drm/amd/display: Remove unnecessary SIGNAL_TYPE_HDMI_TYPE_A check Date: Fri, 11 Jun 2021 11:58:26 +0200 Message-Id: <20210611095827.1109298-1-wse@tuxedocomputers.com> X-Mailer: git-send-email 2.31.1 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 652cc1a0e450..dc18e6c2e698 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5163,10 +5163,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.31.1