All of lore.kernel.org
 help / color / mirror / Atom feed
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-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 2/4] drm/rcar-du: dsi: Remove fixed PPI lane count setup
Date: Tue, 12 Aug 2025 16:30:42 +0300	[thread overview]
Message-ID: <87cc32a7-fe1d-4d8d-b793-e3bb7e12fb7d@ideasonboard.com> (raw)
In-Reply-To: <64b49da6-15ae-45e1-a4af-c1f08f80cf3a@ideasonboard.com>

Hi,

On 12/08/2025 16:18, Tomi Valkeinen wrote:
> Hi,
> 
> On 08/06/2025 17:24, Marek Vasut wrote:
>> The R-Car DSI host is capable of operating in 1..4 DSI lane mode.
>> Remove hard-coded 4-lane configuration from PPI register settings
>> and instead configure the PPI lane count according to lane count
>> information already obtained by this driver instance.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
>> ---
>> 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-renesas-soc@vger.kernel.org
>> ---
>>  drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c      | 2 +-
>>  drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h | 5 +----
>>  2 files changed, 2 insertions(+), 5 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 7ab8be46c7f6..373bd0040a46 100644
>> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
>> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
>> @@ -576,7 +576,7 @@ static int rcar_mipi_dsi_startup(struct rcar_mipi_dsi *dsi,
>>  	udelay(10);
>>  	rcar_mipi_dsi_clr(dsi, CLOCKSET1, CLOCKSET1_UPDATEPLL);
>>  
>> -	ppisetr = PPISETR_DLEN_3 | PPISETR_CLEN;
>> +	ppisetr = ((BIT(dsi->lanes) - 1) & PPISETR_DLEN_MASK) | PPISETR_CLEN;
>>  	rcar_mipi_dsi_write(dsi, PPISETR, ppisetr);
>>  
>>  	rcar_mipi_dsi_set(dsi, PHYSETUP, PHYSETUP_SHUTDOWNZ);
>> diff --git a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
>> index b3e57217ae63..cefa7e92b5b8 100644
>> --- a/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
>> +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h
>> @@ -80,10 +80,7 @@
>>   * PHY-Protocol Interface (PPI) Registers
>>   */
>>  #define PPISETR				0x700
>> -#define PPISETR_DLEN_0			(0x1 << 0)
>> -#define PPISETR_DLEN_1			(0x3 << 0)
>> -#define PPISETR_DLEN_2			(0x7 << 0)
>> -#define PPISETR_DLEN_3			(0xf << 0)
>> +#define PPISETR_DLEN_MASK		(0xf << 0)
>>  #define PPISETR_CLEN			BIT(8)
> 
> Looks fine, but do you know what the TXSETR register does? It also has
> LANECNT, but I don't see the driver touching that register at all.
> TXSETR:LANECNT default value is 3 (4 lanes), which matches with the old
> hardcoded behavior for PPISETR... So I wonder if that register should
> also be set?

Ah, never mind, I now saw the patch 3 =). But should it be before patch
2? Hmm, I guess that ordering is no better. Should they be combined into
"support 1,2,3 datalanes" patch?

 Tomi


  reply	other threads:[~2025-08-12 13:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-08 14:24 [PATCH 0/4] drm/rcar-du: dsi: Implement DSI command support Marek Vasut
2025-06-08 14:24 ` [PATCH 1/4] drm/rcar-du: dsi: Convert register bits to BIT() macro Marek Vasut
2025-08-12 13:26   ` Tomi Valkeinen
2025-08-12 19:32     ` Marek Vasut
2025-08-12 20:05       ` Laurent Pinchart
2025-08-13  6:59         ` Geert Uytterhoeven
2025-08-13 20:47           ` Marek Vasut
2025-08-13  7:42       ` Tomi Valkeinen
2025-08-13 20:51         ` Marek Vasut
2025-06-08 14:24 ` [PATCH 2/4] drm/rcar-du: dsi: Remove fixed PPI lane count setup Marek Vasut
2025-08-12 13:18   ` Tomi Valkeinen
2025-08-12 13:30     ` Tomi Valkeinen [this message]
2025-08-12 19:35       ` Marek Vasut
2025-08-13  7:34         ` Tomi Valkeinen
2025-08-13 21:06           ` Marek Vasut
2025-08-14  5:39             ` Tomi Valkeinen
2025-08-17 22:46               ` Marek Vasut
2025-06-08 14:24 ` [PATCH 3/4] drm/rcar-du: dsi: Configure TXSETR register to match PPI lane count Marek Vasut
2025-06-08 14:24 ` [PATCH 4/4] drm/rcar-du: dsi: Implement DSI command support Marek Vasut
2025-06-09  0:51   ` kernel test robot
2025-08-12 14:36   ` Tomi Valkeinen
2025-08-17 23:40     ` Marek Vasut
2025-08-18  7:20       ` Tomi Valkeinen
2025-08-31 18:57         ` 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=87cc32a7-fe1d-4d8d-b793-e3bb7e12fb7d@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-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.