]> www.infradead.org Git - users/willy/linux.git/commitdiff
drm/vc4: hdmi: Limit the BCM2711 to the max without scrambling
authorMaxime Ripard <maxime@cerno.tech>
Tue, 15 Dec 2020 15:42:42 +0000 (16:42 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 16 Dec 2020 09:11:53 +0000 (10:11 +0100)
Unlike the previous generations, the HSM clock limitation is way above
what we can reach without scrambling, so let's move the maximum
frequency we support to the maximum clock frequency without scrambling.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215154243.540115-9-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_hdmi.c

index dbe516d897267367c2c7d2bd48896887b1d5893f..41897b8e9d511df80aaeb04f689a86ec6a49471d 100644 (file)
@@ -82,6 +82,8 @@
 #define CEC_CLOCK_FREQ 40000
 #define VC4_HSM_MID_CLOCK 149985000
 
+#define HDMI_14_MAX_TMDS_CLK   (340 * 1000 * 1000)
+
 static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused)
 {
        struct drm_info_node *node = (struct drm_info_node *)m->private;
@@ -1918,7 +1920,7 @@ static const struct vc4_hdmi_variant bcm2711_hdmi0_variant = {
        .encoder_type           = VC4_ENCODER_TYPE_HDMI0,
        .debugfs_name           = "hdmi0_regs",
        .card_name              = "vc4-hdmi-0",
-       .max_pixel_clock        = 297000000,
+       .max_pixel_clock        = HDMI_14_MAX_TMDS_CLK,
        .registers              = vc5_hdmi_hdmi0_fields,
        .num_registers          = ARRAY_SIZE(vc5_hdmi_hdmi0_fields),
        .phy_lane_mapping       = {
@@ -1944,7 +1946,7 @@ static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
        .encoder_type           = VC4_ENCODER_TYPE_HDMI1,
        .debugfs_name           = "hdmi1_regs",
        .card_name              = "vc4-hdmi-1",
-       .max_pixel_clock        = 297000000,
+       .max_pixel_clock        = HDMI_14_MAX_TMDS_CLK,
        .registers              = vc5_hdmi_hdmi1_fields,
        .num_registers          = ARRAY_SIZE(vc5_hdmi_hdmi1_fields),
        .phy_lane_mapping       = {