Patch "drm/vc4: Add module dependency on hdmi-codec" has been added to the 5.15-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: Add module dependency on hdmi-codec

to the 5.15-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-add-module-dependency-on-hdmi-codec.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 749408b6713f5525b72ed4e9763176da39cb4a05
Author: Maxime Ripard <maxime@xxxxxxxxxx>
Date:   Fri Sep 2 16:41:11 2022 +0200

    drm/vc4: Add module dependency on hdmi-codec
    
    [ Upstream commit d1c0b7de4dfa5505cf7a1d6220aa72aace4435d0 ]
    
    The VC4 HDMI controller driver relies on the HDMI codec ASoC driver. In
    order to set it up properly, in vc4_hdmi_audio_init(), our HDMI driver
    will register a device matching the HDMI codec driver, and then register
    an ASoC card using that codec.
    
    However, if vc4 is compiled as a module, chances are that the hdmi-codec
    driver will be too. In such a case, the module loader will have a very
    narrow window to load the module between the device registration and the
    card registration.
    
    If it fails to load the module in time, the card registration will fail
    with EPROBE_DEFER, and we'll abort the audio initialisation,
    unregistering the HDMI codec device in the process.
    
    The next time the bind callback will be run, it's likely that we end up
    missing that window again, effectively preventing vc4 to probe entirely.
    
    In order to prevent this, we can create a soft dependency of the vc4
    driver on the HDMI codec one so that we're sure the HDMI codec will be
    loaded before the VC4 module is, and thus we'll never end up in the
    previous situation.
    
    Fixes: 91e99e113929 ("drm/vc4: hdmi: Register HDMI codec")
    Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
    Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220902144111.3424560-1-maxime@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index ef8fa2850ed6..d216a1fd057c 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -397,6 +397,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@xxxxxxxxxx>");
 MODULE_LICENSE("GPL v2");



[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