public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] drm/panel: mantix: Transition to multi-context write sequence
@ 2024-08-26 16:03 Abhishek Tamboli
  2024-08-26 18:03 ` Guido Günther
  0 siblings, 1 reply; 3+ messages in thread
From: Abhishek Tamboli @ 2024-08-26 16:03 UTC (permalink / raw)
  To: agx, kernel, neil.armstrong, maarten.lankhorst, mripard,
	tzimmermann, airlied, daniel
  Cc: quic_jesszhan, skhan, rbmarliere, linux-kernel-mentees, dri-devel,
	linux-kernel

Replace deprecated 'mipi_dsi_generic_write_seq()' macro
to 'mipi_dsi_generic_write_seq_multi()' macro in mantix_init_sequence
function.

Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
---
 .../gpu/drm/panel/panel-mantix-mlaf057we51.c  | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
index ea4a6bf6d35b..f276c65cc9bb 100644
--- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
+++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
@@ -49,22 +49,25 @@ static int mantix_init_sequence(struct mantix *ctx)
 {
 	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
 	struct device *dev = ctx->dev;
+	struct mipi_dsi_multi_context dsi_ctx = {
+		.dsi = dsi
+	};

 	/*
 	 * Init sequence was supplied by the panel vendor.
 	 */
-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);

-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_INT_CANCEL, 0x03);
-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
-	mipi_dsi_generic_write_seq(dsi, 0x80, 0xA9, 0x00);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_INT_CANCEL, 0x03);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0xA9, 0x00);

-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
-	mipi_dsi_generic_write_seq(dsi, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
 	msleep(20);

-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_SPI_FINISH, 0xA5);
-	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_SPI_FINISH, 0xA5);
+	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
 	msleep(20);

 	dev_dbg(dev, "Panel init sequence done\n");
--
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panel: mantix: Transition to multi-context write sequence
  2024-08-26 16:03 [PATCH] drm/panel: mantix: Transition to multi-context write sequence Abhishek Tamboli
@ 2024-08-26 18:03 ` Guido Günther
  2024-08-27 14:17   ` Abhishek Tamboli
  0 siblings, 1 reply; 3+ messages in thread
From: Guido Günther @ 2024-08-26 18:03 UTC (permalink / raw)
  To: Abhishek Tamboli
  Cc: kernel, neil.armstrong, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, quic_jesszhan, skhan, rbmarliere,
	linux-kernel-mentees, dri-devel, linux-kernel

Hi Abhishektamboli,

I think this was already handled in

https://lore.kernel.org/dri-devel/20240820091556.1032726-2-tejasvipin76@gmail.com/

and applied

https://lore.kernel.org/dri-devel/172414629205.2571141.13215409630895562248.b4-ty@linaro.org/#t

Cheers,
 -- Guido

On Mon, Aug 26, 2024 at 09:33:28PM +0530, Abhishek Tamboli wrote:
> Replace deprecated 'mipi_dsi_generic_write_seq()' macro
> to 'mipi_dsi_generic_write_seq_multi()' macro in mantix_init_sequence
> function.
> 
> Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
> ---
>  .../gpu/drm/panel/panel-mantix-mlaf057we51.c  | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> index ea4a6bf6d35b..f276c65cc9bb 100644
> --- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> +++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> @@ -49,22 +49,25 @@ static int mantix_init_sequence(struct mantix *ctx)
>  {
>  	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
>  	struct device *dev = ctx->dev;
> +	struct mipi_dsi_multi_context dsi_ctx = {
> +		.dsi = dsi
> +	};
> 
>  	/*
>  	 * Init sequence was supplied by the panel vendor.
>  	 */
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);
> 
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_INT_CANCEL, 0x03);
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
> -	mipi_dsi_generic_write_seq(dsi, 0x80, 0xA9, 0x00);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_INT_CANCEL, 0x03);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0xA9, 0x00);
> 
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
> -	mipi_dsi_generic_write_seq(dsi, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
>  	msleep(20);
> 
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_SPI_FINISH, 0xA5);
> -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_SPI_FINISH, 0xA5);
> +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
>  	msleep(20);
> 
>  	dev_dbg(dev, "Panel init sequence done\n");
> --
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/panel: mantix: Transition to multi-context write sequence
  2024-08-26 18:03 ` Guido Günther
@ 2024-08-27 14:17   ` Abhishek Tamboli
  0 siblings, 0 replies; 3+ messages in thread
From: Abhishek Tamboli @ 2024-08-27 14:17 UTC (permalink / raw)
  To: Guido Günther
  Cc: kernel, neil.armstrong, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, quic_jesszhan, skhan, rbmarliere,
	linux-kernel-mentees, dri-devel, linux-kernel

On Mon, Aug 26, 2024 at 08:03:54PM +0200, Guido Günther wrote:
> Hi Abhishektamboli,
> 
> I think this was already handled in
> 
> https://lore.kernel.org/dri-devel/20240820091556.1032726-2-tejasvipin76@gmail.com/
> 
> and applied
> 
> https://lore.kernel.org/dri-devel/172414629205.2571141.13215409630895562248.b4-ty@linaro.org/#t
> 
Hi Guido,
Thanks for letting me know.

Regards,
Abhishek
> 
> On Mon, Aug 26, 2024 at 09:33:28PM +0530, Abhishek Tamboli wrote:
> > Replace deprecated 'mipi_dsi_generic_write_seq()' macro
> > to 'mipi_dsi_generic_write_seq_multi()' macro in mantix_init_sequence
> > function.
> > 
> > Signed-off-by: Abhishek Tamboli <abhishektamboli9@gmail.com>
> > ---
> >  .../gpu/drm/panel/panel-mantix-mlaf057we51.c  | 19 +++++++++++--------
> >  1 file changed, 11 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> > index ea4a6bf6d35b..f276c65cc9bb 100644
> > --- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> > +++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c
> > @@ -49,22 +49,25 @@ static int mantix_init_sequence(struct mantix *ctx)
> >  {
> >  	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> >  	struct device *dev = ctx->dev;
> > +	struct mipi_dsi_multi_context dsi_ctx = {
> > +		.dsi = dsi
> > +	};
> > 
> >  	/*
> >  	 * Init sequence was supplied by the panel vendor.
> >  	 */
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A);
> > 
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_INT_CANCEL, 0x03);
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
> > -	mipi_dsi_generic_write_seq(dsi, 0x80, 0xA9, 0x00);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_INT_CANCEL, 0x03);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0xA9, 0x00);
> > 
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
> > -	mipi_dsi_generic_write_seq(dsi, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00);
> >  	msleep(20);
> > 
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_SPI_FINISH, 0xA5);
> > -	mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_SPI_FINISH, 0xA5);
> > +	mipi_dsi_generic_write_seq_multi(&dsi_ctx, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F);
> >  	msleep(20);
> > 
> >  	dev_dbg(dev, "Panel init sequence done\n");
> > --
> > 2.34.1
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-27 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 16:03 [PATCH] drm/panel: mantix: Transition to multi-context write sequence Abhishek Tamboli
2024-08-26 18:03 ` Guido Günther
2024-08-27 14:17   ` Abhishek Tamboli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox