2016-03-14 00:51:05

by kernel test robot

[permalink] [raw]
Subject: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

FYI, we noticed the below changes on

https://github.com/0day-ci/linux Takashi-Iwai/ALSA-hda-Add-a-sanity-check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda - Add a sanity check of pin / port mapping on i915 HDMI/DP")


[ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 14.549740] fbcon: inteldrmfb (fb0) is primary device
[ 14.553691] ------------[ cut here ]------------
[ 14.553707] WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
[ 14.553750] Modules linked in: snd_hda_codec_hdmi(+) snd_hda_codec_conexant snd_hda_codec_generic ppdev coretemp mxm_wmi kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul snd_hda_intel crc32c_intel snd_hda_codec ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ahci ablk_helper libahci cryptd serio_raw pcspkr snd_hda_core snd_hwdep intel_ips firewire_ohci libata sdhci_pci sdhci firewire_core mmc_core crc_itu_t uvcvideo snd_pcm shpchp videobuf2_vmalloc snd_timer i915 videobuf2_memops videobuf2_v4l2 videobuf2_core drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops videodev drm thinkpad_acpi snd soundcore rfkill parport_pc parport wmi video acpi_cpufreq
[ 14.553755] CPU: 0 PID: 151 Comm: systemd-udevd Not tainted 4.5.0-rc6-00126-gca53fbf #1
[ 14.553756] Hardware name: LENOVO 25222AU/25222AU, BIOS 6IET52WW (1.12 ) 02/16/2010
[ 14.553760] 0000000000000000 ffff88007f58fa40 ffffffff81425b9a 0000000000000000
[ 14.553763] ffffffffa0417238 ffff88007f58fa78 ffffffff81079fe6 ffff88007ea5bcc0
[ 14.553765] ffff88007f6ffa08 ffff88007f6ffa10 0000000000000100 ffff880130afc330
[ 14.553766] Call Trace:
[ 14.553777] [<ffffffff81425b9a>] dump_stack+0x63/0x89
[ 14.553783] [<ffffffff81079fe6>] warn_slowpath_common+0x86/0xc0
[ 14.553787] [<ffffffff8107a0da>] warn_slowpath_null+0x1a/0x20
[ 14.553796] [<ffffffffa04144fa>] pin2port+0x2a/0x40 [snd_hda_core]
[ 14.553805] [<ffffffffa04145ad>] snd_hdac_acomp_get_eld+0x3d/0x70 [snd_hda_core]
[ 14.553813] [<ffffffffa04858c3>] hdmi_present_sense+0x93/0x360 [snd_hda_codec_hdmi]
[ 14.553820] [<ffffffffa0485f84>] generic_hdmi_build_controls+0x124/0x200 [snd_hda_codec_hdmi]
[ 14.553835] [<ffffffffa04d0876>] snd_hda_codec_build_controls+0x196/0x1d0 [snd_hda_codec]
[ 14.553846] [<ffffffffa04d0b56>] ? snd_hda_codec_build_pcms+0xe6/0x1a0 [snd_hda_codec]
[ 14.553854] [<ffffffffa04cb457>] hda_codec_driver_probe+0x87/0x100 [snd_hda_codec]
[ 14.553859] [<ffffffff81574ace>] driver_probe_device+0x22e/0x450
[ 14.553862] [<ffffffff81574d74>] __driver_attach+0x84/0x90
[ 14.553865] [<ffffffff81574cf0>] ? driver_probe_device+0x450/0x450
[ 14.553868] [<ffffffff81572664>] bus_for_each_dev+0x64/0xa0
[ 14.553870] [<ffffffff8157437e>] driver_attach+0x1e/0x20
[ 14.553873] [<ffffffff81573e41>] bus_add_driver+0x1f1/0x290
[ 14.553876] [<ffffffffa0087000>] ? 0xffffffffa0087000
[ 14.553878] [<ffffffff815757a0>] driver_register+0x60/0xe0
[ 14.553886] [<ffffffffa04cb0da>] __hda_codec_driver_register+0x5a/0x60 [snd_hda_codec]
[ 14.553892] [<ffffffffa008701e>] hdmi_driver_init+0x1e/0x1000 [snd_hda_codec_hdmi]
[ 14.553896] [<ffffffff81002123>] do_one_initcall+0xb3/0x1d0
[ 14.553900] [<ffffffff8116dbaa>] ? do_init_module+0x27/0x1da
[ 14.553903] [<ffffffff811d0f61>] ? kmem_cache_alloc_trace+0x1a1/0x210
[ 14.553906] [<ffffffff8116dbe3>] do_init_module+0x60/0x1da
[ 14.553910] [<ffffffff81100dbd>] load_module+0x1f8d/0x2530
[ 14.553913] [<ffffffff810fd630>] ? __symbol_put+0x40/0x40
[ 14.553918] [<ffffffff8110155e>] SYSC_finit_module+0x7e/0xa0
[ 14.553922] [<ffffffff8110159e>] SyS_finit_module+0xe/0x10
[ 14.553927] [<ffffffff818e4eee>] entry_SYSCALL_64_fastpath+0x12/0x6d


To reproduce:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp run job.yaml



Thanks,
Kernel Test Robot


Attachments:
(No filename) (3.99 kB)
config-4.5.0-rc6-00126-gca53fbf (142.07 kB)
kmsg.xz (24.48 kB)
job.yaml (2.92 kB)
reproduce (20.17 kB)
Download all attachments

2016-03-14 07:23:12

by Takashi Iwai

[permalink] [raw]
Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

On Mon, 14 Mar 2016 01:50:45 +0100,
kernel test robot wrote:
>
> FYI, we noticed the below changes on
>
> https://github.com/0day-ci/linux Takashi-Iwai/ALSA-hda-Add-a-sanity-check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda - Add a sanity check of pin / port mapping on i915 HDMI/DP")
>
>
> [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
> [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> [ 14.553691] ------------[ cut here ]------------
> [ 14.553707] WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

Does your tree contain the commit
2f791908a70e95768596f5bb9e6de4f441d7bf13
drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW
?

The commit above should cover it even for HSW.

If it's already included, then it's really a bug, and the warning is
exactly for catching such a bug. The HD-audio driver expects that the
valid audio ports are only from port B to port D while i915 driver
assigns a different one. I suspect that the current assumption is too
naive and broken for SKL and later in this regard.

Libin, Mengdong, could you check whether the audio port mapping rule
is still valid? At least, a wrong port-A mapping could be reproduced
even on a HSW laptop with DP-MST dock when I boot without eDP
(e.g. video=eDP-1:d option).


thanks,

Takashi

2016-03-14 12:02:52

by Yang, Libin

[permalink] [raw]
Subject: RE: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

Hi Takashi,

> -----Original Message-----
> From: Takashi Iwai [mailto:[email protected]]
> Sent: Monday, March 14, 2016 3:23 PM
> To: kernel test robot
> Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin, Mengdong
> Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
>
> On Mon, 14 Mar 2016 01:50:45 +0100,
> kernel test robot wrote:
> >
> > FYI, we noticed the below changes on
> >
> > https://github.com/0day-ci/linux Takashi-Iwai/ALSA-hda-Add-a-sanity-
> check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda -
> Add a sanity check of pin / port mapping on i915 HDMI/DP")
> >
> >
> > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops
> i915_audio_component_bind_ops [i915])
> > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > [ 14.553691] ------------[ cut here ]------------
> > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
>
> Does your tree contain the commit
> 2f791908a70e95768596f5bb9e6de4f441d7bf13
> drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW
> ?
>
> The commit above should cover it even for HSW.
>
> If it's already included, then it's really a bug, and the warning is
> exactly for catching such a bug. The HD-audio driver expects that the
> valid audio ports are only from port B to port D while i915 driver
> assigns a different one. I suspect that the current assumption is too
> naive and broken for SKL and later in this regard.
>
> Libin, Mengdong, could you check whether the audio port mapping rule
> is still valid? At least, a wrong port-A mapping could be reproduced
> even on a HSW laptop with DP-MST dock when I boot without eDP
> (e.g. video=eDP-1:d option).

We checked with HW before, and the mapping should be right.
What's the problem now? I will check with our HW and gfx team.

Regards,
Libin

>
>
> thanks,
>
> Takashi

2016-03-14 13:02:56

by Takashi Iwai

[permalink] [raw]
Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

On Mon, 14 Mar 2016 13:02:39 +0100,
Yang, Libin wrote:
>
> Hi Takashi,
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:[email protected]]
> > Sent: Monday, March 14, 2016 3:23 PM
> > To: kernel test robot
> > Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin, Mengdong
> > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> >
> > On Mon, 14 Mar 2016 01:50:45 +0100,
> > kernel test robot wrote:
> > >
> > > FYI, we noticed the below changes on
> > >
> > > https://github.com/0day-ci/linux Takashi-Iwai/ALSA-hda-Add-a-sanity-
> > check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda -
> > Add a sanity check of pin / port mapping on i915 HDMI/DP")
> > >
> > >
> > > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops
> > i915_audio_component_bind_ops [i915])
> > > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > > [ 14.553691] ------------[ cut here ]------------
> > > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> >
> > Does your tree contain the commit
> > 2f791908a70e95768596f5bb9e6de4f441d7bf13
> > drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW
> > ?
> >
> > The commit above should cover it even for HSW.
> >
> > If it's already included, then it's really a bug, and the warning is
> > exactly for catching such a bug. The HD-audio driver expects that the
> > valid audio ports are only from port B to port D while i915 driver
> > assigns a different one. I suspect that the current assumption is too
> > naive and broken for SKL and later in this regard.
> >
> > Libin, Mengdong, could you check whether the audio port mapping rule
> > is still valid? At least, a wrong port-A mapping could be reproduced
> > even on a HSW laptop with DP-MST dock when I boot without eDP
> > (e.g. video=eDP-1:d option).
>
> We checked with HW before, and the mapping should be right.
> What's the problem now? I will check with our HW and gfx team.

One problem I've heard is that port-A is reported from i915 ELD
notifier. This happens when you disable eDP and use DP-MST on a HSW
machine. Then port A DDI is also used for the DP-MST, and when it's
plugged, it passes port=0 to the notifier.



Takashi

2016-03-14 15:30:40

by Lin, Mengdong

[permalink] [raw]
Subject: RE: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

> -----Original Message-----
> From: Takashi Iwai [mailto:[email protected]]
> Sent: Monday, March 14, 2016 9:03 PM
> To: Yang, Libin
> Cc: kernel test robot; [email protected]; LKML; Wu, Fengguang; Lin, Mengdong
> Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
>
> On Mon, 14 Mar 2016 13:02:39 +0100,
> Yang, Libin wrote:
> >
> > Hi Takashi,
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:[email protected]]
> > > Sent: Monday, March 14, 2016 3:23 PM
> > > To: kernel test robot
> > > Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin, Mengdong
> > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > >
> > > On Mon, 14 Mar 2016 01:50:45 +0100,
> > > kernel test robot wrote:
> > > >
> > > > FYI, we noticed the below changes on
> > > >
> > > > https://github.com/0day-ci/linux
> > > > Takashi-Iwai/ALSA-hda-Add-a-sanity-
> > > check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > > > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda -
> > > Add a sanity check of pin / port mapping on i915 HDMI/DP")
> > > >
> > > >
> > > > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0
> (ops
> > > i915_audio_component_bind_ops [i915])
> > > > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > > > [ 14.553691] ------------[ cut here ]------------
> > > > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > >
> > > Does your tree contain the commit
> > > 2f791908a70e95768596f5bb9e6de4f441d7bf13
> > > drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW ?
> > >
> > > The commit above should cover it even for HSW.
> > >
> > > If it's already included, then it's really a bug, and the warning is
> > > exactly for catching such a bug. The HD-audio driver expects that
> > > the valid audio ports are only from port B to port D while i915
> > > driver assigns a different one. I suspect that the current
> > > assumption is too naive and broken for SKL and later in this regard.
> > >
> > > Libin, Mengdong, could you check whether the audio port mapping rule
> > > is still valid? At least, a wrong port-A mapping could be
> > > reproduced even on a HSW laptop with DP-MST dock when I boot
> without
> > > eDP (e.g. video=eDP-1:d option).
> >
> > We checked with HW before, and the mapping should be right.
> > What's the problem now? I will check with our HW and gfx team.
>
> One problem I've heard is that port-A is reported from i915 ELD notifier.
> This happens when you disable eDP and use DP-MST on a HSW machine.
> Then port A DDI is also used for the DP-MST, and when it's plugged, it passes
> port=0 to the notifier.

Hi Takashi,

Could you or someone provide the output of intel_audio_dump when the error happens?
This can help us to check the pipe:port connections in GPU from the display register values.

For Haswell and later platforms, port A (DDI A) is only used for eDP, not for DP or HDMI. So I feel the DP-MST dock should not bridge port A to external monitors and so port A should not be reported by the ELD notifier.
Maybe the port mapping has bug since i915 support for DP MST is still ongoing.

Thanks
Mengdong

2016-03-14 17:11:55

by Takashi Iwai

[permalink] [raw]
Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

On Mon, 14 Mar 2016 16:30:22 +0100,
Lin, Mengdong wrote:
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:[email protected]]
> > Sent: Monday, March 14, 2016 9:03 PM
> > To: Yang, Libin
> > Cc: kernel test robot; [email protected]; LKML; Wu, Fengguang; Lin, Mengdong
> > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> >
> > On Mon, 14 Mar 2016 13:02:39 +0100,
> > Yang, Libin wrote:
> > >
> > > Hi Takashi,
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:[email protected]]
> > > > Sent: Monday, March 14, 2016 3:23 PM
> > > > To: kernel test robot
> > > > Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin, Mengdong
> > > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > >
> > > > On Mon, 14 Mar 2016 01:50:45 +0100,
> > > > kernel test robot wrote:
> > > > >
> > > > > FYI, we noticed the below changes on
> > > > >
> > > > > https://github.com/0day-ci/linux
> > > > > Takashi-Iwai/ALSA-hda-Add-a-sanity-
> > > > check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > > > > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda -
> > > > Add a sanity check of pin / port mapping on i915 HDMI/DP")
> > > > >
> > > > >
> > > > > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0
> > (ops
> > > > i915_audio_component_bind_ops [i915])
> > > > > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > > > > [ 14.553691] ------------[ cut here ]------------
> > > > > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > >
> > > > Does your tree contain the commit
> > > > 2f791908a70e95768596f5bb9e6de4f441d7bf13
> > > > drm/i915: Fix bogus dig_port_map[] assignment for pre-HSW ?
> > > >
> > > > The commit above should cover it even for HSW.
> > > >
> > > > If it's already included, then it's really a bug, and the warning is
> > > > exactly for catching such a bug. The HD-audio driver expects that
> > > > the valid audio ports are only from port B to port D while i915
> > > > driver assigns a different one. I suspect that the current
> > > > assumption is too naive and broken for SKL and later in this regard.
> > > >
> > > > Libin, Mengdong, could you check whether the audio port mapping rule
> > > > is still valid? At least, a wrong port-A mapping could be
> > > > reproduced even on a HSW laptop with DP-MST dock when I boot
> > without
> > > > eDP (e.g. video=eDP-1:d option).
> > >
> > > We checked with HW before, and the mapping should be right.
> > > What's the problem now? I will check with our HW and gfx team.
> >
> > One problem I've heard is that port-A is reported from i915 ELD notifier.
> > This happens when you disable eDP and use DP-MST on a HSW machine.
> > Then port A DDI is also used for the DP-MST, and when it's plugged, it passes
> > port=0 to the notifier.
>
> Hi Takashi,
>
> Could you or someone provide the output of intel_audio_dump when the error happens?
> This can help us to check the pipe:port connections in GPU from the display register values.
>
> For Haswell and later platforms, port A (DDI A) is only used for eDP, not for DP or HDMI. So I feel the DP-MST dock should not bridge port A to external monitors and so port A should not be reported by the ELD notifier.
> Maybe the port mapping has bug since i915 support for DP MST is still ongoing.

Below are four outputs with 4.5-final kernel:

Normal boot
* intel-audio-laptop-normal DP monitor connected to built-in DP port
* intel-audio-dock-normal DP monitor connected to dock DP port

Boot with video=eDP-1:d option
* intel-audio-laptop-noedp DP monitor connected to built-in DP port
* intel-audio-dock-noedp DP monitor connected to dock DP port

I didn't check whether *this* kernel really caused the issue. But, at
least, the last case (intel-audio-dock-noedp) triggered eld notifier
with port=0 in the past with 4.5-rc7.


HTH,

Takashi


Attachments:
intel-audio-laptop-normal (14.70 kB)
intel-audio-dock-normal (14.82 kB)
intel-audio-laptop-noedp (14.83 kB)
intel-audio-dock-noedp (14.83 kB)
Download all attachments

2016-03-15 16:11:24

by Lin, Mengdong

[permalink] [raw]
Subject: RE: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

> -----Original Message-----
> From: Takashi Iwai [mailto:[email protected]]
> Sent: Tuesday, March 15, 2016 1:12 AM
>
> On Mon, 14 Mar 2016 16:30:22 +0100,
> Lin, Mengdong wrote:
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:[email protected]]
> > > Sent: Monday, March 14, 2016 9:03 PM
> > > To: Yang, Libin
> > > Cc: kernel test robot; [email protected]; LKML; Wu, Fengguang; Lin,
> > > Mengdong
> > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > >
> > > On Mon, 14 Mar 2016 13:02:39 +0100,
> > > Yang, Libin wrote:
> > > >
> > > > Hi Takashi,
> > > >
> > > > > -----Original Message-----
> > > > > From: Takashi Iwai [mailto:[email protected]]
> > > > > Sent: Monday, March 14, 2016 3:23 PM
> > > > > To: kernel test robot
> > > > > Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin, Mengdong
> > > > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151
> > > > > at
> > > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > > >
> > > > > On Mon, 14 Mar 2016 01:50:45 +0100, kernel test robot wrote:
> > > > > >
> > > > > > FYI, we noticed the below changes on
> > > > > >
> > > > > > https://github.com/0day-ci/linux
> > > > > > Takashi-Iwai/ALSA-hda-Add-a-sanity-
> > > > > check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > > > > > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA: hda
> -
> > > > > Add a sanity check of pin / port mapping on i915 HDMI/DP")
> > > > > >
> > > > > >
> > > > > > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0
> > > (ops
> > > > > i915_audio_component_bind_ops [i915])
> > > > > > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > > > > > [ 14.553691] ------------[ cut here ]------------
> > > > > > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> > > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > > >
> > > > > Does your tree contain the commit
> > > > > 2f791908a70e95768596f5bb9e6de4f441d7bf13
> > > > > drm/i915: Fix bogus dig_port_map[] assignment for
> pre-HSW ?
> > > > >
> > > > > The commit above should cover it even for HSW.
> > > > >
> > > > > If it's already included, then it's really a bug, and the
> > > > > warning is exactly for catching such a bug. The HD-audio driver
> > > > > expects that the valid audio ports are only from port B to port
> > > > > D while i915 driver assigns a different one. I suspect that the
> > > > > current assumption is too naive and broken for SKL and later in this
> regard.
> > > > >
> > > > > Libin, Mengdong, could you check whether the audio port mapping
> > > > > rule is still valid? At least, a wrong port-A mapping could be
> > > > > reproduced even on a HSW laptop with DP-MST dock when I boot
> > > without
> > > > > eDP (e.g. video=eDP-1:d option).
> > > >
> > > > We checked with HW before, and the mapping should be right.
> > > > What's the problem now? I will check with our HW and gfx team.
> > >
> > > One problem I've heard is that port-A is reported from i915 ELD notifier.
> > > This happens when you disable eDP and use DP-MST on a HSW machine.
> > > Then port A DDI is also used for the DP-MST, and when it's plugged,
> > > it passes
> > > port=0 to the notifier.
> >
> > Hi Takashi,
> >
> > Could you or someone provide the output of intel_audio_dump when the
> error happens?
> > This can help us to check the pipe:port connections in GPU from the
> display register values.
> >
> > For Haswell and later platforms, port A (DDI A) is only used for eDP, not for
> DP or HDMI. So I feel the DP-MST dock should not bridge port A to external
> monitors and so port A should not be reported by the ELD notifier.
> > Maybe the port mapping has bug since i915 support for DP MST is still
> ongoing.
>
> Below are four outputs with 4.5-final kernel:

Hi Takashi,

Thanks for your info!
I think the laptop built-in DP port uses port B (DDI B) and the dock DP port uses port C (DDI C).
It seems i915 connections may be wrong for the case "intel-audio-dock-noedp DP monitor connected to dock DP port".

> Normal boot
> * intel-audio-laptop-normal DP monitor connected to built-in DP port

Looks good:
Pipe A -> transcoder EDP -> DDI A (for EDP) ,
Pipe B -> transcoder B -> DDI B (port B, for DP monitor)

> * intel-audio-dock-normal DP monitor connected to dock DP port

Also looks good:
Pipe A -> transcoder EDP -> DDI A (for EDP)
Pipe B -> transcoder B -> DDI C (port C, for DP monitor)

> Boot with video=eDP-1:d option
> * intel-audio-laptop-noedp DP monitor connected to built-in DP port

Looks good:
Pipe A -> transcoder A -> DDI B (port B)

> * intel-audio-dock-noedp DP monitor connected to dock DP port

Seems wrong:
Pipe A -> transcoder A -> DDI B (port B, port 0 for the audio codec)
Pipe B -> transcoder B -> DDI C (port C, port 1 for the audio codec)

The connection between pipe A and DDI B may be wrong here and that's why eld notifier with port=0.
I think pipe A should connects to DDI C and pipe B should be free, then we can see eld notifier with port=1 (from DDI C).
>
> I didn't check whether *this* kernel really caused the issue. But, at least,
> the last case (intel-audio-dock-noedp) triggered eld notifier with port=0 in
> the past with 4.5-rc7.
>

Hi Libin,

Have you checked with GFX team?
We don't have HSW/BDW laptop with dock atm, but GFX team may have similar HW and be able to clarify the connections here.

Thanks
Mengdong

2016-03-16 03:15:16

by Lin, Mengdong

[permalink] [raw]
Subject: RE: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()

+ Jim and Jani from gfx team.

Thanks
Mengdong

