-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Rpi 4.4.y dsi stub squash #1556
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
Rpi 4.4.y dsi stub squash #1556
Conversation
@@ -110,9 +111,10 @@ | |||
reg = <0x7e101000 0x2000>; | |||
|
|||
/* CPRMAN derives everything from the platform's | |||
* oscillator. | |||
* oscillator except for a few clocks that may | |||
+ * derive from something else derived from CPRMAN.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cut and paste??????
It looks like without disable_touchscreen set in config.txt, the rpi-ft5406 driver keeps working just fine. |
b988b5e
to
6e70121
Compare
(force push was to drop the stray "+" in the comment) |
@anholt When will you merge this change? |
@chbae I'm the one requesting the merge, it's up to the foundation folks to pull it. |
@anholt Eric, is there no way of making this fly with CONFIG_DRM=m and CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m. I haven't checked, but I'm thinking that having DRM compiled-in rather than module, is going to increase the size of the default kernel substantially, when very few people are actually using the functionality...... Just thinking out loud...... |
Looks like the
|
I don't think counting on-disk size is appropriate, as you're just moving it from an initrd module to built-in. Memory size in non-vc4 mode is unfortunate, though if we can flip to vc4-by-defaut we should be able to get way more back by reducing gpu_mem. For getting back to building as a module, hopefully with this series http://www.spinics.net/lists/dri-devel/msg114234.html it will be an option. |
Note, if you're not up for merging the whole branch, it would still help a lot if you could pull up to before the defconfig change. |
@pelwell any objections? |
I'm skeptical about the need for CONFIG_DEBUG_GPIO, which appears to just enable some dmesg KERN_DEBUG output. AFAICT the /sys/kernel/debug/pinctrl/ entries are enabled by CONFIG_DEBUG_FS, which is already defined. I am, of course, open to correction. |
While the SDRAM is being driven by its dedicated PLL most of the time, there is a little loop running in the firmware that periodically turns on the CM SDRAM clock (using its pre-initialized parent) and switches SDRAM to using the CM clock to do PVT recalibration. This avoids system hangs if we choose SDRAM's parent for some other clock, then disable that clock. Signed-off-by: Eric Anholt <[email protected]>
Our core PLLs are intended to be configured once and left alone. With the flag set, asking to set the PLLD_DSI1 clock rate would change PLLD just to get closer to the requested DSI clock, thus changing PLLD_PER, the UART and ethernet PHY clock rates downstream of it, and breaking ethernet. Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
The drm_fbdev_cma_init function always calls the drm_helper_disable_unused_functions. Since it's part of the usual probe process, all the drivers using that helper will end up having their encoder and CRTC disable functions called at probe if their device has not been reported as enabled. This could be fixed by reading out from the registers the current state of the device if it is enabled, but even that will not handle the case where the device is actually disabled. Moreover, the drivers using the atomic modesetting expect that their enable and disable callback to be called when the device is already enabled or disabled (respectively). We can however fix this issue by moving the call to drm_helper_disable_unused_functions out of drm_fbdev_cma_init and make the drivers needing it (all the drivers calling drm_fbdev_cma_init and not using the atomic modesetting) explicitly call it. Signed-off-by: Maxime Ripard <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1452785109-6172-14-git-send-email-maxime.ripard@free-electrons.com Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> (cherry picked from commit 4314e19)
Yeah, I must have screwed something up to write that commit. I'll drop it and retest, or you can just drop it. I'm working on a build against the current rpi-4.4.y right now, and if it works I'll re-push. |
@@ -307,7 +307,7 @@ static inline void bcm2835_pinctrl_fsel_set( | |||
u32 val = bcm2835_gpio_rd(pc, FSEL_REG(pin)); | |||
enum bcm2835_fsel cur = (val >> FSEL_SHIFT(pin)) & BCM2835_FSEL_MASK; | |||
|
|||
dev_dbg(pc->dev, "read %08x (%u => %s)\n", val, pin, | |||
dev_info(pc->dev, "read %08x (%u => %s)\n", val, pin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm - I don't think we want these.
Cool - it's nice to have my sanity confirmed occasionally, Aside from that and the few inline comments, I have no issues with the patch., but note that I've concentrated on the interactions with other areas rather than reading all of your code. |
6e70121
to
8720647
Compare
Thanks for the cleanups @pelwell. Pushed with those two fixed and the gpio debug config dropped. |
Also, anyone have any ideas why the panel built as a module wouldn't automatically load? That's the prereq for dropping CONFIG_DRM_MIPI_DSI to a module, and thus CONFIG_DRM back to module. |
Off the top of my head (which is going to bed now), is it because the parent of the touchscreen node doesn't cause subnodes to be treated as potential platform devices, perhaps because it isn't a bus? |
This is a preliminary patch for building drm-mipi-dsi as a module. Add the module exit callback to unregister the bus properly. Suggested-by: Thierry Reding <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
The drm-mipi-dsi driver has been only built-in although this isn't strictly required to be so. Since it's referred by lots of DRM drivers nowadays, most of distro kernels include the driver as built-in as a result, even though many systems don't need it at all. This patch fixes Kconfig to allow drm-mipi-dsi driver built as a module, so that we can save footprint on systems without such DRM drivers. The probe order is managed by the module dependency, and postcore_initcall() works just fine as a module init call. Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
Empirically, DSI1 appears to be using HVS channel 0 on my Pi2. Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Every file was defining its own little struct and dumping for the regs, when there's a helper in debugfs for doing just this. However, instead of printing: PV_HORZA (0x000c): 0x00000000 we now print: PV_HORZA = 0x00000000 Signed-off-by: Eric Anholt <[email protected]>
Yeah, they're not instantiated as platform devices, they're on their own bus. I may have a fix. |
8720647
to
1a04975
Compare
The DSI0 and DSI1 blocks on the 2835 are different but very similar hardware blocks. Some registers move around, and the featureset is slightly different, but they're clearly related. This doesn't enable DSI0, but some of the infrastructure is present. Also, this driver doesn't initialize the DSI successfully from poweron, so we currently require that the Raspberry Pi firmware enable it at boot time. From there, we just keep the same settings forever, and when poweroff is requested we just scan out black instead. Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
In order to make DSI panel modules able to load automatically, we need to emit the OF modalias uevent so that their MODULE_DEVICE_TABLE(of, ...) can match against it. Signed-off-by: Eric Anholt <[email protected]>
This gets the Raspberry Pi panel module to automatically load at boot time. Signed-off-by: Eric Anholt <[email protected]>
1a04975
to
8018f92
Compare
And fixed a stray debug printf in vc4_dsi.c. |
See: raspberrypi/linux#1581 kernel: enable gembird joypad support See: raspberrypi/linux#1589 kernel: Added HiFiBerry Digi+ Pro driver See: raspberrypi/linux#1583 kernel: overlays: Add assert_falling_edge to pps-gpio overlay See: raspberrypi/linux#1590 kernel: Experimental graphics driver DSI support See: raspberrypi/linux#1556 firmware: Add customisation project board type firmware: platform: Enable Bluetooth on custom firmware: gencmd: Add support for hdmi_cvt and hdmi_timings See: #637 firmware: arm_display: Allow source aspect ratio to be configured See: #638 firmware: mmal: Allow /dev/vchiq to be opened initialised prior to mmal_vc_init
See: raspberrypi/linux#1581 kernel: enable gembird joypad support See: raspberrypi/linux#1589 kernel: Added HiFiBerry Digi+ Pro driver See: raspberrypi/linux#1583 kernel: overlays: Add assert_falling_edge to pps-gpio overlay See: raspberrypi/linux#1590 kernel: Experimental graphics driver DSI support See: raspberrypi/linux#1556 firmware: Add customisation project board type firmware: platform: Enable Bluetooth on custom firmware: gencmd: Add support for hdmi_cvt and hdmi_timings See: raspberrypi/firmware#637 firmware: arm_display: Allow source aspect ratio to be configured See: raspberrypi/firmware#638 firmware: mmal: Allow /dev/vchiq to be opened initialised prior to mmal_vc_init
- kernel: fix auto-sense in lirc_rpi driver See: raspberrypi/linux#1581 - kernel: enable gembird joypad support See: raspberrypi/linux#1589 - kernel: Added HiFiBerry Digi+ Pro driver See: raspberrypi/linux#1583 - kernel: overlays: Add assert_falling_edge to pps-gpio overlay See: raspberrypi/linux#1590 - kernel: Experimental graphics driver DSI support See: raspberrypi/linux#1556 - firmware: Add customisation project board type - firmware: platform: Enable Bluetooth on custom - firmware: gencmd: Add support for hdmi_cvt and hdmi_timings See: #637 - firmware: arm_display: Allow source aspect ratio to be configured See: #638 - firmware: mmal: Allow /dev/vchiq to be opened initialised prior to mmal_vc_init
@anholt |
Can confirm this is working for me also, thanks for the great work @anholt ! |
See: raspberrypi/linux#1581 kernel: enable gembird joypad support See: raspberrypi/linux#1589 kernel: Added HiFiBerry Digi+ Pro driver See: raspberrypi/linux#1583 kernel: overlays: Add assert_falling_edge to pps-gpio overlay See: raspberrypi/linux#1590 kernel: Experimental graphics driver DSI support See: raspberrypi/linux#1556 firmware: Add customisation project board type firmware: platform: Enable Bluetooth on custom firmware: gencmd: Add support for hdmi_cvt and hdmi_timings See: raspberrypi#637 firmware: arm_display: Allow source aspect ratio to be configured See: raspberrypi#638 firmware: mmal: Allow /dev/vchiq to be opened initialised prior to mmal_vc_init
Here's the stripped down series I've come up with for adding DSI support, based on not having ignore_lcd in the config.txt. Since it's requiring that the firmware set up DSI, there's no power management and instead of turning off the DSI and PV during DPMS, we just set the HVS to scan out black.
There's no touch input support yet. I think that's the next step, even before fixing the DSI link management.