mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejas Vipin <tejasvipin76@gmail.com>
To: Doug Anderson <dianders@chromium.org>, neil.armstrong@linaro.org
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
	lujianhua000@gmail.com, quic_jesszhan@quicinc.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Anusha Srivatsa <asrivats@redhat.com>
Subject: Re: [PATCH] drm/panel: novatek-nt36523: transition to mipi_dsi wrapped functions
Date: Thu, 6 Mar 2025 23:08:18 +0530	[thread overview]
Message-ID: <0d473dc1-cbbe-4a1e-933a-938438db24f5@gmail.com> (raw)
In-Reply-To: <CAD=FV=VoW-Zm5wY6Y9sr=GqnvfMP4urGw_zW8NJRHpdC4=rHXQ@mail.gmail.com>



On 3/6/25 10:58 PM, Doug Anderson wrote:
> Hi,
> 
> On Thu, Mar 6, 2025 at 6:05 AM <neil.armstrong@linaro.org> wrote:
>>
>> On 06/03/2025 14:43, Tejas Vipin wrote:
>>> Changes the novatek-nt36523 panel to use multi style functions for
>>> improved error handling.
>>>
>>> Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com>
>>> ---
>>>   drivers/gpu/drm/panel/panel-novatek-nt36523.c | 1683 ++++++++---------
>>>   1 file changed, 823 insertions(+), 860 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
>>> index 04f1d2676c78..922a225f6258 100644
>>> --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c
>>> +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
>>> @@ -23,10 +23,12 @@
>>>
>>>   #define DSI_NUM_MIN 1
>>>
>>> -#define mipi_dsi_dual_dcs_write_seq(dsi0, dsi1, cmd, seq...)        \
>>> -             do {                                                 \
>>> -                     mipi_dsi_dcs_write_seq(dsi0, cmd, seq);      \
>>> -                     mipi_dsi_dcs_write_seq(dsi1, cmd, seq);      \
>>> +#define mipi_dsi_dual_dcs_write_seq_multi(dsi_ctx0, dsi_ctx1, cmd, seq...)      \
>>> +             do {                                                            \
>>> +                     mipi_dsi_dcs_write_seq_multi(&dsi_ctx0, cmd, seq);      \
>>> +                     dsi_ctx1.accum_err = dsi_ctx0.accum_err;                \
>>> +                     mipi_dsi_dcs_write_seq_multi(&dsi_ctx1, cmd, seq);      \
>>> +                     dsi_ctx0.accum_err = dsi_ctx1.accum_err;                \
>>
>> Just thinking out loud, but can't we do :
>>
>> struct mipi_dsi_multi_context dsi_ctx = { .dsi = NULL };
>>
>> #define mipi_dsi_dual_dcs_write_seq_multi(dsi_ctx, dsi0, dsi1, cmd, seq...)      \
>>                 do {
>>                         dsi_ctx.dsi = dsi0;                                     \
>>                         mipi_dsi_dcs_write_seq_multi(&dsi_ctx, cmd, seq);       \
>>                         dsi_ctx.dsi = dsi1;                                     \
>>                         mipi_dsi_dcs_write_seq_multi(&dsi_ctx, cmd, seq);       \
>>
>> ?
>>
>> So we have a single accum_err.
> 
> Even though the code you used was what I suggested in IRC, I like
> Neil's suggestion better here. What do you think?

I like Dmitry's suggestion [1]. If we went ahead with this we'd also
only need to equate the accum_err for the few msleep calls. Since it
does change the behavior, I'd like to hear another opinion on it before
I go ahead with it.

[1]: https://lore.kernel.org/all/p2esqngynwfrshz5rqfnmx6qgwf4dclpkb3mphwg2vavx2jbcg@clqoy5tjh7bb/

> 
> Other than that, it looks good to me.
> 
> -Doug

-- 
Tejas Vipin

  reply	other threads:[~2025-03-06 17:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 13:43 Tejas Vipin
2025-03-06 14:05 ` neil.armstrong
2025-03-06 16:33   ` Dmitry Baryshkov
2025-03-06 17:37     ` Doug Anderson
2025-03-06 19:03       ` Dmitry Baryshkov
2025-03-06 20:06         ` Doug Anderson
2025-03-06 17:28   ` Doug Anderson
2025-03-06 17:38     ` Tejas Vipin [this message]
2025-03-07  4:37       ` Dmitry Baryshkov
2025-03-07 10:00       ` neil.armstrong

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=0d473dc1-cbbe-4a1e-933a-938438db24f5@gmail.com \
    --to=tejasvipin76@gmail.com \
    --cc=airlied@gmail.com \
    --cc=asrivats@redhat.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lujianhua000@gmail.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --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

all inboxes | Powered by JetHome®