-
Notifications
You must be signed in to change notification settings - Fork 5k
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_hdmi: Add CEC support for 2711 #3601
Conversation
Ping @6by9
|
for (i = 0; i < msg->len; i += 4) { | ||
u32 val = HDMI_READ(HDMI_CEC_RX_DATA_1 + i); | ||
u32 val = HDMI_READ(HDMI_CEC_RX_DATA_1 + (i>>2)); |
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.
Is this correct for Pi3 as well? It appears to be unconditional on revision.
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.
Yes it is a bug on Pi3. Any long messages would trample other registers (and we are getting longer messages in log).
drivers/gpu/drm/vc4/vc4_hdmi.c
Outdated
@@ -1751,6 +1803,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) | |||
|
|||
static const struct vc4_hdmi_variant bcm2835_variant = { | |||
.max_pixel_clock = 162000000, | |||
.cec_input_clock = 163682864, |
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.
To nit pick, it'd be nice to have this as a define along the lines of VC4_HDMI_HSM_CLOCK_RATE, as the same value is used in vc4_hdmi_calc_hsm_clock.
drivers/gpu/drm/vc4/vc4_hdmi.c
Outdated
.channel_map = vc5_hdmi_channel_map, | ||
|
||
.cec_mask = VC5_HDMI0_CPU_CEC_RX | VC5_HDMI0_CPU_CEC_TX | VC5_HDMI0_CPU_HOTPLUG_CONN | VC5_HDMI0_CPU_HOTPLUG_REM, |
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.
Hotplug bits as well? Why?
I'll leave that as one for @mripard to resolve when he rolls this into the upstream patchset. If we can get it working, then he can worry about the preferred way of expressing it.
Yes
Seeing as the CEC framework also appears to have a retry mechanism that we can plumb it into, then why not. Maxime had mentioned that there is already a driver for the irq-brcmstb-l2 controller at https://github.com/raspberrypi/linux/blob/rpi-5.4.y/drivers/irqchip/irq-brcmstb-l2.c, but he hadn't got it to work when trying to make the HDMI I2C blocks work (they still currently poll). |
Updated based on comments and removed WIP. |
LGTM |
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.
Mainly niggles, apart from the arm64 support.
@@ -890,6 +890,7 @@ CONFIG_DRM_PANEL_SIMPLE=m | |||
CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m | |||
CONFIG_DRM_V3D=m | |||
CONFIG_DRM_VC4=m | |||
CONFIG_DRM_VC4_HDMI_CEC=y |
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.
Is this not also applicable to 64-bit builds?
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.
Untested but no reason I can think of why 64-bit build would fail.
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.
Throw it in there, then.
As Phil's being picky (rightly so), there's also the matter of the author and |
I was going to say that we shouldn't unmask @popcornmix, but there is prior evidence in the logs. |
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Fix an incorrect register address, add a missing one and reorder into address order Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
2711 uses a fixed 27MHz input, earlier models use the HSM clock Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Updated. |
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
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
No description provided.