-
Notifications
You must be signed in to change notification settings - Fork 5.2k
BCM270X_DT: Flip the polarity of the CM3's HDMI HPD. #1869
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
Conversation
I haven't confirmed the fix -- I don't have a dev environment set up for booting new kernels on the CM3 yet. I'm hoping @ghollingworth might have a chance to test it. |
Sounds highly plausible as the VPU code reading the GPIO expander also has a notion of active high/low, and will invert the value read back based on that. I'd have expected the same to apply to bcm2710-rpi-3-b.dts too. Is that not the case? |
I've had no trouble with pi3, though, and we've had polarity of the HPD flipped both ways across other boards. |
@6by9 perhaps this needs inverting in the firmware dtb? |
With both a CM3 and Pi3 On both CM3 and Pi3 I've needed to set GPIO_ACTIVE_HIGH to get HDMI working ACTIVE_LOW I get the monitor going to sleep. 2 minor comments as this is the first time I've booted into the vc4 driver:
I guess that is something else missing from the CM3 DT (i2c_dsi by the looks of it), but possibly intentionally so as the display isn't enabled by default on CMs. |
Updated the branch now to fix pi3b as well (I hadn't tested it since expgpio landed), along with backporting @Electron752's cursor update patch and fixing a regression in DSI panel support in full kms mode. |
Fine by me - glad I wasn't going mad over Pi3 needing to be corrected too. |
Since I got e-mail about my cursor patch being added, do people want a similar fix for fkms? I can understand though if people think it's better to just leave fkms alone.(Probably should be a separate pull request). I got e-mail from someone giving feedback about the cursor fix that it's actually the version of the xserver that causing the update flood and not the desktop environment. So this may become an issue if Raspbian moves to a newer version of Debian. |
Please confirm that the HPD polarity of the various Pi models really does differ. After the early models (A & B) I would expect them all to be active low, suggesting that the discrepancy may lie with the common element - the GPIO expander. |
I tested it yesterday. Without this patch neither CM3 nor Pi3 bring up the HDMI display. With it they do. That makes me agree with Eric that this is the correct solution. |
I can imagine a time when the ARM takes over managing the GPIO expander, at which point the declarations become wrong. DT is supposed to document the hardware, not the hardware after it has been munged by the intervening layers of software. The problem is that the mailbox interface for controlling the GPIOs is wired in at the wrong level. Either that wiring needs to be refactored or the mailbox interface needs to renormalise at the interface to the ARM. |
OK, I'll refactor the firmware code so the mailbox gets the raw values. |
Commonly used desktop environments such as xfce4 and gnome on debian sid can flood the graphics drivers with cursor updates. Because the current implementation is waiting for a vblank between cursor updates, this will cause the display to hang for a long time since a typical refresh rate is only 60Hz. This is unnecessary and unexpected by user mode software, so simply swap out the cursor frame buffer without waiting. Signed-off-by: Michael Zoran <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Commit 488f9bc slightly increased the reported rate of PLLD, so the clk driver decided that PLLD/3/8 was now higher than our requested pixel clock rate and rejected it in favor of PLLD/4/8, which then ran the pixel clock way out of spec. By bumping the requested clock rate just slightly, we get back to PLLD/3/8 like we wanted and the panel displays content again. Signed-off-by: Eric Anholt <[email protected]>
I've rebased out the HPD change on my branch, since the mbox interface is going to change. |
Since the expander is no longer on the list, is their any reason this request can't be accepted? Both of the addressed issues are relatively severe. |
Eric, I notice that your touchscreen driver hasn't made it into rpi-4.10.y - is there any reason for me not to cherry-pick it across? |
Please feel free! I'm trying to maintain backports to whichever branches I think you might switch over to by default, but I don't think I have time to maintain every rpi-* branch. If switching to a newer branch is being considered, please let me know and I'll try to fix it up. |
kernel: BCM270X_DT: Invert Pi3 power LED to match fw change See: raspberrypi/linux#1879 kernel: Add support for the AudioInjector Octo sound card See: raspberrypi/linux#1884 kernel: Fix gadget mode for bcm2835 See: raspberrypi/linux#1887 kernel: bcm2835-v4l2: Fix buffer overflow problem See: raspberrypi/linux#1890 kernel: Add support for Fe-Pi audio sound card See: raspberrypi/linux#1867 kernel: BCM270X_DT: Flip the polarity of the CM3's HDMI HPD See: raspberrypi/linux#1869 kernel: Add overlay for ads1115 ADCs See: raspberrypi/linux#1864 kernel: config: Add CONFIG_CRYPTO_LZ4 See: raspberrypi/linux#1875 kernel: clk-bcm2835: Read max core clock from firmware firmware: GPIO expander: rework so the mailbox service reads raw values firmware: arm_loader: Check GPIO direction for low_voltage See: raspberrypi/linux#1879 firmware: warnings: Fix some mostly spurious warnings firmware: clock: Calculate PLL multipliers with more precision firmware: Set up HDMI VCO same for VEC as for HDMI firmeare: gpu_server: Move detailed logging to LOGGING_VMCS_VERBOSE category
kernel: BCM270X_DT: Invert Pi3 power LED to match fw change See: raspberrypi/linux#1879 kernel: Add support for the AudioInjector Octo sound card See: raspberrypi/linux#1884 kernel: Fix gadget mode for bcm2835 See: raspberrypi/linux#1887 kernel: bcm2835-v4l2: Fix buffer overflow problem See: raspberrypi/linux#1890 kernel: Add support for Fe-Pi audio sound card See: raspberrypi/linux#1867 kernel: BCM270X_DT: Flip the polarity of the CM3's HDMI HPD See: raspberrypi/linux#1869 kernel: Add overlay for ads1115 ADCs See: raspberrypi/linux#1864 kernel: config: Add CONFIG_CRYPTO_LZ4 See: raspberrypi/linux#1875 kernel: clk-bcm2835: Read max core clock from firmware firmware: GPIO expander: rework so the mailbox service reads raw values firmware: arm_loader: Check GPIO direction for low_voltage See: raspberrypi/linux#1879 firmware: warnings: Fix some mostly spurious warnings firmware: clock: Calculate PLL multipliers with more precision firmware: Set up HDMI VCO same for VEC as for HDMI firmeare: gpu_server: Move detailed logging to LOGGING_VMCS_VERBOSE category
FYI the firmware change for expgpio was released last night. HDMI hotplug seems to work for me using vc4-kms-v3d. |
You can blame me for the delay. |
FWIW: NULL pointer dereference during DSI screen probe mentioned by @6by9 is still there on Pi2 latest 4.9 kernel/firmware. Open another issue for this? |
Yes, please. |
Testing on my CM3 board, xrandr showed HDMI connected when the cable
was unplugged, and disconnected when it was plugged in.
Signed-off-by: Eric Anholt [email protected]