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: Fri, 22 Dec 2017 19:15:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1205719160==" 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 --===============1205719160== Content-Type: multipart/alternative; boundary="15139701422.3ad2bBc5.18833"; charset="UTF-8" --15139701422.3ad2bBc5.18833 Date: Fri, 22 Dec 2017 19:15:42 +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 #22 from Daniel Drake --- Created attachment 136369 --> https://bugs.freedesktop.org/attachment.cgi?id=3D136369&action=3Dedit GP104: enable HDMI audio device function On Asus GL502VS I investigated why the gfx device must be removed before re= scan in the above workarounds. The reason is that when Linux first probes the device (before you attempt t= he workaround), pci_setup_device() notes that the device is not multifunction capable. This causes pci_scan_slot() to not bother scanning the non-zero functions (per the behaviour inside next_fn()). I checked and I found that when the 0x488 magic bit is not set, the gfx dev= ice advertises as non-multifunction. After the bit is set, the device advertise= s as multi-function. So, after setting the magic bit, removing the device will c= ause Linux to re-probe it during the next rescan, taking note at that point that= it is a multi-function device, and proceeding to scan the functions, finding t= he audio device at function 1. Based on that I have a first attempt at a fix. It's not working though, aud= io output is silent (but I did have it working with the previous workarounds). I'll look closer next week. --=20 You are receiving this mail because: You are the assignee for the bug.= --15139701422.3ad2bBc5.18833 Date: Fri, 22 Dec 2017 19:15:42 +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 # 22 on bug 75985<= /a> from Daniel Drake
Created attachment 136369 [details] [review]
GP104: enable HDMI audio device function

On Asus GL502VS I investigated why the gfx device must be removed before re=
scan
in the above workarounds.

The reason is that when Linux first probes the device (before you attempt t=
he
workaround), pci_setup_device() notes that the device is not multifunction
capable. This causes pci_scan_slot() to not bother scanning the non-zero
functions (per the behaviour inside next_fn()).

I checked and I found that when the 0x488 magic bit is not set, the gfx dev=
ice
advertises as non-multifunction. After the bit is set, the device advertise=
s as
multi-function. So, after setting the magic bit, removing the device will c=
ause
Linux to re-probe it during the next rescan, taking note at that point that=
 it
is a multi-function device, and proceeding to scan the functions, finding t=
he
audio device at function 1.

Based on that I have a first attempt at a fix. It's not working though, aud=
io
output is silent (but I did have it working with the previous workarounds).
I'll look closer next week.


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