-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]Hot-Plug in HDMI cause kernel NULL pointer dereference address: 0000000000000010 #1536
Comments
Issue also reproduced when try DP-MST(connect two DP monitor through DP-HUB) Dmesg
|
Issue also can reproduced when try DP-MST(connect two DP monitor through DP-HUB) |
Issue also reproduced when try DP-MST(connect two DP monitor through DP-HUB) |
I'll take a look at this. |
I've been trying to reproduce this issue, but having hard time with this. I've tried both on CML and APL systems, but no issues with the hotplug. I used latest sof-dev and the downgrade to bc30957 mentioned in original bug report, but no issues seen at hdmi hotplug. I'll continue to try to reproduce. UPDATE: I tried with CFL and also various DP-MST scenarios, but still no luck. @dengyangchao does this still happen to you? |
Add debug messages to track ELD kcontrol creation and how they are mapped to notify calls from i915 driver upon hotplug. BugLink: thesofproject#1536
@dengyangchao If you can still reproduce this (on latest sof-dev), can you take #1550 , run the same scenario and share the dmesg. You won't get a kernel oops anymore with PR1550 and you should get following trace in dmesg "HDMI: NULL eld_ctl for pcm_idx". I cannot trigger this on any setups I have, the eld_ctl is always valid. |
@kv2019i Tried Hot-plug in HDMI, still reproduce the issue. And after applied #1550 dmesg as below:
|
Thanks @dengyangchao , this helps a lot. This line in the log reveals quite a bit: [ 91.988736] snd_hda_codec_hdmi ehdaudio0D2: HDMI: NULL eld_ctl for pcm_idx 3 ... we are getting an ELD update for non-existing PCM "pcm_idx 3". It's still unclear why this happens, but this helps in further debug. |
Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. BugLink: thesofproject#1536
Add debug messages to track ELD kcontrol creation and how they are mapped to notify calls from i915 driver upon hotplug. BugLink: thesofproject#1536
@dengyangchao I now pushed a potential fix plus a few more debug patches to #1550 |
@kv2019i The latest #1550 works, HDMI test pass, also tried DP-MST, PASS. Amixer contents can detect the unplug/plug status. Only one thing interesting, plug in HDMI first, detect it, and can aplay through HW:0,2
if then plug in DP, also can detect it. But HW:0,2 change to DP, HDMI change to HW:0,3(verified through aplay)
|
Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: thesofproject#1536 Fixes: 5398e94 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20191129143756.23941-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: thesofproject#1536 Fixes: 5398e94 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@dengyangchao wrote:
Thanks, this is good news! I submitted a cleaned up patch to alsa-devel and it was already merged:
Yes. this is now possible. HDMI gets disconnected in the process and reconnection may change the PCM number. I'll study this a bit further, but this is probably something we will not try to address. |
Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: thesofproject#1536 Fixes: 5398e94 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add debug messages to track ELD kcontrol creation and how they are mapped to notify calls from i915 driver upon hotplug. BugLink: thesofproject#1536
We need to investigate the behaviour of the i915 driver on this Chrome CML device a bit more. @dengyangchao , I sent you further details in email. |
After upstream #1576 merged, issue can't reproduce, close. |
Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: thesofproject/linux#1536 Fixes: 5398e94 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20191129143756.23941-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Lingpl <pei.lee.ling@intel.com>
BugLink: https://bugs.launchpad.net/bugs/1867704 Add additional check in hdmi_find_pcm_slot() to not return a pcm index that points to unallocated pcm. This could happen if codec driver is set up in codec->mst_no_extra_pcms mode. On some platforms, this leads to a kernel oops in snd_ctl_notify(), called via update_eld(). BugLink: thesofproject/linux#1536 Fixes: 5398e94fb753 ALSA: hda - Add DP-MST support for NVIDIA codecs Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20191129143756.23941-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de> (cherry picked from commit 0c0fe9e6b95ce2e9e2c83bef5563cf223e849eda) Signed-off-by: Hui Wang <hui.wang@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-By: AceLan Kao <acelan.kao@canonical.com> Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
Describe the bug
1.Hot Plug in hdmi cause kernel NULL pointer dereference, screen turn black and seems freeze.
2.Hot plug/unplug DP work fine, and can detect the unplug/plug status.
3.Power-off-> plug in HDMI -> power on, boot normal and show HDMI display, but amixer contents can't detect the HDMI. And unplug HDMI issue reproduced.
To Reproduce
1.Sudo reboot
2.Wait runtime PM status to suspend
3.Plug in HDMI
Reproduction Rate
5/5
Expected behavior
Detect HDMI normal and work fine
Impact
Cause kernel NULL pointer dereference, and system freeze
Environment
Platform: CML Chrome with onborad codec RT5682 in I2S mode
Firmware: 9b5dc8c https://github.com/thesofproject/sof/commits/master
Kernel: bc30957 https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: file: tools/topology/sof-cml-rt5682-max98357a.tplg same as firmware
dmesg.log
amixer.txt
The text was updated successfully, but these errors were encountered: