Skip to content

Commit 4f36561

Browse files
6by9popcornmix
authored andcommitted
drm/vc4: Alter the HDMI state machine clock calc to allow for 1920x1200
Whilst the documentation for BCM2835 states that the HDMI state machine clock needs to be 108% of the pixel clock, other documentation says that it only has to be greater than the pixel clock. The firmware uses 101%, and that allows 1920x1200@60Hz to work within the constraint of the HSM clock being < 163.68MHz. Adopt 101%, and increase the maximum pixel clock for vc4 to 162MHz so that it too supports 1920x1200@60. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent b749787 commit 4f36561

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,11 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
578578
}
579579

580580
/*
581-
* The HSM rate needs to be at 108% of the pixel clock, with a
582-
* minimum of 108MHz.
581+
* The HSM rate needs to be slightly greater than the pixel clock, with
582+
* a minimum of 108MHz.
583+
* Use 101% as this is what the firmware uses.
583584
*/
584-
hsm_rate = max_t(unsigned long, 108000000, (pixel_rate / 100) * 108);
585+
hsm_rate = max_t(unsigned long, 108000000, (pixel_rate / 100) * 101);
585586
ret = clk_set_rate(vc4_hdmi->hsm_clock, hsm_rate);
586587
if (ret) {
587588
DRM_ERROR("Failed to set HSM clock rate: %d\n", ret);
@@ -1711,7 +1712,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev)
17111712
}
17121713

17131714
static const struct vc4_hdmi_variant bcm2835_variant = {
1714-
.max_pixel_clock = 148500000,
1715+
.max_pixel_clock = 162000000,
17151716
.audio_available = true,
17161717
.cec_available = true,
17171718
.registers = vc4_hdmi_fields,

0 commit comments

Comments
 (0)