mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: "Jernej Škrabec" <jernej.skrabec@siol.net>, a.hajda@samsung.com
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: Tue, 3 Mar 2020 11:17:43 +0100	[thread overview]
Message-ID: <610707a3-1596-252d-f507-c3c70179683d@baylibre.com> (raw)
In-Reply-To: <1955232.bB369e8A3T@jernej-laptop>

On 02/03/2020 17:42, Jernej Škrabec wrote:
> 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 <jernej.skrabec@siol.net>
>>> ---
>>>
>>>  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:
>> 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.
> 
> On second thought, I think original implementation is correct, just misnamed. 
> Laurent, Neil, do you agree if I replace this patch with patch which renames 
> is_color_space_conversion() to is_conversion_needed() ?

Sure,
Neil

> 
> Best regards,
> Jernej
> 
> 
> 


  reply	other threads:[~2020-03-03 10:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29 16:30 [PATCH 0/4] drm/bridge: dw-hdmi: Various updates Jernej Skrabec
2020-02-29 16:30 ` [PATCH 1/4] drm/bridge: dw-hdmi: fix AVI frame colorimetry Jernej Skrabec
2020-03-02  9:21   ` Laurent Pinchart
2020-02-29 16:30 ` [PATCH 2/4] drm/bridge: dw-hdmi: Fix color space conversion detection Jernej Skrabec
2020-03-02  9:26   ` Neil Armstrong
2020-03-02  9:46     ` Jernej Škrabec
2020-03-02 16:42     ` Jernej Škrabec
2020-03-03 10:17       ` Neil Armstrong [this message]
2020-03-02  9:27   ` Laurent Pinchart
2020-03-02 12:45     ` Jernej Škrabec
2020-02-29 16:30 ` [PATCH 3/4] drm/bridge: dw-hdmi: do not force "none" scan mode Jernej Skrabec
2020-03-02  9:26   ` Neil Armstrong
2020-03-02  9:37   ` Laurent Pinchart
2020-02-29 16:30 ` [PATCH 4/4] drm/bridge: dw-hdmi: Add support for RGB limited range Jernej Skrabec
2020-03-02  9:53   ` Laurent Pinchart
2020-03-02 16:48     ` Jernej Škrabec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=610707a3-1596-252d-f507-c3c70179683d@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®