Short summary of fixes pull:
* vc4: HDMI fixes -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmNIBkEACgkQaA3BHVML eiN2BQgAs5EBirWUTeYfq7cAxcEonOZ1PdmPTgz6Aw+NFYF3Y/0mFmgbWOYjddWr 5v/B3Ua+225UftRXmObGdP725jRUJ3Z3so5cV6Xrmmw6g171ygwPWZN6ts0frQnT vgVfBQGUlGNDHUr2GEf6XNZ4M3xXuyPJZ/4e5IhedUyK/Q7dJc7WZvjG7fPSbiE1 K/ZYqYdQigTVPsYdZrc+0k/o2WWRvUNl7GQqFjno17SmpJOOtHObwLac1q607AYK FPcbHi0gwMOWKb2UPkPD9rp0CY7NM2tL4cF54gQqBZyJxrAMOWZGHSLLVru2FEnJ bkJD0uhKdUJQjEhP0hWeqUi9LwivwQ== =19Fl -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2022-10-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * vc4: HDMI fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/Y0gGdlujszCstDeP@linux-uq9g
This commit is contained in:
commit
8865dd756f
|
@ -490,6 +490,7 @@ module_init(vc4_drm_register);
|
|||
module_exit(vc4_drm_unregister);
|
||||
|
||||
MODULE_ALIAS("platform:vc4-drm");
|
||||
MODULE_SOFTDEP("pre: snd-soc-hdmi-codec");
|
||||
MODULE_DESCRIPTION("Broadcom VC4 DRM Driver");
|
||||
MODULE_AUTHOR("Eric Anholt <eric@anholt.net>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -3318,12 +3318,37 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
|
|||
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
|
||||
unsigned long __maybe_unused flags;
|
||||
u32 __maybe_unused value;
|
||||
unsigned long rate;
|
||||
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;
|
||||
|
||||
/*
|
||||
* Whenever the RaspberryPi boots without an HDMI monitor
|
||||
* plugged in, the firmware won't have initialized the HSM clock
|
||||
* rate and it will be reported as 0.
|
||||
*
|
||||
* If we try to access a register of the controller in such a
|
||||
* case, it will lead to a silent CPU stall. Let's make sure we
|
||||
* prevent such a case.
|
||||
*/
|
||||
rate = clk_get_rate(vc4_hdmi->hsm_clock);
|
||||
if (!rate) {
|
||||
ret = -EINVAL;
|
||||
goto err_disable_clk;
|
||||
}
|
||||
|
||||
if (vc4_hdmi->variant->reset)
|
||||
vc4_hdmi->variant->reset(vc4_hdmi);
|
||||
|
||||
|
@ -3345,6 +3370,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
|
|||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_clk:
|
||||
clk_disable_unprepare(vc4_hdmi->hsm_clock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void vc4_hdmi_put_ddc_device(void *ptr)
|
||||
|
|
Loading…
Reference in New Issue