Patch "drm/vc4: hdmi: Prevent clock unbalance" 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: Prevent clock unbalance

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-prevent-clock-unbalance.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.


>From 5b006000423667ef0f55721fc93e477b31f22d28 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@xxxxxxxxxx>
Date: Fri, 7 May 2021 17:05:09 +0200
Subject: drm/vc4: hdmi: Prevent clock unbalance

From: Maxime Ripard <maxime@xxxxxxxxxx>

commit 5b006000423667ef0f55721fc93e477b31f22d28 upstream.

Since we fixed the hooks to disable the encoder at boot, we now have an
unbalanced clk_disable call at boot since we never enabled them in the
first place.

Let's mimic the state of the hardware and enable the clocks at boot if
the controller is enabled to get the use-count right.

Cc: <stable@xxxxxxxxxxxxxxx> # v5.10+
Fixes: 09c438139b8f ("drm/vc4: hdmi: Implement finer-grained hooks")
Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
Reviewed-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-7-maxime@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 drivers/gpu/drm/vc4/vc4_hdmi.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1807,6 +1807,14 @@ static int vc4_hdmi_bind(struct device *
 	if (vc4_hdmi->variant->reset)
 		vc4_hdmi->variant->reset(vc4_hdmi);
 
+	if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
+	     of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
+	    HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) {
+		clk_prepare_enable(vc4_hdmi->pixel_clock);
+		clk_prepare_enable(vc4_hdmi->hsm_clock);
+		clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
+	}
+
 	pm_runtime_enable(dev);
 
 	drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);


Patches currently in stable-queue which might be from maxime@xxxxxxxxxx are

queue-5.10/drm-vc4-fix-clock-source-for-vec-pixelvalve-on-bcm27.patch
queue-5.10/drm-vc4-fix-argument-ordering-in-vc4_crtc_get_margin.patch
queue-5.10/drm-vc4-crtc-skip-the-txp.patch
queue-5.10/drm-vc4-hdmi-prevent-clock-unbalance.patch
queue-5.10/drm-vc4-hdmi-fix-pm-reference-leak-in-vc4_hdmi_encod.patch
queue-5.10/drm-vc4-txp-properly-set-the-possible_crtcs-mask.patch



[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