From: Tejas Vipin <tejasvipin76@gmail.com>
To: Doug Anderson <dianders@chromium.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,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/panel: elida-kd35t133: transition to mipi_dsi wrapped functions
Date: Wed, 25 Sep 2024 09:56:01 +0530 [thread overview]
Message-ID: <22d4aada-da3f-45d6-b2a9-b2f9a7ac7d10@gmail.com> (raw)
In-Reply-To: <CAD=FV=WmcyAbzU_M25rCzc3JmNGZ9T0wzMJAfxi-LmdZ6389OQ@mail.gmail.com>
On 9/25/24 1:25 AM, Doug Anderson wrote:
> Hi,
>
> On Mon, Sep 23, 2024 at 5:33 AM Tejas Vipin <tejasvipin76@gmail.com> wrote:
>>
>> -static int kd35t133_init_sequence(struct kd35t133 *ctx)
>> +static void kd35t133_init_sequence(struct mipi_dsi_multi_context *dsi_ctx)
>> {
>> - struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
>> - struct device *dev = ctx->dev;
>> -
>> /*
>> * Init sequence was supplied by the panel vendor with minimal
>> * documentation.
>> */
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_POSITIVEGAMMA,
>> - 0x00, 0x13, 0x18, 0x04, 0x0f, 0x06, 0x3a, 0x56,
>> - 0x4d, 0x03, 0x0a, 0x06, 0x30, 0x3e, 0x0f);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_NEGATIVEGAMMA,
>> - 0x00, 0x13, 0x18, 0x01, 0x11, 0x06, 0x38, 0x34,
>> - 0x4d, 0x06, 0x0d, 0x0b, 0x31, 0x37, 0x0f);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_POWERCONTROL1, 0x18, 0x17);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_POWERCONTROL2, 0x41);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_VCOMCONTROL, 0x00, 0x1a, 0x80);
>> - mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x48);
>> - mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_INTERFACEMODECTRL, 0x00);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_FRAMERATECTRL, 0xa0);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_DISPLAYINVERSIONCTRL, 0x02);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_DISPLAYFUNCTIONCTRL,
>> - 0x20, 0x02);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_SETIMAGEFUNCTION, 0x00);
>> - mipi_dsi_dcs_write_seq(dsi, KD35T133_CMD_ADJUSTCONTROL3,
>> - 0xa9, 0x51, 0x2c, 0x82);
>> - mipi_dsi_dcs_write(dsi, MIPI_DCS_ENTER_INVERT_MODE, NULL, 0);
>> -
>> - dev_dbg(dev, "Panel init sequence done\n");
>> - return 0;
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_POSITIVEGAMMA,
>> + 0x00, 0x13, 0x18, 0x04, 0x0f, 0x06, 0x3a, 0x56,
>> + 0x4d, 0x03, 0x0a, 0x06, 0x30, 0x3e, 0x0f);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_NEGATIVEGAMMA,
>> + 0x13, 0x18, 0x01, 0x11, 0x06, 0x38, 0x34,
>> + 0x06, 0x0d, 0x0b, 0x31, 0x37, 0x0f);
>
> It seems like you dropped a few bytes in the above. Was this
> intentional? You seem to have dropped the first byte from both of the
> continuation lines (0x00 from the first, 0x4d from the second).
>
>
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_POWERCONTROL1, 0x18, 0x17);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_POWERCONTROL2, 0x41);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_VCOMCONTROL, 0x00, 0x1a, 0x80);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x48);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, MIPI_DCS_SET_PIXEL_FORMAT, 0x55);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_INTERFACEMODECTRL, 0x00);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_FRAMERATECTRL, 0xa0);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_DISPLAYINVERSIONCTRL, 0x02);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_DISPLAYFUNCTIONCTRL,
>> + 0x02);
>
> This used to be the bytes 0x20, 0x02. Now it's just 0x02?
>
>
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_SETIMAGEFUNCTION, 0x00);
>> + mipi_dsi_dcs_write_seq_multi(dsi_ctx, KD35T133_CMD_ADJUSTCONTROL3,
>> + 0x51, 0x2c, 0x82);
>
> This used to be the bytes 0xa9, 0x51, 0x2c, 0x82. Now it's just 0x51,
> 0x2c, 0x82?
>
Oh dear. No, this was not intentional. Most likely I think I wrote a vim
macro poorly.
>
>> + mipi_dsi_dcs_write_buffer_multi(dsi_ctx, NULL, 0);
>
> Are you certain that the above is equivalent to the old
> "mipi_dsi_dcs_write(dsi, MIPI_DCS_ENTER_INVERT_MODE, NULL, 0);" ?
> Where is the "MIPI_DCS_ENTER_INVERT_MODE" constant?
>
> I think the above needs to be:
>
> mipi_dsi_dcs_write_seq_multi(dsi_ctx, MIPI_DCS_ENTER_INVERT_MODE);
>
> I've confirmed that this compiles OK and that there's no need to
> actually have any bytes in the sequence.
>
I'll do a v3 addressing all of this.
>
> -Doug
--
Tejas Vipin
prev parent reply other threads:[~2024-09-25 4:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 12:25 Tejas Vipin
2024-09-23 12:38 ` Dmitry Baryshkov
2024-09-23 21:18 ` Jessica Zhang
2024-09-24 19:55 ` Doug Anderson
2024-09-25 4:26 ` Tejas Vipin [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=22d4aada-da3f-45d6-b2a9-b2f9a7ac7d10@gmail.com \
--to=tejasvipin76@gmail.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.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®