Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2082980ybf; Mon, 2 Mar 2020 01:30:06 -0800 (PST) X-Google-Smtp-Source: APXvYqy2tAHNcMw/xGGj4M+brDTT8JJ5IAeRdNIU5XDCz77EjgOssDuY0fnU65Ef4H+BVpcJMnA4 X-Received: by 2002:a05:6808:45:: with SMTP id v5mr10456206oic.90.1583141406867; Mon, 02 Mar 2020 01:30:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583141406; cv=none; d=google.com; s=arc-20160816; b=TzmUTQqQq6hILAC8ZnhpnG1pb3d+zv1DR9qMdpTMOyyc5FiwQZSrAiGb8CzRoRDxcK 2UzQgMhEH5UveQ2QYF2A8S9HswQG2/eekpa21BOOiozU/pLEoj4sR1gQNRt7pWDzZSZw 9TFhll3y8k0MjLen+eVWSP5IzPwoQTP0ELgzM2KEUdvLxXFS9DI6wimTNUVsdK/ISGTX 0RB5SIZfiZFNNe2/RTWDEWj/WtRSjUGJhRixP/yX03VuBvEa2BMx50zcSD3burzxY2dr uxOifSgXbmq2ok2q3whFkq7PkKyJ8TXzimmM6siD8UJE0abMjw82X11ObiUQiMVhKGLP U6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W4nGxzbkKvlzQfZWSmZbTuy9xjQFHkbmHmf0/TQn69w=; b=J5t8kJEuhdSs5dwkuW4s//LhhGIQdiub3OeCE5OtjL0/IBkCjAUvr0fykdyhMYTAs6 MKfWbJGqjEde6sQUEYfZNuTvDKUpW3Okt1VJ4CM5HIT5mW2HuwsK3Mf+5kPrvNefyekF 3YSvR7Y4NjehE48hbpn6RvjsAOWPGFxu4D4ULcgeOnnxg74uJBlyAwsvyq8vjh9ubHt4 5szJWzc9nKPEqvfiHpocACkozVZkdPYR3bfHz8ZSoteYXQRnp602IEsGA+Ora3XiraRa 7ahh2T5sJZOXqVZOfJFo5Qq1HRwLIBUcZts/FEn/kXeKf1gN9h1nyUAo1E0NZGfwLSgv DREg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=skswSqAQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si6258572otm.168.2020.03.02.01.29.54; Mon, 02 Mar 2020 01:30:06 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=skswSqAQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727509AbgCBJ2W (ORCPT + 99 others); Mon, 2 Mar 2020 04:28:22 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:50494 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727450AbgCBJ2O (ORCPT ); Mon, 2 Mar 2020 04:28:14 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 178FE54A; Mon, 2 Mar 2020 10:28:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583141292; bh=9ZqrQgN1kicNCFdvQnafSQx8lmmfNjFur/cYDbP3rDY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=skswSqAQuA8w3fEw57iweTsG5i9uxgyuyyKNg3OiEsiYEb0M3CjsQQczW9udnAGEr T2HSEz9s35KdPJUtHRFZ5Wm2YwCWHcLEITfyn+nNW7CqkZe5EGYbEb/hiEAjsId6bv HuOSO3bAcOeA8l0Ibo4SK095T1jkIsyXt2Q/ZZ08= Date: Mon, 2 Mar 2020 11:27:48 +0200 From: Laurent Pinchart To: Jernej Skrabec Cc: a.hajda@samsung.com, narmstrong@baylibre.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 Message-ID: <20200302092748.GE11960@pendragon.ideasonboard.com> References: <20200229163043.158262-1-jernej.skrabec@siol.net> <20200229163043.158262-3-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200229163043.158262-3-jernej.skrabec@siol.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jernej, Thank you for the patch. On Sat, Feb 29, 2020 at 05:30:41PM +0100, 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 This isn't implemented today, but could the CSC be used to convert between different YCbCr encodings ? In any case the patch is correct based on the current implementation, so Reviewed-by: Laurent Pinchart > --- > 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) -- Regards, Laurent Pinchart