From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>,
dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@gmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
Laurent Pinchart <laurent.pinchart+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>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] drm/rcar-du: dsi: Handle both DRM_MODE_FLAG_N.SYNC and !DRM_MODE_FLAG_P.SYNC
Date: Thu, 4 Dec 2025 14:58:44 +0200 [thread overview]
Message-ID: <874ca23f-c50e-49ae-be2b-eb6b9cf2b068@ideasonboard.com> (raw)
In-Reply-To: <1f580f1d-8ed5-4167-8991-1909c350d00e@ideasonboard.com>
Hi again,
On 04/12/2025 14:54, Tomi Valkeinen wrote:
> Hi,
>
> On 02/12/2025 20:11, 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. The previous behavior
>> was to assume that neither flag means DRM_MODE_FLAG_N.SYNC . Restore the
>> previous behavior for maximum compatibility.
>>
>> The change of behavior is visible below, consider Vertical mode->flags
>> for simplicity sake, although the same applies to Horizontal ones:
>>
>> Before 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode flags") :
>>
>> - 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/rcar-du: dsi: Clean up handling of DRM mode flags") :
>>
>> - 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, because DRM_MODE_FLAG_N[HV]SYNC is
>> really not equivalent !DRM_MODE_FLAG_P[HV]SYNC .
>>
>> Fixes: 94fe479fae96 ("drm/rcar-du: dsi: Clean up handling of DRM mode flags")
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
>
> Thanks, looks good to me. Pushing to drm-misc-next.
Actually, drm-misc-next-fixes looks the correct one for this.
Tomi
>
> Tomi
>
>> ---
>> Cc: David Airlie <airlied@gmail.com>
>> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
>> Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
>> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Cc: Maxime Ripard <mripard@kernel.org>
>> Cc: Simona Vetter <simona@ffwll.ch>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: linux-kernel@vger.kernel.org
>> Cc: linux-renesas-soc@vger.kernel.org
>> ---
>> V2: - Update commit message
>> - Use only !P[HV]SYNC
>> ---
>> drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
>> index 9413b76d0bfce..4ef2e3c129ed7 100644
>> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
>> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
>> @@ -492,9 +492,9 @@ static void rcar_mipi_dsi_set_display_timing(struct rcar_mipi_dsi *dsi,
>>
>> /* 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_PVSYNC))
>> vprmset0r |= TXVMVPRMSET0R_VSPOL_LOW;
>> - if (mode->flags & DRM_MODE_FLAG_NHSYNC)
>> + if (!(mode->flags & DRM_MODE_FLAG_PHSYNC))
>> vprmset0r |= TXVMVPRMSET0R_HSPOL_LOW;
>>
>> vprmset1r = TXVMVPRMSET1R_VACTIVE(mode->vdisplay)
>
prev parent reply other threads:[~2025-12-04 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 18:11 [PATCH v2] drm/rcar-du: dsi: Handle both DRM_MODE_FLAG_N.SYNC and !DRM_MODE_FLAG_P.SYNC Marek Vasut
2025-12-03 2:24 ` Laurent Pinchart
2025-12-04 12:54 ` Tomi Valkeinen
2025-12-04 12:58 ` Tomi Valkeinen [this message]
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=874ca23f-c50e-49ae-be2b-eb6b9cf2b068@ideasonboard.com \
--to=tomi.valkeinen+renesas@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@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=marek.vasut+renesas@mailbox.org \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--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