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

Warning in boot log about vc4/vc4_hdmi_phy.c #3594

Closed
tompreston opened this issue May 4, 2020 · 7 comments
Closed

Warning in boot log about vc4/vc4_hdmi_phy.c #3594

tompreston opened this issue May 4, 2020 · 7 comments

Comments

@tompreston
Copy link

Is this the right place for my bug report?
Possibly, it's to do with the HDMI component of the vc4 driver. I don't know if this should live here or in github.com/raspberrypi/firmware.

Describe the bug
On Raspberry Pi 4 with dtoverlay=vc4-kms-v3d or dtoverlay=vc4-kms-v3d-pi4, I see a warning at boot time relating to the vc4 HDMI component.

[    6.055586] WARNING: CPU: 1 PID: 135 at drivers/gpu/drm/vc4/vc4_hdmi_phy.c:414 vc5_hdmi_phy_init+0x7b4/0x2078 [vc4]

To reproduce
Connect rpi4 to HDMI display. Build and boot rpi-5.4.y on Raspberry Pi 4. Check dmesg.

Expected behaviour
There should be no warning.

Actual behaviour
A warning appears in the boot log

System

  • Which model of Raspberry Pi? Raspberry Pi 4
  • Which OS and version (cat /etc/rpi-issue)? Custom OS, but I believe this is a kernel issue.
  • Which firmware version (vcgencmd version)? I'm not sure how to check this without vcgencmd
  • Which kernel version (uname -a)? Linux localhost 5.4.35-v8 #1 SMP PREEMPT Fri May 1 17:22:32 UTC 2020 aarch64 GNU/Linux

Logs
Full dmesg https://pastebin.com/4NYaaEffper

Additional context
The warning comes from the VC4_SET_FIELD macro, which checks that the register value is contained within the register mask. It looks like the warning is because phy_get_cp_current returns an 8-bit value, but the mask is only 6 bits. Either way the mask is applied so the 0xc8 turns into 0x08.

I need to find out what the register is supposed to be set to and what the effect of setting it to 0x08 is, but I don't know where the datasheet for the BCM2711 HDMI registers is.

Please can someone point me to the datasheet containing the registers for the BCM2711 HDMI peripheral.

Thanks!

@6by9
Copy link
Contributor

6by9 commented May 4, 2020

I thought @popcornmix had already committed a fix for this. The correct value is 0x18.

@popcornmix
Copy link
Collaborator

It was cherry picked by you into #3535 but that PR got delayed.
I'll commit it directly.

@6by9
Copy link
Contributor

6by9 commented May 4, 2020

Thanks @popcornmix - I'm glad someone remembers these things!

@tompreston
Copy link
Author

@6by9 You mean the return value from phy_get_cp_current() is 0x18? That makes more sense, but I still don't understand why. Presumably 0x18 and 0x1c are (electrical) current values which need to be set depending on the vco frequency? 🤷 😄

Out of curiosity, is the datasheet publicly available?

Thanks!

@6by9
Copy link
Contributor

6by9 commented May 4, 2020

You mean the return value from phy_get_cp_current() is 0x18? That makes more sense, but I still don't understand why.

They are values provided by Broadcom.
There was a typo in transferring the value from the Broadcom code to the firmware, and that was replicated in the KMS driver. It's now fixed.

Out of curiosity, is the datasheet publicly available?

No.

@tompreston
Copy link
Author

I'm just testing this, then I'll close the issue.

@tompreston
Copy link
Author

I can confirm the warning goes away with 71d5db1. Thanks!

popcornmix added a commit to raspberrypi/firmware that referenced this issue May 12, 2020
kernel: vc4_hdmi: Add CEC support for 2711
See: raspberrypi/linux#3601

kernel: overlays: Move fixed-clock nodes to the root
See: raspberrypi/linux#3607

kernel: bcm2835_isp fixes for constness
See: raspberrypi/linux#3592

kernel: video: bcm2708_fb: Disable FB if no displays found
See: raspberrypi/linux#3598

kernel: vc4_hdmi_phy: Fix typo in phy_get_cp_current
See: raspberrypi/linux#3594

kernel: configs: Add missing TOUCHSCREEN_RASPBERRYPI_FW=m
See: Hexxeh/rpi-firmware#223

kernel: configs: Add missing PPS configs
See: raspberrypi/linux#3593

kernel: overlays: gpio-keys: Avoid open-drain warnings
See: #1381

kernel: overlays: Make the i2c-gpio overlay safe again

kernel: ARM: dts: bcm2711: Allow 40-bit DMA for SPI
See: raspberrypi/linux#3570

firmware: In KMS mode, prevent use of the firmware rotations

firmware: power: Adjust ARM:AXI divider ratio if ARM freq > 1500 MHz

firmware: imx477: Remove STILLS flag from 720p mode

userland: tvservice: Fix freeze on old firmware
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue May 12, 2020
kernel: vc4_hdmi: Add CEC support for 2711
See: raspberrypi/linux#3601

kernel: overlays: Move fixed-clock nodes to the root
See: raspberrypi/linux#3607

kernel: bcm2835_isp fixes for constness
See: raspberrypi/linux#3592

kernel: video: bcm2708_fb: Disable FB if no displays found
See: raspberrypi/linux#3598

kernel: vc4_hdmi_phy: Fix typo in phy_get_cp_current
See: raspberrypi/linux#3594

kernel: configs: Add missing TOUCHSCREEN_RASPBERRYPI_FW=m
See: #223

kernel: configs: Add missing PPS configs
See: raspberrypi/linux#3593

kernel: overlays: gpio-keys: Avoid open-drain warnings
See: raspberrypi/firmware#1381

kernel: overlays: Make the i2c-gpio overlay safe again

kernel: ARM: dts: bcm2711: Allow 40-bit DMA for SPI
See: raspberrypi/linux#3570

firmware: In KMS mode, prevent use of the firmware rotations

firmware: power: Adjust ARM:AXI divider ratio if ARM freq > 1500 MHz

firmware: imx477: Remove STILLS flag from 720p mode

userland: tvservice: Fix freeze on old firmware
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

No branches or pull requests

3 participants