stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Marc Kleine-Budde <mkl@pengutronix.de>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Stefan Wahren <stefan.wahren@i2se.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.0 33/94] drm/vc4: hdmi: Enforce the minimum rate at runtime_resume
Date: Thu, 27 Oct 2022 18:54:35 +0200	[thread overview]
Message-ID: <20221027165058.447498626@linuxfoundation.org> (raw)
In-Reply-To: <20221027165057.208202132@linuxfoundation.org>

From: Maxime Ripard <maxime@cerno.tech>

[ Upstream commit ae71ab585c819f83aec84f91eb01157a90552ef2 ]

This is a revert of commit fd5894fa2413 ("drm/vc4: hdmi: Remove clock
rate initialization"), with the code slightly moved around.

It turns out that we can't downright remove that code from the driver,
since the Pi0-3 and Pi4 are in different cases, and it only works for
the Pi4.

Indeed, the commit mentioned above was relying on the RaspberryPi
firmware clocks driver to initialize the rate if it wasn't done by the
firmware. However, the Pi0-3 are using the clk-bcm2835 clock driver that
wasn't doing this initialization. We therefore end up with the clock not
being assigned a rate, and the CPU stalling when trying to access a
register.

We can't move that initialization in the clk-bcm2835 driver, since the
HSM clock we depend on is actually part of the HDMI power domain, so any
rate setup is only valid when the power domain is enabled. Thus, we
reinstated the minimum rate setup at runtime_suspend, which should
address both issues.

Link: https://lore.kernel.org/dri-devel/20220922145448.w3xfywkn5ecak2et@pengutronix.de/
Fixes: fd5894fa2413 ("drm/vc4: hdmi: Remove clock rate initialization")
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220929-rpi-pi3-unplugged-fixes-v1-1-cd22e962296c@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 1e5f68704d7d..780a19a75c3f 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2871,6 +2871,15 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
 	u32 __maybe_unused value;
 	int ret;
 
+	/*
+	 * The HSM clock is in the HDMI power domain, so we need to set
+	 * its frequency while the power domain is active so that it
+	 * keeps its rate.
+	 */
+	ret = clk_set_min_rate(vc4_hdmi->hsm_clock, HSM_MIN_CLOCK_FREQ);
+	if (ret)
+		return ret;
+
 	ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
 	if (ret)
 		return ret;
-- 
2.35.1




  parent reply	other threads:[~2022-10-27 16:58 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 16:54 [PATCH 6.0 00/94] 6.0.6-rc1 review Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 01/94] [PATCH v2] video/aperture: Call sysfb_disable() before removing PCI devices Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 02/94] ocfs2: clear dinode links count in case of error Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 03/94] ocfs2: fix BUG when iput after ocfs2_mknod fails Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 04/94] smb3: interface count displayed incorrectly Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 05/94] selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 06/94] cpufreq: qcom: fix writes in read-only memory region Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 07/94] i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 08/94] cpufreq: tegra194: Fix module loading Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 09/94] x86/microcode/AMD: Apply the patch early on every logical thread Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 10/94] hwmon/coretemp: Handle large core ID value Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 11/94] ata: ahci-imx: Fix MODULE_ALIAS Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 12/94] ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 13/94] x86/resctrl: Fix min_cbm_bits for AMD Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 14/94] cpufreq: qcom: fix memory leak in error path Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 15/94] drm/amdgpu: fix sdma doorbell init ordering on APUs Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 16/94] mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 17/94] kvm: Add support for arch compat vm ioctls Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 18/94] KVM: x86: Copy filter arg outside kvm_vm_ioctl_set_msr_filter() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 19/94] KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 20/94] KVM: arm64: vgic: Fix exit condition in scan_its_table() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 21/94] media: ipu3-imgu: Fix NULL pointer dereference in active selection access Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 22/94] media: mceusb: set timeout to at least timeout provided Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 23/94] media: venus: dec: Handle the case where find_format fails Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 24/94] media: venus: Fix NV12 decoder buffer discovery on HFI_VERSION_1XX Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 25/94] x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 26/94] x86/topology: Fix multiple packages shown on a single-package system Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 27/94] x86/topology: Fix duplicated core ID within a package Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 28/94] platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 29/94] dm bufio: use the acquire memory barrier when testing for B_READING Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 30/94] btrfs: fix processing of delayed data refs during backref walking Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 31/94] btrfs: fix processing of delayed tree block " Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 32/94] drm/vc4: Add module dependency on hdmi-codec Greg Kroah-Hartman
