Skip to content

Waveshare 10.1inch DSI LCD (E) - #7662

Merged
pelwell merged 4 commits into
raspberrypi:rpi-6.18.yfrom
waveshareteam:waveshare-dsi-2609
Sep 30, 2026
Merged

pelwell merged 4 commits into
raspberrypi:rpi-6.18.yfrom
waveshareteam:waveshare-dsi-2609

Conversation

@EngineerWill

Copy link
Copy Markdown
Contributor

Summary

Reverts the automatic panel detection previously added for the Waveshare 10.1inch DSI LCD (E) and replaces it with two explicit overlay parameters:

  • 10_1_inchE_4lane — 1920x1200 @ 60fps, 4 DSI lanes
  • 10_1_inchE_2lane — 1920x1200 @ 30fps, 2 DSI lanes

Why

After the auto-detection support was merged, several people tested it and found the behaviour unfriendly for end customers:

  • runtime detection via I2C (registers 0xd0–0xd3) could select an unexpected mode/rotation depending on the panel controller state, requiring manual intervention;
  • customers had no direct way to force a known-good configuration.

This change removes the auto-detect code path (I2C reads, rotation handling and the portrait 1200x1920 modes) and keeps only the default landscape orientation. The panel variant is now chosen explicitly via the overlay parameter, and the driver writes the desired refresh rate to register 0xd0 accordingly.

@EngineerWill EngineerWill mentioned this pull request Sep 29, 2026

@6by9 6by9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required change:
Panel driver change and dtoverlay change need to be in separate commits. Ideally rebase the branch instead of adding a merge commit.

Other comments:
I'm not going to fuss as this driver is only used by Waveshare and won't be upstreamed by us, but the cleaner approach would have been to do git revert fd7924c3ab70e and git revert 5d31114d5994 to cleanly discard the old commits, and then add new commits with the desired solution. In the rebasing onto the next release, the reverted commits would be dropped.
As we don't need the history for this driver, the reality is that all the driver commits will get squashed into one anyway.

I obviously missed it last time, but your Signed-off-by: doesn't really fulfill the requirements of being a known identity - https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

Whilst I've made a comment on the implementation, again I'm not fussed as this only used by you.

is_10_1_e_2lane = of_device_is_compatible(dev->of_node,
"waveshare,10.1inch-e-2lane-panel");
if (is_10_1_e_4lane || is_10_1_e_2lane)
ws_panel_i2c_write(ts, 0xd0, is_10_1_e_4lane ? 60 : 30);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistically I'd have written this as

if (of_device_is_compatible(dev->of_node, "waveshare,10.1inch-e-4lane-panel"))
   ws_panel_i2c_write(ts, 0xd0, 60);
else if (of_device_is_compatible(dev->of_node, "waveshare,10.1inch-e-2lane-panel"))
   ws_panel_i2c_write(ts, 0xd0, 30);

Saves having the local variables that are only really used once.

This reverts commit fd7924c.

Signed-off-by: Yu Dukai <646689853@qq.com>
This reverts commit 5d31114.

Signed-off-by: Yu Dukai <646689853@qq.com>
The 10.1inch DSI LCD (E) panel (1920x1200) is wired either with 4 DSI
lanes running at 60fps or with 2 DSI lanes running at 30fps. Expose
these as two explicit variants selected via the overlay parameter
instead of runtime I2C auto-detection, keeping only the default
landscape orientation. Write the corresponding refresh rate to
register 0xd0 so the panel controller runs in the expected mode.

Signed-off-by: Yu Dukai <646689853@qq.com>
Add the 10_1_inchE_4lane and 10_1_inchE_2lane overlay parameters
matching the new panel driver compatible strings
(waveshare,10.1inch-e-4lane-panel / waveshare,10.1inch-e-2lane-panel)
for the 10.1inch DSI LCD (E): 1920x1200 at 60fps over 4 DSI lanes or
at 30fps over 2 DSI lanes, keeping only the default landscape
orientation.

Signed-off-by: Yu Dukai <646689853@qq.com>
@EngineerWill

Copy link
Copy Markdown
Contributor Author

Thanks for the review, and sorry for the messy history. The branch has been rebuilt as suggested:

  • Reverted fd7924c and 5d31114, then added the new solution in two separate commits (panel driver change and dtoverlay change), so the old auto-detection can be dropped cleanly when rebasing onto the next release.
  • The merge commit is gone - the branch is rebased now.
  • Applied your suggested if/else-if style for the 0xd0 write.
  • Signed-off-by now uses a real name (Yu Dukai).

Please take another look.

@EngineerWill
EngineerWill requested a review from 6by9 September 30, 2026 02:35

@6by9 6by9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I obviously haven't tested it as I don't have the hardware.

@pelwell
pelwell merged commit fc91bf8 into raspberrypi:rpi-6.18.y Sep 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants