Activity log for bug #1782689

Date Who What changed Old value New value Message
2018-07-20 03:38:36 Hui Wang bug added bug
2018-07-20 03:39:30 Hui Wang bug added subscriber Canonical Hardware Enablement
2018-07-20 03:39:37 Hui Wang tags originate-from-1775331 somerville
2018-07-20 03:40:12 Hui Wang linux (Ubuntu): importance Undecided Critical
2018-07-20 04:00:07 Ubuntu Kernel Bot linux (Ubuntu): status New Incomplete
2018-07-20 06:40:39 Hui Wang description Steps: 1. Install manifest and boot into OS 2. Connect an external monitor via HDMI port 3. Check sound setting Expected results: System should able to detect HDMI audio output Actual results: System can't detect HDMI audio output Failure rate: 2/2 This bug comes from the OEM project, and the engineer Jim Qu from AMD took almost 2 weeks to investigate this problem, then he worte these two patches to fix this problem and now the patches are merged to sound repository. According to Jim Qu's investigation, the root cause of this problem is: 1. there is two GPU on the system. iGPU has a audio codec for HDMI output, and dGPU is without audio codec it is only for offload rendering. 2. under runtime pm, when dGPU suspend, amdgpu will also call vgaswitchroo driver to power off audio which vgaswitchroo client is VGA_SWITCHEROO_DIS. 3. In current HDA audio driver, the iGPU's audio will register to vgaswitchroo as VGA_SWITCHEROO_DIS, therefore, the audio will be selected and powered off by runtime pm. [Impact] On the Dell Latitude 5495, If we plug a monitor with audio capability to the HDMI/DP ports, we can't find HDMI/DP audio sinks as expected, then we can't play any sound through HDMI/DP audio. [Fix] With these two patches, the driver will not always set vgaswicheroo clients of HDA audio as VGA_SWITCHEROO_DIS, it will set it to _DIS or _IGD with the help of callback function of DRM drivers. So on this machine, the vgaswicheroo client will be set _IGD, then it will not be powered off when discrete gpu is powered off. [Test Case] We tested plug/unplug detection and playback through HDMI/DP audio, everything works well. [Regression Potential] Very low, without these two patches, the vgaswitchroo client of audio will be set to _DIS unconditionally, it did not expose any problem because in the past, all the HDMI/DP audio codecs are in the discreate GPU. But on Latitude 5495, the HDMI/DP audio codec is in the integrated GPU, so we need to change the driver to let DRM driver decide if it is _DIS or _IGD, it will not introduce regression for old mahcines on old machines, the client will be set to _DIS as before. And we have tested these two patches on some old machines with two gpus like A+A , I+A and I+N, all of them worked well as before.
2018-07-30 10:37:36 Stefan Bader bug task added linux-oem (Ubuntu)
2018-07-30 10:37:45 Stefan Bader nominated for series Ubuntu Bionic
2018-07-30 10:37:45 Stefan Bader bug task added linux (Ubuntu Bionic)
2018-07-30 10:37:45 Stefan Bader bug task added linux-oem (Ubuntu Bionic)
2018-07-31 00:18:44 Hui Wang description This bug comes from the OEM project, and the engineer Jim Qu from AMD took almost 2 weeks to investigate this problem, then he worte these two patches to fix this problem and now the patches are merged to sound repository. According to Jim Qu's investigation, the root cause of this problem is: 1. there is two GPU on the system. iGPU has a audio codec for HDMI output, and dGPU is without audio codec it is only for offload rendering. 2. under runtime pm, when dGPU suspend, amdgpu will also call vgaswitchroo driver to power off audio which vgaswitchroo client is VGA_SWITCHEROO_DIS. 3. In current HDA audio driver, the iGPU's audio will register to vgaswitchroo as VGA_SWITCHEROO_DIS, therefore, the audio will be selected and powered off by runtime pm. [Impact] On the Dell Latitude 5495, If we plug a monitor with audio capability to the HDMI/DP ports, we can't find HDMI/DP audio sinks as expected, then we can't play any sound through HDMI/DP audio. [Fix] With these two patches, the driver will not always set vgaswicheroo clients of HDA audio as VGA_SWITCHEROO_DIS, it will set it to _DIS or _IGD with the help of callback function of DRM drivers. So on this machine, the vgaswicheroo client will be set _IGD, then it will not be powered off when discrete gpu is powered off. [Test Case] We tested plug/unplug detection and playback through HDMI/DP audio, everything works well. [Regression Potential] Very low, without these two patches, the vgaswitchroo client of audio will be set to _DIS unconditionally, it did not expose any problem because in the past, all the HDMI/DP audio codecs are in the discreate GPU. But on Latitude 5495, the HDMI/DP audio codec is in the integrated GPU, so we need to change the driver to let DRM driver decide if it is _DIS or _IGD, it will not introduce regression for old mahcines on old machines, the client will be set to _DIS as before. And we have tested these two patches on some old machines with two gpus like A+A , I+A and I+N, all of them worked well as before. In the v2: the patchset is also sent to OEM-B since the OEM project is waiting for the patchset. The v1 introduced a building error, my investigation is shown as below: The declaration of "enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev);" and the implementation of "static int nouveau_dsm_get_client_id(struct pci_dev *pdev)" exist in the kernel (bionic, artful) for a long time, but "-Werror=incompatible-pointer-types" didn't report it as an error, after applied these 2 patches, it is reported as an error, that is because the patch touches the definition of "enum vga_switcheroo_client_id", before applying these 2 patches, the vga_switcheroo_client_id includes a negative numer: VGA_SWITCHEROO_UNKNOWN_ID = -1, but after applying the patches, there is no negative number anymore in the "enum vga_swicheroo_client_id". I guess if the definition of enum includes negative number, the c compiler treat it as int type, that is why artful and bionic did not expose building error before. To fix the building error, I cherry-picked 4 more patches [3/6-6/6], and the purpose of those 4 patches is straightforward. In the v1: This bug comes from the OEM project, and the engineer Jim Qu from AMD took almost 2 weeks to investigate this problem, then he worte these two patches to fix this problem and now the patches are merged to sound repository. According to Jim Qu's investigation, the root cause of this problem is: 1. there is two GPU on the system. iGPU has a audio codec for HDMI output,    and dGPU is without audio codec it is only for offload rendering. 2. under runtime pm, when dGPU suspend, amdgpu will also call vgaswitchroo    driver to power off audio which vgaswitchroo client is VGA_SWITCHEROO_DIS. 3. In current HDA audio driver, the iGPU's audio will register to vgaswitchroo    as VGA_SWITCHEROO_DIS, therefore, the audio will be selected and powered off    by runtime pm. [Impact] On the Dell Latitude 5495, If we plug a monitor with audio capability to the HDMI/DP ports, we can't find HDMI/DP audio sinks as expected, then we can't play any sound through HDMI/DP audio. [Fix] With these 6 patches, the driver will not always set vgaswicheroo clients of HDA audio as VGA_SWITCHEROO_DIS, it will set it to _DIS or _IGD with the help of callback function of DRM drivers. So on this machine, the vgaswicheroo client will be set _IGD, then it will not be powered off when discrete gpu is powered off. [Test Case] We tested plug/unplug detection and playback through HDMI/DP audio, everything works well. [Regression Potential] Very low, without these 6 patches, the vgaswitchroo client of audio will be set to _DIS unconditionally, it did not expose any problem because in the past, all the HDMI/DP audio codecs are in the discreate GPU. But on Latitude 5495, the HDMI/DP audio codec is in the integrated GPU, so we need to change the driver to let DRM driver decide if it is _DIS or _IGD, it will not introduce regression for old mahcines on old machines, the client will be set to _DIS as before. And we have tested these two patches on some old machines with two gpus like A+A , I+A and I+N, all of them worked well as before.
2018-07-31 00:25:05 Hui Wang description In the v2: the patchset is also sent to OEM-B since the OEM project is waiting for the patchset. The v1 introduced a building error, my investigation is shown as below: The declaration of "enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev);" and the implementation of "static int nouveau_dsm_get_client_id(struct pci_dev *pdev)" exist in the kernel (bionic, artful) for a long time, but "-Werror=incompatible-pointer-types" didn't report it as an error, after applied these 2 patches, it is reported as an error, that is because the patch touches the definition of "enum vga_switcheroo_client_id", before applying these 2 patches, the vga_switcheroo_client_id includes a negative numer: VGA_SWITCHEROO_UNKNOWN_ID = -1, but after applying the patches, there is no negative number anymore in the "enum vga_swicheroo_client_id". I guess if the definition of enum includes negative number, the c compiler treat it as int type, that is why artful and bionic did not expose building error before. To fix the building error, I cherry-picked 4 more patches [3/6-6/6], and the purpose of those 4 patches is straightforward. In the v1: This bug comes from the OEM project, and the engineer Jim Qu from AMD took almost 2 weeks to investigate this problem, then he worte these two patches to fix this problem and now the patches are merged to sound repository. According to Jim Qu's investigation, the root cause of this problem is: 1. there is two GPU on the system. iGPU has a audio codec for HDMI output,    and dGPU is without audio codec it is only for offload rendering. 2. under runtime pm, when dGPU suspend, amdgpu will also call vgaswitchroo    driver to power off audio which vgaswitchroo client is VGA_SWITCHEROO_DIS. 3. In current HDA audio driver, the iGPU's audio will register to vgaswitchroo    as VGA_SWITCHEROO_DIS, therefore, the audio will be selected and powered off    by runtime pm. [Impact] On the Dell Latitude 5495, If we plug a monitor with audio capability to the HDMI/DP ports, we can't find HDMI/DP audio sinks as expected, then we can't play any sound through HDMI/DP audio. [Fix] With these 6 patches, the driver will not always set vgaswicheroo clients of HDA audio as VGA_SWITCHEROO_DIS, it will set it to _DIS or _IGD with the help of callback function of DRM drivers. So on this machine, the vgaswicheroo client will be set _IGD, then it will not be powered off when discrete gpu is powered off. [Test Case] We tested plug/unplug detection and playback through HDMI/DP audio, everything works well. [Regression Potential] Very low, without these 6 patches, the vgaswitchroo client of audio will be set to _DIS unconditionally, it did not expose any problem because in the past, all the HDMI/DP audio codecs are in the discreate GPU. But on Latitude 5495, the HDMI/DP audio codec is in the integrated GPU, so we need to change the driver to let DRM driver decide if it is _DIS or _IGD, it will not introduce regression for old mahcines on old machines, the client will be set to _DIS as before. And we have tested these two patches on some old machines with two gpus like A+A , I+A and I+N, all of them worked well as before. In the v2: the patchset is also sent to OEM-B since the OEM project is waiting for the patchset. The v1 introduced a building error, my investigation is shown as below: The declaration of "enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *pdev);"and the implementation of "static int nouveau_dsm_get_client_id(struct pci_dev *pdev)" exist in the kernel (bionic, artful) for a long time, but "-Werror=incompatible-pointer-types" didn't report it as an error, after applied these 2 patches, it is reported as an error, that is because the patch touches the definition of "enum vga_switcheroo_client_id", before applying these 2 patches, the vga_switcheroo_client_id includes a negative numer:VGA_SWITCHEROO_UNKNOWN_ID = -1, but after applying the patches, there is no negative number anymore in the "enum vga_swicheroo_client_id". I guess if the definition of enum includes negative number, the c compiler treat it as int type, that is why artful and bionic did not expose building error before. To fix the building error, I cherry-picked 4 more patches [3/6-6/6], and the purpose of those 4 patches is straightforward. In the v1: This bug comes from the OEM project, and the engineer Jim Qu from AMD took almost 2 weeks to investigate this problem, then he worte two patches to fix this problem and now the patches are merged to sound repository. According to Jim Qu's investigation, the root cause of this problem is: 1. there is two GPU on the system. iGPU has a audio codec for HDMI output, and dGPU is without audio codec it is only for offload rendering. 2. under runtime pm, when dGPU suspend, amdgpu will also call vgaswitchroo driver to power off audio which vgaswitchroo client is VGA_SWITCHEROO_DIS. 3. In current HDA audio driver, the iGPU's audio will register to vgaswitchroo as VGA_SWITCHEROO_DIS, therefore, the audio will be selected and powered off by runtime pm. [Impact] On the Dell Latitude 5495, If we plug a monitor with audio capability to the HDMI/DP ports, we can't find HDMI/DP audio sinks as expected, then we can't play any sound through HDMI/DP audio. [Fix] With these 6 patches, the driver will not always set vgaswicheroo clients of HDA audio as VGA_SWITCHEROO_DIS, it will set it to _DIS or _IGD with the help of callback function of DRM drivers. So on this machine, the vgaswicheroo client will be set _IGD, then it will not be powered off when discrete gpu is powered off. [Test Case] We tested plug/unplug detection and playback through HDMI/DP audio, everything works well. [Regression Potential] Very low, without these 6 patches, the vgaswitchroo client of audio will be set to _DIS unconditionally, it did not expose any problem because in the past, all the HDMI/DP audio codecs are in the discreate GPU. But on Latitude 5495, the HDMI/DP audio codec is in the integrated GPU, so we need to change the driver to let DRM driver decide if it is _DIS or _IGD, it will not introduce regression for old mahcines on old machines, the client will be set to _DIS as before. And we have tested these two patches on some old machines with two gpus like A+A, I+A and I+N, all of them worked well as before.
2018-07-31 13:58:24 Kleber Sacilotto de Souza linux (Ubuntu Bionic): status New Fix Committed
2018-08-01 13:09:49 Seth Forshee linux (Ubuntu): status Incomplete Fix Committed
2018-08-07 14:01:44 Brad Figg tags originate-from-1775331 somerville originate-from-1775331 somerville verification-needed-bionic
2018-08-16 13:27:56 Launchpad Janitor linux (Ubuntu): status Fix Committed Fix Released
2018-08-16 13:27:56 Launchpad Janitor cve linked 2018-12233
2018-08-16 13:27:56 Launchpad Janitor cve linked 2018-13094
2018-08-23 13:23:09 Launchpad Janitor linux (Ubuntu Bionic): status Fix Committed Fix Released
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-10323
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-10840
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-10881
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-1108
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-11412
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-11506
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-12232
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-12904
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-13405
2018-08-23 13:23:09 Launchpad Janitor cve linked 2018-13406
2018-08-27 07:00:56 Launchpad Janitor linux-oem (Ubuntu Bionic): status New Fix Released
2018-08-29 17:30:18 Anthony Wong linux-oem (Ubuntu): status New Invalid
2018-08-29 17:30:21 Anthony Wong hwe-next: status New Fix Released
2018-09-10 11:05:46 Launchpad Janitor linux-oem (Ubuntu): status Invalid Fix Released
2018-09-14 00:38:02 Hui Wang tags originate-from-1775331 somerville verification-needed-bionic originate-from-1775331 somerville verification-done-bionic
2019-07-24 20:18:38 Brad Figg tags originate-from-1775331 somerville verification-done-bionic cscc originate-from-1775331 somerville verification-done-bionic