From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 75985] [NVC1] HDMI audio device only visible after rescan Date: Sat, 03 Mar 2018 10:41:53 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1567174320==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1567174320== Content-Type: multipart/alternative; boundary="15200737140.aa7635DD8.8222" Content-Transfer-Encoding: 7bit --15200737140.aa7635DD8.8222 Date: Sat, 3 Mar 2018 10:41:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D75985 --- Comment #37 from Lukas Wunner --- Related to this issue, I've just posted v2 of my patch set to use a device = link for power management of GPU-integrated HDA controllers: https://lists.freedesktop.org/archives/dri-devel/2018-March/168012.html It would be great if more people could test it. There's a 4.15-based branch available at: https://github.com/l1k/linux/commits/switcheroo_devlink_v2 Crucially, this patch lets the HDA controller autosuspend at its own descretion, rather than forcing it on whenever the GPU is on. It looks like writing to bit 25 of config space dword 0x488 powergates the HDA controller= . We could leverage that to runtime suspend the HDA controller to D3cold. I'll s= ee to it that I cook up a patch. As to the bit being cleared on boot, I think this should be done in a "head= er" PCI quirk rather than in nouveau. If you look at pci_scan_slot() and next_f= n() in drivers/pci/probe.c, you'll notice that device functions are scanned fro= m 0 upwards. So the GPU is always scanned first. Just add a PCI quirk which gets executed for the GPU, sets the bit and then reinitializes the multifunction flag in the GPU's struct pci_dev, that may already be sufficient. The PCI c= ore should do all the rest. See quirk_jmicron_ata() for an example. --=20 You are receiving this mail because: You are the assignee for the bug.= --15200737140.aa7635DD8.8222 Date: Sat, 3 Mar 2018 10:41:54 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 37 on bug 75985<= /a> from Lukas Wunner
Related to this issue, I've just posted v2 of my patch set to =
use a device link
for power management of GPU-integrated HDA controllers:
https://lists.freedesktop.org/archives/dri-devel/2018-March/168012=
.html

It would be great if more people could test it. There's a 4.15-based branch
available at:
http=
s://github.com/l1k/linux/commits/switcheroo_devlink_v2

Crucially, this patch lets the HDA controller autosuspend at its own
descretion, rather than forcing it on whenever the GPU is on. It looks like
writing to bit 25 of config space dword 0x488 powergates the HDA controller=
. We
could leverage that to runtime suspend the HDA controller to D3cold. I'll s=
ee
to it that I cook up a patch.

As to the bit being cleared on boot, I think this should be done in a "=
;header"
PCI quirk rather than in nouveau. If you look at pci_scan_slot() and next_f=
n()
in drivers/pci/probe.c, you'll notice that device functions are scanned fro=
m 0
upwards. So the GPU is always scanned first. Just add a PCI quirk which gets
executed for the GPU, sets the bit and then reinitializes the multifunction
flag in the GPU's struct pci_dev, that may already be sufficient. The PCI c=
ore
should do all the rest. See quirk_jmicron_ata() for an example.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15200737140.aa7635DD8.8222-- --===============1567174320== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============1567174320==--