Patch "drm/vc4: hdmi: Set a default HSM rate" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/vc4: hdmi: Set a default HSM rate

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-vc4-hdmi-set-a-default-hsm-rate.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 716b9f50a9c165af8af5d610f20ca77a0cf476ba
Author: Maxime Ripard <maxime@xxxxxxxxxx>
Date:   Wed Sep 22 14:54:17 2021 +0200

    drm/vc4: hdmi: Set a default HSM rate
    
    [ Upstream commit 3e85b81591609bb794bb00cd619b20965b5b38cd ]
    
    When the firmware doesn't setup the HSM rate (such as when booting
    without an HDMI cable plugged in), its rate is 0 and thus any register
    access results in a CPU stall, even though HSM is enabled.
    
    Let's enforce a minimum rate at boot to avoid this issue.
    
    Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
    Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
    Reviewed-by: Nicolas Saenz Julienne <nsaenz@xxxxxxxxxx>
    Tested-by: Nicolas Saenz Julienne <nsaenz@xxxxxxxxxx>
    Tested-by: Michael Stapelberg <michael@xxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210922125419.4125779-4-maxime@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index ee293f061f0a8..5d5c4e9a86218 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -79,6 +79,7 @@
 # define VC4_HD_M_SW_RST			BIT(2)
 # define VC4_HD_M_ENABLE			BIT(0)
 
+#define HSM_MIN_CLOCK_FREQ	120000000
 #define CEC_CLOCK_FREQ 40000
 #define VC4_HSM_MID_CLOCK 149985000
 
@@ -1806,6 +1807,19 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
 	vc4_hdmi->disable_wifi_frequencies =
 		of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence");
 
+	/*
+	 * If we boot without any cable connected to the HDMI connector,
+	 * the firmware will skip the HSM initialization and leave it
+	 * with a rate of 0, resulting in a bus lockup when we're
+	 * accessing the registers even if it's enabled.
+	 *
+	 * Let's put a sensible default at runtime_resume so that we
+	 * don't end up in this situation.
+	 */
+	ret = clk_set_min_rate(vc4_hdmi->hsm_clock, HSM_MIN_CLOCK_FREQ);
+	if (ret)
+		goto err_put_ddc;
+
 	if (vc4_hdmi->variant->reset)
 		vc4_hdmi->variant->reset(vc4_hdmi);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux