Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp505047ybf; Sat, 29 Feb 2020 08:32:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzlVpJimFpo0zwR6Nn2GaS2XFS8Uxj9NLpo6CDD+SbrMv8hpNwWF0CHKKiMq1iTtCJvTWkV X-Received: by 2002:a9d:2264:: with SMTP id o91mr7320432ota.328.1582993970435; Sat, 29 Feb 2020 08:32:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582993970; cv=none; d=google.com; s=arc-20160816; b=OvOgga0s63dqhVuuUrN3gE+XvPX8YOd0pO5LUL43sJMC6GSU4jFa0zoTHRKik4C33y G2XfFcD3jCG0EPtTk/yY1EU3uiSJVfNR0Jq63O+r1IYFhYhnOXWzC2A05mwDN4CkDhdh tW1hSNf+ayu7W0N+BPmTTBns3ZuH6b2lSoPsH1XnrinyXt3eJdUq29I+LMA5ust6Hy+i c38RxByQh4TZXTOe81l4bVftYBo9lOG5MSCyX4vvTq+++J1N7OENV5JYtlKZB4ZgJyK0 2tZafD5hoGTGHfdNul6hJaU5GzPMcdMmPkqlPcXQ/OQFtCpwpcYT4+3ZCTYO6BsVXhte me/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4hH7W9HGr3GNdsBMYgQBMhAe4w6SyyPjZQTFfnpXw0s=; b=rj/NkP+Sy2iGqgTDJwTC1hGCRN4B5gM4i9PfXrKj/rhdvTeYizk3AFcZaqqmZi6vZA UC6+ykEZnN9KSMIR6ZcviHmQXjLQTnwCzO+X/zV467zOA9X/d+CsX4yzPMKZkAP737MI yZjZTpSHfD5Ae+vqgFBfT7f7TpUGJLtZB0gra91qa4qNiZkx2eCbjFpnY9vYShWpiyUQ WdZHkhueUqABUlL625EoSHxsB70QApsBi0tv0iLbP7KaZlWj/E2nrGwEZ4/D/nIrde90 jV51CCxqBLkmGl++vKeSa3raacNEZOMn2d59zHfQ20XJ9lXUUBu5zrPB1OeKC4NX39xh 5UHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 104si3297943otj.252.2020.02.29.08.32.39; Sat, 29 Feb 2020 08:32:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727405AbgB2QbK (ORCPT + 99 others); Sat, 29 Feb 2020 11:31:10 -0500 Received: from mailoutvs5.siol.net ([185.57.226.196]:46091 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727326AbgB2QbJ (ORCPT ); Sat, 29 Feb 2020 11:31:09 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTP id 88FF25235E3; Sat, 29 Feb 2020 17:31:06 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta12.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta12.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ug3nAeh9AHRw; Sat, 29 Feb 2020 17:31:06 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTPS id 3DB97523546; Sat, 29 Feb 2020 17:31:06 +0100 (CET) Received: from localhost.localdomain (cpe-194-152-20-232.static.triera.net [194.152.20.232]) (Authenticated sender: 031275009) by mail.siol.net (Zimbra) with ESMTPSA id B66655235E3; Sat, 29 Feb 2020 17:31:03 +0100 (CET) From: Jernej Skrabec To: a.hajda@samsung.com, narmstrong@baylibre.com Cc: Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] drm/bridge: dw-hdmi: Fix color space conversion detection Date: Sat, 29 Feb 2020 17:30:41 +0100 Message-Id: <20200229163043.158262-3-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200229163043.158262-1-jernej.skrabec@siol.net> References: <20200229163043.158262-1-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, is_color_space_conversion() compares not only color spaces but also formats. For example, function would return true if YCbCr 4:4:4 and YCbCr 4:2:2 would be set. Obviously in that case color spaces are the same. Fix that by comparing if both values represent RGB color space. Fixes: b21f4b658df8 ("drm: imx: imx-hdmi: move imx-hdmi to bridge/dw_hdmi= ") Signed-off-by: Jernej Skrabec --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/= bridge/synopsys/dw-hdmi.c index 24965e53d351..9d7bfb1cb213 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -956,7 +956,8 @@ static void hdmi_video_sample(struct dw_hdmi *hdmi) =20 static int is_color_space_conversion(struct dw_hdmi *hdmi) { - return hdmi->hdmi_data.enc_in_bus_format !=3D hdmi->hdmi_data.enc_out_b= us_format; + return hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format) !=3D + hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format); } =20 static int is_color_space_decimation(struct dw_hdmi *hdmi) --=20 2.25.1