Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2095363ybf; Mon, 2 Mar 2020 01:47:27 -0800 (PST) X-Google-Smtp-Source: ADFU+vtu8kEoS5e2HjW3U3IA4UocWaV7eX1/6SHMqTt3j8V6RP2OdHVEH/Go1fE3TiEwOdMcmWV6 X-Received: by 2002:a05:6830:1e58:: with SMTP id e24mr2050094otj.267.1583142447469; Mon, 02 Mar 2020 01:47:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583142447; cv=none; d=google.com; s=arc-20160816; b=CHfH8n8q9iJNMHMFbS7Iex+loc8OP2ym4oiU78j3iS3slacl0QltUIF8Bk5Ep3YDQ4 WBokwDPu69gp0+HuCHPL442hpY0XHTf6A4DuuoxxfsV1rinskMZo0dEx5QJIZ/ATwcf8 hO7b9TPSO4WvIua0+acUx1NRafMz/AwhEGAqz3IwuzuKsKpyjM2+1b/x8hhzu71j4v68 uwGnO/qLSfq7IDOvO1Bhkcff5LFgskzCEslE9z+ZGQ9G2ZRMkiKfMq3GN3VsWzUEqjao uKirGn/91BsvVsw8kYIFz7ZKeH+IZW78Czn8c6Iyi5hUeOQIrnb8J93gKN/wNcEVh8r/ rt7Q== 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=7xGK1/oQ/6awvu9fV2IRX4YBIrF+0lNqbNMdATTfO8Q=; b=xI9P9f1jW3BWBENxAbJQ5a7Packs58v8zfmktCbf0WiFrpVVYlczF6PTifSgbyEjcV +/E7n4iaEVubSt4f235f2I97H6Q8WtJp50ImHSFo8aZBrTp2VNou9JoG9uMc4/A4gxMe 0g98bbVhvrxb+jY15n6YuigfDwrgulc/OyJ8LNdGILVpJ7jLcU8SPvwOWKX6Tf1yiG4B LEWeEZZi49/FehSXp2MrbWQyDRNGTh7UZWeSkUj2EQH0tw1OklKu3Nt3+ldaaYr/aX5Q 28uKs7RWO1vb4LGIT2g8SBYEy8LzKR61Xy0ZlG+qfCmf5/lSQ5sfPB1gjyxkCsReFDFp TUzA== 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 z15si6016321oih.41.2020.03.02.01.47.02; Mon, 02 Mar 2020 01:47:27 -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 S1727532AbgCBJqy (ORCPT + 99 others); Mon, 2 Mar 2020 04:46:54 -0500 Received: from mailoutvs21.siol.net ([185.57.226.212]:42100 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727490AbgCBJqy (ORCPT ); Mon, 2 Mar 2020 04:46:54 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTP id B64A852352B; Mon, 2 Mar 2020 10:46:50 +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 LKSd7f3jTVIM; Mon, 2 Mar 2020 10:46:50 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTPS id 5AE61523492; Mon, 2 Mar 2020 10:46:50 +0100 (CET) Received: from jernej-laptop.localnet (89-212-178-211.dynamic.t-2.net [89.212.178.211]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Zimbra) with ESMTPA id 7D37A52319A; Mon, 2 Mar 2020 10:46:49 +0100 (CET) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: a.hajda@samsung.com, Neil Armstrong Cc: Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] drm/bridge: dw-hdmi: Fix color space conversion detection Date: Mon, 02 Mar 2020 10:46:49 +0100 Message-ID: <791571909.0ifERbkFSE@jernej-laptop> In-Reply-To: References: <20200229163043.158262-1-jernej.skrabec@siol.net> <20200229163043.158262-3-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neil! Dne ponedeljek, 02. marec 2020 ob 10:26:09 CET je Neil Armstrong napisal(a): > Hi Jernej, > > On 29/02/2020 17:30, Jernej Skrabec wrote: > > 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) > > > > static int is_color_space_conversion(struct dw_hdmi *hdmi) > > { > > > > - return hdmi->hdmi_data.enc_in_bus_format != > > hdmi->hdmi_data.enc_out_bus_format; + return > > hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_in_bus_format) != > > + hdmi_bus_fmt_is_rgb(hdmi- >hdmi_data.enc_out_bus_format); > > > > } > > > > static int is_color_space_decimation(struct dw_hdmi *hdmi) > > I think in this case you should also fix the CEC enablement to: you mean CSC, right? > if (is_color_space_conversion(hdmi) || is_color_space_decimation(hdmi)) > > in dw_hdmi_enable_video_path() otherwise CSC won't be enabled and will be > bypassed in decimation case only. > Missed that one. I'll fix in v2. Best regards, Jernej