All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Icenowy Zheng" <zhengxingda@iscas.ac.cn>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/4] drm/panel: ilitek-ili9881c: add Mingjun MJ070BI30IA2
Date: Fri, 30 Oct 2026 05:54:44 +0000	[thread overview]
Message-ID: <sashiko-outbox-190580@kernel.org> (raw)
In-Reply-To: <20261030-mj070bi30ia2-v1-3-a0f65b65c290@iscas.ac.cn>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/panel: ilitek-ili9881c: bit-shifted registers in mj070bi30ia2_init
--

commit 77fed3fe20435bd131c211abca1d6f6a36c89b5f
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>

drm/panel: ilitek-ili9881c: add Mingjun MJ070BI30IA2

This patch adds support for the Mingjun MJ070BI30IA2 7" MIPI DSI LCD panel,
including its initialization sequence, display mode timings, and device tree
compatible entry in the Ilitek ILI9881C panel driver.

> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> index c3d5ab67121d9..83148c40e25ca 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> @@ -2198,6 +2198,201 @@ static const struct ili9881c_instr waveshare_7inch_a_init[] = {
>  	ILI9881C_COMMAND_INSTR(0x36, 0x00),
>  };
>  
> +static const struct ili9881c_instr mj070bi30ia2_init[] = {
> +	ILI9881C_SWITCH_PAGE_INSTR(3),
> +	ILI9881C_COMMAND_INSTR(0x01, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x02, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x03, 0x73),
> +	ILI9881C_COMMAND_INSTR(0x04, 0x13),
> +	ILI9881C_COMMAND_INSTR(0x05, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x06, 0x0A),
> +	ILI9881C_COMMAND_INSTR(0x07, 0x05),
> +	ILI9881C_COMMAND_INSTR(0x11, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x09, 0x28),
> +	ILI9881C_COMMAND_INSTR(0x0A, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x0B, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x0C, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x0D, 0x28),
> +	ILI9881C_COMMAND_INSTR(0x0E, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x0F, 0x28),
> +	ILI9881C_COMMAND_INSTR(0x10, 0x28),
> +	ILI9881C_COMMAND_INSTR(0x11, 0x00),

[ ... ]

> +	ILI9881C_COMMAND_INSTR(0x36, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x37, 0x08),
> +	ILI9881C_COMMAND_INSTR(0x70, 0x00),
> +	ILI9881C_COMMAND_INSTR(0x39, 0x00),

[ ... ]

> +	ILI9881C_COMMAND_INSTR(0x43, 0x08),
> +	ILI9881C_COMMAND_INSTR(0x44, 0x00),
> +	ILI9881C_COMMAND_INSTR(0xA0, 0x02),
> +	ILI9881C_COMMAND_INSTR(0x51, 0x23),
> +	ILI9881C_COMMAND_INSTR(0x52, 0x44),
> +	ILI9881C_COMMAND_INSTR(0x53, 0x67),

[ ... ]

> +	ILI9881C_COMMAND_INSTR(0x6E, 0x16),
> +	ILI9881C_COMMAND_INSTR(0x6F, 0x16),
> +	ILI9881C_COMMAND_INSTR(0x70, 0x06),
> +	ILI9881C_COMMAND_INSTR(0x71, 0x06),

[ ... ]

> +	ILI9881C_SWITCH_PAGE_INSTR(1),
> +	ILI9881C_COMMAND_INSTR(0x22, 0x0A),
> +	ILI9881C_COMMAND_INSTR(0x31, 0x00),
> +	ILI9881C_COMMAND_INSTR(0xA6, 0xA6),
> +	ILI9881C_COMMAND_INSTR(0x55, 0x3D),
> +	ILI9881C_COMMAND_INSTR(0x50, 0x9E),
> +	ILI9881C_COMMAND_INSTR(0x51, 0x99),
> +	ILI9881C_COMMAND_INSTR(0x60, 0x06),
> +	ILI9881C_COMMAND_INSTR(0x62, 0x20),
> +	ILI9881C_COMMAND_INSTR(0xA0, 0x00),
> +	ILI9881C_COMMAND_INSTR(0xA1, 0x17),
> +	ILI9881C_COMMAND_INSTR(0xA2, 0x26),
> +	ILI9881C_COMMAND_INSTR(0xA3, 0x13),
> +	ILI9881C_COMMAND_INSTR(0xA4, 0x16),
> +	ILI9881C_COMMAND_INSTR(0xA5, 0x29),
> +	ILI9881C_COMMAND_INSTR(0xA6, 0x1E),

[Severity: High]
Are some of the register addresses and values in mj070bi30ia2_init[] shifted
left by one bit (perhaps from a MIPI DSI bus capture or transcription error)?

When ili9881c_prepare() sends mj070bi30ia2_init[] to the panel controller,
four entries appear to have bit-shifted command addresses that leave their
intended registers unprogrammed while writing to registers that are later
overwritten:

1. In Page 3, between registers 0x07 and 0x09 (where all other ILI9881C
panels program register 0x08), the sequence writes to 0x11 ((0x08 << 1) | 1),
which is already programmed in its normal sequential position after 0x10.

2. In Page 3, between registers 0x37 and 0x39 (where register 0x38 belongs),
the sequence writes (0x70, 0x00) (0x38 << 1 == 0x70). Register 0x70 is later
overwritten in the 0x5F..0x8A GIP output mapping block with (0x70, 0x06),
leaving register 0x38 uninitialized.

3. In Page 3, between registers 0x44 and 0x51, at the start of the standard
0x50..0x5D GIP sequence (0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, ...), the table
has (0xA0, 0x02) instead of (0x50, 0x01) (0x50 << 1 == 0xA0, 0x01 << 1 ==
0x02), and register 0x52 is set to 0x44 instead of 0x45.

4. In Page 1, between register 0x31 and VCOM2 register 0x55 (where other
ILI9881C panels program VCOM1 register 0x53), the sequence writes
(0xA6, 0xA6) (0x53 << 1 == 0xA6). In Page 1, 0xA6 is a positive gamma
register that is unconditionally overwritten a few lines later by
(0xA6, 0x1E), leaving VCOM1 register 0x53 uninitialized.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261030-mj070bi30ia2-v1-0-a0f65b65c290@iscas.ac.cn?part=3

  reply	other threads:[~2026-10-30  5:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  5:44 [PATCH 0/4] drm/panel: ili9881c: add support for Mingjun MJ070BI30IA2 Icenowy Zheng
2026-10-30  5:44 ` [PATCH 1/4] dt-bindings: vendor-prefixes: add Shenzhen Mingjun Optoelectronics Icenowy Zheng
2026-10-30  5:44 ` [PATCH 2/4] dt-bindings: ili9881c: add compatible string for Mingjun MJ070BI30IA2 Icenowy Zheng
2026-10-30 12:09   ` Krzysztof Kozlowski
2026-10-30 12:09   ` Krzysztof Kozlowski
2026-10-30  5:44 ` [PATCH 3/4] drm/panel: ilitek-ili9881c: add " Icenowy Zheng
2026-10-30  5:54   ` sashiko-bot [this message]
2026-10-30  5:44 ` [PATCH 4/4] drm/panel: ilitek-ili9881c: do a soft reset in unprepare callback Icenowy Zheng

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=sashiko-outbox-190580@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhengxingda@iscas.ac.cn \
    /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.