mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@mailbox.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Maxime Ripard <mripard@kernel.org>,
	Simona Vetter <simona@ffwll.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] drm/rcar-du: dsi: Handle both DRM_MODE_FLAG_N.SYNC and !DRM_MODE_FLAG_P.SYNC
Date: Tue, 25 Nov 2025 21:13:02 +0100	[thread overview]
Message-ID: <f92e90f1-2bc3-49c2-a6e4-40dcf63cb0e1@mailbox.org> (raw)
In-Reply-To: <20251107232329.GI5558@pendragon.ideasonboard.com>

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.

  reply	other threads:[~2025-11-25 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 23:04 Marek Vasut
2025-11-07 23:23 ` Laurent Pinchart
2025-11-25 20:13   ` Marek Vasut [this message]
2025-12-01  6:09     ` Laurent Pinchart
2025-12-02 18:18       ` Marek Vasut

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=f92e90f1-2bc3-49c2-a6e4-40dcf63cb0e1@mailbox.org \
    --to=marek.vasut@mailbox.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magnus.damm@gmail.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen+renesas@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /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®