From: Tejas Vipin <tejasvipin76@gmail.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: neil.armstrong@linaro.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
daniel@ffwll.ch, quic_jesszhan@quicinc.com,
dianders@chromium.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/panel: elida-kd35t133: transition to mipi_dsi wrapped functions
Date: Sun, 22 Sep 2024 11:49:49 +0530 [thread overview]
Message-ID: <d470e0ef-0193-478c-a858-d6498758aa9a@gmail.com> (raw)
In-Reply-To: <c3wv3r44cmua2hphyjqzb7pp2a32pvs6svcj6s2zohp77qn3cr@4iica7j5bx5l>
On 9/20/24 9:59 PM, Dmitry Baryshkov wrote:
> On Tue, Sep 17, 2024 at 12:47:10PM GMT, Tejas Vipin wrote:
>> Changes the elida-kd35t133 panel to use multi style functions for
>> improved error handling.
>>
>> Signed-off-by: Tejas Vipin <tejasvipin76@gmail.com>
>> ---
>> drivers/gpu/drm/panel/panel-elida-kd35t133.c | 107 ++++++++-----------
>> 1 file changed, 45 insertions(+), 62 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>> index 00791ea81e90..62abda9559e7 100644
>> --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>> +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
>> @@ -135,25 +127,16 @@ static int kd35t133_prepare(struct drm_panel *panel)
>>
>> msleep(20);
>>
>> - ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
>> - if (ret < 0) {
>> - dev_err(ctx->dev, "Failed to exit sleep mode: %d\n", ret);
>> - goto disable_iovcc;
>> - }
>> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>> + mipi_dsi_msleep(&dsi_ctx, 250);
>>
>> - msleep(250);
>> + kd35t133_init_sequence(&dsi_ctx);
>> + if (!dsi_ctx.accum_err)
>> + dev_dbg(ctx->dev, "Panel init sequence done\n");
>>
>> - ret = kd35t133_init_sequence(ctx);
>> - if (ret < 0) {
>> - dev_err(ctx->dev, "Panel init sequence failed: %d\n", ret);
>> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>> + if (dsi_ctx.accum_err)
>> goto disable_iovcc;
>> - }
>
> Move this after the last mipi_dsi_msleep(), merge with the error
> handling.
>
>> -
>> - ret = mipi_dsi_dcs_set_display_on(dsi);
>> - if (ret < 0) {
>> - dev_err(ctx->dev, "Failed to set display on: %d\n", ret);
>> - goto disable_iovcc;
>> - }
>>
>> msleep(50);
>
> mipi_dsi_msleep()
Is this necessary though? Converting this msleep to mipi_dsi_msleep and
moving the previous dsi_ctx.accum_err check to below this seems
redundant. If the check is placed above msleep, then we need to only
check for the error once. If its placed below mipi_dsi_msleep, we end up
checking for the error twice (once as written in the code, once in the
code generated by the macro) which is unnecessary.
--
Tejas Vipin
next prev parent reply other threads:[~2024-09-22 6:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 7:17 Tejas Vipin
2024-09-20 16:29 ` Dmitry Baryshkov
2024-09-22 6:19 ` Tejas Vipin [this message]
2024-09-22 14:45 ` Dmitry Baryshkov
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=d470e0ef-0193-478c-a858-d6498758aa9a@gmail.com \
--to=tejasvipin76@gmail.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.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®