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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f92e90f1-2bc3-49c2-a6e4-40dcf63cb0e1@mailbox.org>
Date: Tue, 25 Nov 2025 21:13:02 +0100
From: Marek Vasut <marek.vasut@...lbox.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: dri-devel@...ts.freedesktop.org, David Airlie <airlied@...il.com>,
 Geert Uytterhoeven <geert+renesas@...der.be>,
 Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Magnus Damm <magnus.damm@...il.com>, Maxime Ripard <mripard@...nel.org>,
 Simona Vetter <simona@...ll.ch>, Thomas Zimmermann <tzimmermann@...e.de>,
 Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>,
 linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] drm/rcar-du: dsi: Handle both DRM_MODE_FLAG_N.SYNC and
 !DRM_MODE_FLAG_P.SYNC

On 11/8/25 12:23 AM, Laurent Pinchart wrote:
> On Sat, Nov 08, 2025 at 12:04:10AM +0100, Marek Vasut wrote:
>> Since commit 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode flags")
>> the driver does not set TXVMVPRMSET0R_VSPOL_LOW and TXVMVPRMSET0R_HSPOL_LOW
>> for modes which set neither DRM_MODE_FLAG_[PN].SYNC.
> 
> Could you please explain what broke ?

Consider mode->flags, V-ones for simplicity:

Before 94fe479fae96 :

DRM_MODE_FLAG_PVSYNC => vprmset0r |= 0
DRM_MODE_FLAG_NVSYNC => vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW
Neither DRM_MODE_FLAG_[PN]VSYNC => vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW

After 94fe479fae96 :

DRM_MODE_FLAG_PVSYNC => vprmset0r |= 0
DRM_MODE_FLAG_NVSYNC => vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW
Neither DRM_MODE_FLAG_[PN]VSYNC => vprmset0r |= 0 <---------- This broke

The "Neither" case behavior is different. I did not realize that:

DRM_MODE_FLAG_N[HV]SYNC is not equivalent !DRM_MODE_FLAG_P[HV]SYNC

They really are not equivalent .

[...]

>>   	/* Configuration for Video Parameters, input is always RGB888 */
>>   	vprmset0r = TXVMVPRMSET0R_BPP_24;
>> -	if (mode->flags & DRM_MODE_FLAG_NVSYNC)
>> +	if ((mode->flags & DRM_MODE_FLAG_NVSYNC) ||
>> +	    !(mode->flags & DRM_MODE_FLAG_PVSYNC))
>>   		vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW;
> 
> I don't think this restores the previous behaviour. You would need to
> write
> 
> 	if (!(mode->flags & DRM_MODE_FLAG_PVSYNC))
> 		vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW;
This patch covers both the N[HV]SYNC and !P[HV]SYNC , so that should 
restore the behavior to "Before" and explicitly be clear that N[HV]SYNC 
and !P[HV]SYNC are not the same thing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