> -----Original Message-----
> From: Lin, Mengdong
> Sent: Wednesday, March 16, 2016 12:11 AM
> To: Takashi Iwai
> Cc: Yang, Libin; kernel test robot; [email protected]; LKML; Wu, Fengguang
> Subject: RE: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:[email protected]]
> > Sent: Tuesday, March 15, 2016 1:12 AM
> >
> > On Mon, 14 Mar 2016 16:30:22 +0100,
> > Lin, Mengdong wrote:
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:[email protected]]
> > > > Sent: Monday, March 14, 2016 9:03 PM
> > > > To: Yang, Libin
> > > > Cc: kernel test robot; [email protected]; LKML; Wu, Fengguang; Lin,
> > > > Mengdong
> > > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151 at
> > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > >
> > > > On Mon, 14 Mar 2016 13:02:39 +0100, Yang, Libin wrote:
> > > > >
> > > > > Hi Takashi,
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Takashi Iwai [mailto:[email protected]]
> > > > > > Sent: Monday, March 14, 2016 3:23 PM
> > > > > > To: kernel test robot
> > > > > > Cc: [email protected]; LKML; Wu, Fengguang; Yang, Libin; Lin,
> > > > > > Mengdong
> > > > > > Subject: Re: [lkp] [ALSA] ca53fbf3a6: WARNING: CPU: 0 PID: 151
> > > > > > at
> > > > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > > > >
> > > > > > On Mon, 14 Mar 2016 01:50:45 +0100, kernel test robot wrote:
> > > > > > >
> > > > > > > FYI, we noticed the below changes on
> > > > > > >
> > > > > > > https://github.com/0day-ci/linux
> > > > > > > Takashi-Iwai/ALSA-hda-Add-a-sanity-
> > > > > > check-of-pin-port-mapping-on-i915-HDMI-DP/20160310-225740
> > > > > > > commit ca53fbf3a609b6831222078af9ddbecbf76fddce ("ALSA:
> hda
> > -
> > > > > > Add a sanity check of pin / port mapping on i915 HDMI/DP")
> > > > > > >
> > > > > > >
> > > > > > > [ 14.546058] snd_hda_intel 0000:00:1b.0: bound
> 0000:00:02.0
> > > > (ops
> > > > > > i915_audio_component_bind_ops [i915])
> > > > > > > [ 14.549740] fbcon: inteldrmfb (fb0) is primary device
> > > > > > > [ 14.553691] ------------[ cut here ]------------
> > > > > > > [ 14.553707] WARNING: CPU: 0 PID: 151 at
> > > > > > sound/hda/hdac_i915.c:129 pin2port+0x2a/0x40 [snd_hda_core]()
> > > > > >
> > > > > > Does your tree contain the commit
> > > > > > 2f791908a70e95768596f5bb9e6de4f441d7bf13
> > > > > > drm/i915: Fix bogus dig_port_map[] assignment for
> > pre-HSW ?
> > > > > >
> > > > > > The commit above should cover it even for HSW.
> > > > > >
> > > > > > If it's already included, then it's really a bug, and the
> > > > > > warning is exactly for catching such a bug. The HD-audio
> > > > > > driver expects that the valid audio ports are only from port B
> > > > > > to port D while i915 driver assigns a different one. I
> > > > > > suspect that the current assumption is too naive and broken
> > > > > > for SKL and later in this
> > regard.
> > > > > >
> > > > > > Libin, Mengdong, could you check whether the audio port
> > > > > > mapping rule is still valid? At least, a wrong port-A mapping
> > > > > > could be reproduced even on a HSW laptop with DP-MST dock
> when
> > > > > > I boot
> > > > without
> > > > > > eDP (e.g. video=eDP-1:d option).
> > > > >
> > > > > We checked with HW before, and the mapping should be right.
> > > > > What's the problem now? I will check with our HW and gfx team.
> > > >
> > > > One problem I've heard is that port-A is reported from i915 ELD notifier.
> > > > This happens when you disable eDP and use DP-MST on a HSW
> machine.
> > > > Then port A DDI is also used for the DP-MST, and when it's
> > > > plugged, it passes
> > > > port=0 to the notifier.
> > >
> > > Hi Takashi,
> > >
> > > Could you or someone provide the output of intel_audio_dump when
> the
> > error happens?
> > > This can help us to check the pipe:port connections in GPU from the
> > display register values.
> > >
> > > For Haswell and later platforms, port A (DDI A) is only used for
> > > eDP, not for
> > DP or HDMI. So I feel the DP-MST dock should not bridge port A to
> > external monitors and so port A should not be reported by the ELD notifier.
> > > Maybe the port mapping has bug since i915 support for DP MST is
> > > still
> > ongoing.
> >
> > Below are four outputs with 4.5-final kernel:
>
> Hi Takashi,
>
> Thanks for your info!
> I think the laptop built-in DP port uses port B (DDI B) and the dock DP port
> uses port C (DDI C).
> It seems i915 connections may be wrong for the case
> "intel-audio-dock-noedp DP monitor connected to dock DP port".
>
> > Normal boot
> > * intel-audio-laptop-normal DP monitor connected to built-in DP port
>
> Looks good:
> Pipe A -> transcoder EDP -> DDI A (for EDP) ,
> Pipe B -> transcoder B -> DDI B (port B, for DP monitor)
>
> > * intel-audio-dock-normal DP monitor connected to dock DP port
>
> Also looks good:
> Pipe A -> transcoder EDP -> DDI A (for EDP)
> Pipe B -> transcoder B -> DDI C (port C, for DP monitor)
>
> > Boot with video=eDP-1:d option
> > * intel-audio-laptop-noedp DP monitor connected to built-in DP port
>
> Looks good:
> Pipe A -> transcoder A -> DDI B (port B)
>
> > * intel-audio-dock-noedp DP monitor connected to dock DP port
>
> Seems wrong:
> Pipe A -> transcoder A -> DDI B (port B, port 0 for the audio codec)
> Pipe B -> transcoder B -> DDI C (port C, port 1 for the audio codec)
>
> The connection between pipe A and DDI B may be wrong here and that's
> why eld notifier with port=0.
> I think pipe A should connects to DDI C and pipe B should be free, then
> we can see eld notifier with port=1 (from DDI C).
> >
> > I didn't check whether *this* kernel really caused the issue. But, at
> > least, the last case (intel-audio-dock-noedp) triggered eld notifier
> > with port=0 in the past with 4.5-rc7.
> >
>
> Hi Libin,
>
> Have you checked with GFX team?
> We don't have HSW/BDW laptop with dock atm, but GFX team may have
> similar HW and be able to clarify the connections here.
>
> Thanks
> Mengdong