Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vc4 dsi support for 4.14.y++ #2693

Closed
wants to merge 4 commits into from

Conversation

k-quigley
Copy link

Here is a patch set that we've collected together to bring working DSI interface support to 4.14.y rpi kernel.
This Fixes #2521

We've done this to check 7" touchscreen support is functional using the open source drivers. This was an enabler for us to implement a DSI panel driver for a 3rd party display using the RPI display connector.

The panel driver code patch set will come in due course.

We needed to merge in several sets of changes from upstream to enable our driver to start correctly and bring the changes needed to devicetree to support it. This includes delaying the bridge setup until after the drivers have sent the initialization code via DSI LP commands.

We've introduced a separate display panel devicetree config for the 7" display panel, so this can be separately enabled using: dtoverlay=rpi-7inch and file rpi-7inch-overlay.dts

Other devicetree configs can be successfully built, using a similar approach - enabling other display panels to be driven using the OpenSource VC4 drivers.

Thanks to @anholt for the upstream patch - which delayed the startup.

bring this patch https://patchwork.kernel.org/patch/10480937/ to Linux rpi-4.14.y

This allows panels or bridges that need to send DSI commands during
pre_enable() to successfully send them.  We delay DISP0 (aka the
actual display) enabling until after pre_enable so that pixels aren't
streaming before then.

v2: Just clear out the encoder->bridge value to disable the midlayer
    calls (idea by Andrzej Hajda).
bring https://patchwork.kernel.org/patch/9902623/ to Linux 4.14.y

We need the following things to happen in sequence:

DSI host creation
DSI device creation in the panel driver (needs DSI host)
DSI device attach from panel to host.
DSI drm_panel_add()
DSI encoder creation
DSI encoder's DRM panel/bridge attach

Unless we allow device creation while the host isn't up yet, we need
to break the -EPROBE_DEFER deadlock between the panel driver looking
up the host and the host driver looking up the panel.  We can do so by
moving the DSI host creation outside of the component bind loop, and
the panel/bridge lookup/attach into the component bind process.
@jamwu
Copy link

jamwu commented Jan 17, 2019

@k-quigley Hi,Are you already try any 3rd part display with dsi?I have a project want to used a 1 lane mipi-dsi display with pi.It is possible?Can you give me some advice?Thanks!

@JamesH65
Copy link
Contributor

@dom @pelwell Do we need this or is it already in the 4.19 kernel and we are not bothered with 4.14?

@JamesH65 JamesH65 added the Waiting for internal comment Waiting for comment from a member of the Raspberry Pi engineering team label Jan 18, 2019
@popcornmix
Copy link
Collaborator

It's not something I've tested. Possibly @6by9 uses this config?
We will be moving rpi-update to 4.19 fairly soon (and apt some time later).
@k-quigley does DSI display work with current 4.19 kernel?

@k-quigley
Copy link
Author

k-quigley commented Jan 18, 2019 via email

@jamwu
Copy link

jamwu commented Jan 21, 2019

@k-quigley

Hi, We got the single lane dsi display working on 4.14 with a couple of patches.

Can you give some hint or detail about this patches? we can help testing.. have a lot of different DSI panels.

@llks
Copy link

llks commented Feb 14, 2019

Here is a patch set that we've collected together to bring working DSI interface support to 4.14.y rpi kernel.
This Fixes #2521

We've done this to check 7" touchscreen support is functional using the open source drivers. This was an enabler for us to implement a DSI panel driver for a 3rd party display using the RPI display connector.

The panel driver code patch set will come in due course.

We needed to merge in several sets of changes from upstream to enable our driver to start correctly and bring the changes needed to devicetree to support it. This includes delaying the bridge setup until after the drivers have sent the initialization code via DSI LP commands.

We've introduced a separate display panel devicetree config for the 7" display panel, so this can be separately enabled using: dtoverlay=rpi-7inch and file rpi-7inch-overlay.dts

Other devicetree configs can be successfully built, using a similar approach - enabling other display panels to be driven using the OpenSource VC4 drivers.

Thanks to @anholt for the upstream patch - which delayed the startup.

as far as my understand, the Official Raspberry Pi 7inch display is using the internal closed source GPU firmware to initialize and NOT the Linux driver to initialize, if this is the case, then why do we still the overlay dtoverlay=rpi-7inch and file rpi-7inch-overlay.dts?

@kuttkutt
Copy link

kuttkutt commented Mar 29, 2019

Hello,

I tried to implement this fix, but it seems not to work.

Kernel: 4.14.98-v7+ #1 SMP Fri Mar 29 12:53:25 CET 2019 armv7l GNU/Linux

No errors on compile, but e.g. stellarium gives me only 0,8 to 1,5 fps, if I'm lucky

RPI 3b, 7" official DSI display (I think version 2 - the one, where you can set the brightness)

leon-anavi pushed a commit to leon-anavi/meta-agl that referenced this pull request Oct 3, 2019
We seem to miss a few bits that changed between kernel 4.9 and kernel 4.14
regarding the 7'' touchscreen.

One addition is the rpi-backlight.dtbo which we also need to use in our create-combined-dtb
recipe for CI use.

We also seem to require raspberrypi/linux#2693 (comment) .

Thanks to Scott Murray for the help digging through this.

v2 and v3: add devicetree changes
v4 and v5: fix name of dtbo
v6: move append to machine include - we need it as a global var
v7: add to config.txt for sdcard boot case

Bug-AGL: SPEC-2465

Change-Id: I2bb3cd974b74a790292e1f36ffdca034928e0bca
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
@6by9
Copy link
Contributor

6by9 commented Dec 9, 2020

Closing as obsolete. DSI support is now merged in 5.10 (sorry it took so long!)

@6by9 6by9 closed this Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for internal comment Waiting for comment from a member of the Raspberry Pi engineering team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants