Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2078604ybf; Mon, 2 Mar 2020 01:23:32 -0800 (PST) X-Google-Smtp-Source: APXvYqyw0B+nTLYyr78DN5m25vw3SVmZXNdBjyivvrbgmdIdAG4260aOppQZzdIj7mdGMwCEyqiK X-Received: by 2002:a05:6830:16d0:: with SMTP id l16mr12817082otr.83.1583141011965; Mon, 02 Mar 2020 01:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583141011; cv=none; d=google.com; s=arc-20160816; b=ZGFS+tmhMzsWbhN345iGH7HSwu17N6H2/niIP3MGOcUGbPHLbBknrzdsKF0FLkC3Dz wD2i+MJ8e5zDWp+3OtjtGUDVQZ1qYxGa/m4NYPuhvR//ZbkTmKA+bjKKIpTVh+tQB5Es piTYblV0xUXvGgUpeBw8OxP+XbXHOLGJO/Yr03ZtU3C9gxwb3y7IEc8ypr6F3tcVjp2J kZr2g8rpsqDuM00pE0R7WYpjakffO21ru3ybs8/QeLDV+F3/rrlu8BLh5hMZoz8J6K35 ydjYkIxmdzdzEZpQX4zoHpeJQz0ctTjsb3Y2IwLnfbA4GKSEfwPLvDf92O+BQK7+Gfl1 beOQ== 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=T1tRaPEdr2iWTPjkEKmnARdWCmz59q5szSunwBG8hPs=; b=NwVJl624osQP5lRX3UOFypijvNy22WMfEoDs236hhJ9nxP0+sbaLj0+JCz3dXDqhkl 77ZggDobqd7UPbPgiIub5/TbewqGa3/hdJoMDYtRp5ypFxWcsxTRYWm8LEgGI4A/oj1u Hs0ZwfNPzUfBHZhiL08AUxG1KUE04Th4UiMntsF8NI1m15BDLdJ/fwblMIqEC/8WNnJi XVPym+ict7yv6ueX11FQ12ISHLeWA+ybAu+/q10HBcDCM1bcVzDhA4SJdPmMwpyFa8ra V4dMQhxAKznRi89xx+LZXm/x0s80lIraVmWj/zQAax40CwKQkUiFDfeMbGvr8fM9/D9y pxLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OoC7vyus; 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 o15si5769369otp.314.2020.03.02.01.23.19; Mon, 02 Mar 2020 01:23:31 -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=OoC7vyus; 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 S1727115AbgCBJVv (ORCPT + 99 others); Mon, 2 Mar 2020 04:21:51 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:50334 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbgCBJVv (ORCPT ); Mon, 2 Mar 2020 04:21:51 -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 B6E8054A; Mon, 2 Mar 2020 10:21:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583140909; bh=8sq1wDdWf+IVF9oWteFhFDTlL94c/C1RhHDt8Q2EhfI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OoC7vyuscxZDXqoEVaQGvn9gvbAyD6h838LS8clufvzeozKixYdGRw7UItBlKPtZ9 NDFyfW1oHzTXMajaI3mWvg4qdNBz9fSu1M5yDCA1tCILZy2ywcAB+z5Jf9CSoZaluh FZQbY2dC1sPD0sDcw0mYh4Gp6eo/zMFnnHKzzXVY= Date: Mon, 2 Mar 2020 11:21:24 +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 1/4] drm/bridge: dw-hdmi: fix AVI frame colorimetry Message-ID: <20200302092124.GD11960@pendragon.ideasonboard.com> References: <20200229163043.158262-1-jernej.skrabec@siol.net> <20200229163043.158262-2-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200229163043.158262-2-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:40PM +0100, Jernej Skrabec wrote: > CTA-861-F explicitly states that for RGB colorspace colorimetry should > be set to "none". Fix that. > > Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") > Signed-off-by: Jernej Skrabec Acked-by: Laurent Pinchart > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 46 +++++++++++++---------- > 1 file changed, 26 insertions(+), 20 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 67fca439bbfb..24965e53d351 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -1624,28 +1624,34 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) > frame.colorspace = HDMI_COLORSPACE_RGB; > > /* Set up colorimetry */ > - switch (hdmi->hdmi_data.enc_out_encoding) { > - case V4L2_YCBCR_ENC_601: > - if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV601) > - frame.colorimetry = HDMI_COLORIMETRY_EXTENDED; > - else > + if (!hdmi_bus_fmt_is_rgb(hdmi->hdmi_data.enc_out_bus_format)) { > + switch (hdmi->hdmi_data.enc_out_encoding) { > + case V4L2_YCBCR_ENC_601: > + if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV601) > + frame.colorimetry = HDMI_COLORIMETRY_EXTENDED; > + else > + frame.colorimetry = HDMI_COLORIMETRY_ITU_601; > + frame.extended_colorimetry = > + HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; > + break; > + case V4L2_YCBCR_ENC_709: > + if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV709) > + frame.colorimetry = HDMI_COLORIMETRY_EXTENDED; > + else > + frame.colorimetry = HDMI_COLORIMETRY_ITU_709; > + frame.extended_colorimetry = > + HDMI_EXTENDED_COLORIMETRY_XV_YCC_709; > + break; > + default: /* Carries no data */ > frame.colorimetry = HDMI_COLORIMETRY_ITU_601; > + frame.extended_colorimetry = > + HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; > + break; > + } > + } else { > + frame.colorimetry = HDMI_COLORIMETRY_NONE; > frame.extended_colorimetry = > - HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; > - break; > - case V4L2_YCBCR_ENC_709: > - if (hdmi->hdmi_data.enc_in_encoding == V4L2_YCBCR_ENC_XV709) > - frame.colorimetry = HDMI_COLORIMETRY_EXTENDED; > - else > - frame.colorimetry = HDMI_COLORIMETRY_ITU_709; > - frame.extended_colorimetry = > - HDMI_EXTENDED_COLORIMETRY_XV_YCC_709; > - break; > - default: /* Carries no data */ > - frame.colorimetry = HDMI_COLORIMETRY_ITU_601; > - frame.extended_colorimetry = > - HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; > - break; > + HDMI_EXTENDED_COLORIMETRY_XV_YCC_601; > } > > frame.scan_mode = HDMI_SCAN_MODE_NONE; -- Regards, Laurent Pinchart