Bug 1105282 - vc4 not working in linuxrc because of PCM
vc4 not working in linuxrc because of PCM
Status: RESOLVED WORKSFORME
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel
Current
aarch64 All
: P3 - Medium : Normal (vote)
: ---
Assigned To: Ivan Ivanov
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-19 20:11 UTC by Alexander Graf
Modified: 2021-07-30 06:33 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Graf 2018-08-19 20:11:18 UTC
When I boot up the current Tumbleweed installer system on the Raspberry Pi, HDMI output is not showing. This is related to the vc4 driver being unable to properly load:

[   17.735109] vc4_hdmi 3f902000.hdmi: Could not register PCM component: -517
[   17.742312] vc4-drm soc:gpu: failed to bind 3f902000.hdmi (ops vc4_hdmi_ops [vc4]): -517
[   17.750679] vc4-drm soc:gpu: master bind failed: -517

I think there are 2 bugs here really:

The first one is with vc4. It shouldn't declare itself as viable graphics output driver (kicking out the well working efifb one) when it can not find all of its dependencies.

The other one is that we probably need to include snd_pcm and snd_soc_core in the linuxrc initrd so that vc4 does load properly and allows us to install:

rpi31:~ # lsmod | grep -i snd
snd_soc_core          237568  1 vc4
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm               151552  3 vc4,snd_pcm_dmaengine,snd_soc_core
snd_timer              36864  1 snd_pcm
snd                   106496  3 snd_timer,snd_soc_core,snd_pcm
soundcore              20480  1 snd

I'll leave it to Andreas to determine who to assign this bug to and thus which path of the 2 to fix this we should take ;).
Comment 1 Stefan Dirsch 2018-08-20 09:55:05 UTC
(In reply to Alexander Graf from comment #0)
> The first one is with vc4. It shouldn't declare itself as viable graphics
> output driver (kicking out the well working efifb one) when it can not find
> all of its dependencies.

mbrugger/yKaukab (our Hardware enablement team members dedicated to ARM)

> The other one is that we probably need to include snd_pcm and snd_soc_core
> in the linuxrc initrd so that vc4 does load properly and allows us to
> install:

snwint? (installation-images)
Comment 2 Steffen Winterfeldt 2018-08-20 10:07:47 UTC
Even if I add snd_pcm manually nobody will load it automatically unless the dependencies are right. So, if snd_pcm is needed for vc4 to function properly,
please add a module dependency.
Comment 3 Stefan Dirsch 2018-08-20 10:21:13 UTC
(In reply to Steffen Winterfeldt from comment #2)
> Even if I add snd_pcm manually nobody will load it automatically unless the
> dependencies are right. So, if snd_pcm is needed for vc4 to function
> properly,
> please add a module dependency.

Sure, this is bug number one. ;-)
Comment 4 Andreas Färber 2018-10-19 15:29:17 UTC
Matthias/Yousaf, please take a look at why vc4 is pulling in snd_pcm without dracut noticing. Understanding that would be the first step to figuring out who can fix in which way.

In general I would prefer a solution that does not require us to maintain a hardcoded list of modules to include in the initrd.
Not sure whether the efifb rollback Alex suggested is viable - vc4 may need to error out early with -EPROBE_DEFER before touching the screen for that to work.
Comment 5 Takashi Iwai 2018-10-19 18:00:13 UTC
(In reply to Andreas Färber from comment #4)
> Matthias/Yousaf, please take a look at why vc4 is pulling in snd_pcm without
> dracut noticing. Understanding that would be the first step to figuring out
> who can fix in which way.

It's simply because vc4 driver supports HDMI audio.
And there is no option to disable it, hence loading the sound module beforehand is mandatory as a hard dependency.

This doesn't happen on other graphics drivers on PC, because they have a dynamic binding using component (i915) or communicating indirectly via HD-audio bus (AMD, Nvidia) regarding HDMI audio.
Comment 6 Petr Tesařík 2019-04-11 10:52:07 UTC
This looks exactly like bug 1129815, just on Tumbleweed.
Comment 7 Petr Tesařík 2021-05-25 12:38:42 UTC
@Ivan: Can you check if this is still an issue with current Tumbleweed, please?
Comment 8 Ivan Ivanov 2021-05-26 08:40:25 UTC
(In reply to Petr Tesařík from comment #7)
> @Ivan: Can you check if this is still an issue with current Tumbleweed,
> please?

Tested with openSUSE-Tumbleweed-DVD-aarch64-Snapshot20210517-Media.iso

On both RPi 3 and 4 HDMI output is initialised fine and GUI of the
installer is visible on external monitor.

# lsmod | grep -i snd 
snd_soc_core          299008  1 vc4
snd_compress           32768  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      20480  1 snd_soc_core
snd_pcm               163840  4 vc4,snd_compress,snd_soc_core,snd_pcm_dmaengine
snd_timer              45056  1 snd_pcm
snd                   114688  4 snd_timer,snd_compress,snd_soc_core,snd_pcm
soundcore              20480  1 snd

# grep vc4 /var/log/boot.msg
<6>[   38.555010] rc rc0: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0
<6>[   38.555346] input: vc4 as /devices/platform/soc/3f902000.hdmi/rc/rc0/input0
<3>[   38.556421] debugfs: Directory '3f902000.hdmi' with parent 'vc4-hdmi' already present!
<6>[   38.562996] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
<6>[   38.563385] vc4-drm soc:gpu: bound 3f806000.vec (ops vc4_vec_ops [vc4])
<6>[   38.563664] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
<6>[   38.563991] vc4-drm soc:gpu: bound 3f004000.txp (ops vc4_txp_ops [vc4])
<6>[   38.564287] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
<6>[   38.564615] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
<6>[   38.564884] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
<6>[   38.565102] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
<6>[   38.565887] fb0: switching to vc4drmfb from EFI VGA
<6>[   38.591288] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
<6>[   38.744472] vc4-drm soc:gpu: [drm] fb0: vc4drmfb frame buffer device
Comment 9 Ivan Ivanov 2021-07-30 06:33:59 UTC
It looks it is fixed already. Closing this bug.