2022-10-27 16:54 ` Greg Kroah-Hartman [this message]
2022-10-27 16:54 ` [PATCH 6.0 34/94] ACPI: extlog: Handle multiple records Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 35/94] tipc: Fix recognition of trial period Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 36/94] tipc: fix an information leak in tipc_topsrv_kern_subscr Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 37/94] net: dsa: qca8k: fix inband mgmt for big-endian systems Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 38/94] net: dsa: qca8k: fix ethtool autocast mib " Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 39/94] i40e: Fix DMA mappings leak Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 40/94] tls: strp: make sure the TCP skbs do not have overlapping data Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 41/94] HID: magicmouse: Do not set BTN_MOUSE on double report Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 42/94] sfc: Change VF mac via PF as first preference if available Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 43/94] net/atm: fix proc_mpc_write incorrect return value Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 44/94] net: phy: dp83867: Extend RX strap quirk for SGMII mode Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 45/94] net/smc: Fix an error code in smc_lgr_create() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 46/94] net: phylink: add mac_managed_pm in phylink_config structure Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 47/94] net: stmmac: Enable mac_managed_pm phylink config Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 48/94] skmsg: pass gfp argument to alloc_sk_msg() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 49/94] erofs: shouldnt churn the mapping page for duplicated copies Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 50/94] blk-mq: fix null pointer dereference in blk_mq_clear_rq_mapping() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 51/94] io_uring/rw: remove leftover debug statement Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 52/94] net: ethernet: mtk_eth_soc: fix possible memory leak in mtk_probe() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 53/94] net: ethernet: mtk_eth_wed: add missing put_device() in mtk_wed_add_hw() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 54/94] net: ethernet: mtk_eth_wed: add missing of_node_put() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 55/94] scsi: lpfc: Fix memory leak in lpfc_create_port() Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 56/94] udp: Update reuse->has_conns under reuseport_lock Greg Kroah-Hartman
2022-10-27 16:54 ` [PATCH 6.0 57/94] ip6mr: fix UAF issue in ip6mr_sk_done() when addrconf_init_net() failed Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 58/94] cifs: Fix xid leak in cifs_create() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 59/94] cifs: Fix xid leak in cifs_copy_file_range() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 60/94] cifs: Fix xid leak in cifs_flock() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 61/94] cifs: Fix xid leak in cifs_ses_add_channel() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 62/94] cifs: Fix memory leak when build ntlmssp negotiate blob failed Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 63/94] dm: remove unnecessary assignment statement in alloc_dev() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 64/94] drm/amd/display: Increase frame size limit for display_mode_vba_util_32.o Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 65/94] bnxt_en: fix memory leak in bnxt_nvm_test() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 66/94] net: hsr: avoid possible NULL deref in skb_clone() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 67/94] ionic: catch NULL pointer issue on reconfig Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 68/94] netfilter: rpfilter/fib: Populate flowic_l3mdev field Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 69/94] netfilter: rpfilter/fib: Set ->flowic_uid correctly for user namespaces Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 70/94] netfilter: nf_tables: relax NFTA_SET_ELEM_KEY_END set flags requirements Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 71/94] nvme-hwmon: consistently ignore errors from nvme_hwmon_init Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 72/94] nvme-hwmon: kmalloc the NVME SMART log buffer Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 73/94] nvmet: fix workqueue MEM_RECLAIM flushing dependency Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 74/94] net: sched: cake: fix null pointer access issue when cake_init() fails Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 75/94] net: sched: delete duplicate cleanup of backlog and qlen Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 76/94] net: sched: sfb: fix null pointer access issue when sfb_init() fails Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 77/94] net: Fix return value of qdisc ingress handling on success Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 78/94] io_uring/msg_ring: Fix NULL pointer dereference in io_msg_send_fd() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 79/94] sfc: include vport_id in filter spec hash and equal() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 80/94] wwan_hwsim: fix possible memory leak in wwan_hwsim_dev_new() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 81/94] net: hns: fix possible memory leak in hnae_ae_register() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 82/94] net: sched: fix race condition in qdisc_graft() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 83/94] net: phy: dp83822: disable MDI crossover status change interrupt Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 84/94] drbd: only clone bio if we have a backing device Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 85/94] rv/dot2c: Make automaton definition static Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 86/94] iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 87/94] iommu/vt-d: Clean up si_domain in the init_dmars() error path Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 88/94] wifi: mt76: mt7921e: fix random fw download fail Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 89/94] io_uring: dont gate task_work run on TIF_NOTIFY_SIGNAL Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 90/94] ext4: introduce EXT4_FC_TAG_BASE_LEN helper Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 91/94] ext4: factor out ext4_fc_get_tl() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 92/94] ext4: fix potential out of bound read in ext4_fc_replay_scan() Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 93/94] [PATCH v3] ACPI: video: Force backlight native for more TongFang devices Greg Kroah-Hartman
2022-10-27 16:55 ` [PATCH 6.0 94/94] mm: /proc/pid/smaps_rollup: fix no vmas null-deref Greg Kroah-Hartman
2022-10-27 17:11 ` [PATCH 6.0 00/94] 6.0.6-rc1 review Greg Kroah-Hartman
2022-10-27 18:22 ` Luna Jernberg
2022-10-27 18:46 ` Holger Hoffstätte
2022-10-27 21:13 ` Justin Forbes
2022-10-28  8:20 ` Bagas Sanjaya
2022-10-28  9:20 ` Naresh Kamboju
2022-10-28  9:25 ` Ron Economos
2022-10-28 10:18 ` Rudi Heitbaum
2022-10-28 10:35 ` Sudip Mukherjee (Codethink)
2022-10-28 11:59 ` Jon Hunter
2022-10-28 22:01 ` Florian Fainelli
2022-10-29  3:36 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221027165058.447498626@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=javierm@redhat.com \
    --cc=maxime@cerno.tech \
    --cc=mkl@pengutronix.de \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).