lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 3 Mar 2020 11:17:43 +0100
From:   Neil Armstrong <narmstrong@...libre.com>
To:     Jernej Škrabec <jernej.skrabec@...l.net>,
        a.hajda@...sung.com
Cc:     Laurent.pinchart@...asonboard.com, jonas@...boo.se,
        airlied@...ux.ie, daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] drm/bridge: dw-hdmi: Fix color space conversion
 detection

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@...l.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
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