All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [Bug 75985] [NVC1] HDMI audio device only visible after rescan
Date: Fri, 09 Mar 2018 16:10:06 +0000	[thread overview]
Message-ID: <bug-75985-8800-ORJPyF23DV@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>


[-- Attachment #1.1: Type: text/plain, Size: 3716 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75985

--- Comment #63 from Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> ---
(In reply to Peter Wu from comment #59)
> (In reply to Lukas Wunner from comment #51)
> > On my GK107 I do not see any change in power consumption regardless whether
> > bit 25 at config space offset 0x488 is set or cleared, which is somewhat
> > disappointing. I also do not see a change in power consumption between PCI
> > power state D0 and D3hot.
> 
> Was this your macbook or a regular laptop? The Kepler family still used an
> ACPI _DSM method to remove power, setting the PM bit in the PCI config space
> did not do anything (this was at least true for my older Fermi card).

This was on my MacBook Pro. (Is that not a regular laptop? ;-) ) Power to the
GK107 GPU is cut and reinstated by the GMUX controller rather than a _DSM. I
can hide and expose the audio device by clearing or setting bit 25 at offset
0x488, but this does not change power consumption in any way. Only cutting
power to the GPU via GMUX does.

That the audio device is powergated on newer GPUs was only a theory. Because,
why would laptop vendors hide the audio device if nothing is connected? One
possible explanation is that it saves power. Someone needs to confirm or debunk
this theory by clearing and setting the bit and comparing power consumption in
powertop.


> Possibly relevant for this bug: I tested Lukas devlink_v2 patches but found
> some issues when the HDMI/DP cable was disconnected on a GTX 965M (where by
> default the audio function would not be visible):
> https://lists.freedesktop.org/archives/nouveau/2018-March/029988.html
> 
> Do you also experience issues after these steps:
> 1. remove+rescan to make audio function appear
> 2. remove GPU power (runtime PM or system sleep)
> 3. remove HDMI/DP cable
> 4. restore power
> 5. check dmesg or try to access audio function (e.g. read PCI regs)

I've had a look at the acpidump of your machine:
https://github.com/Lekensteyn/acpi-stuff/tree/master/dsl/Clevo_P651RA

Bit 25 at offset 0x488 is named NHDA. In two places (in the _ON method of the
root port's power resource and in _PS0 of the GPU device), the AML code probes
three GPIO pins and exposes the HDA controller if any of them are high, or else
hides the GPU. These GPIO pins are probably wired to HPD of the external
connectors.

I think what happens in the scenario you've described above is: On runtime
suspend or system suspend, the state of the HDA is saved (BARs etc). Because
the cable is disconnected, the HDA will be hidden on resume. Now the kernel
tries to wake the HDA device to D0 and will fail (you should see "Refused to
change power state, currently in D3" in dmesg). It will then restore the saved
state, which will also fail because the device is inaccessible. Also, the saved
state is invalidated and cannot be restored again. So the HDA's BARs are blank
until you remove+rescan.

I've just attached three patches, please try those on top of my
switcheroo_devlink_v2 series, they should fix the issue.

Crucially, patch [1/3] now also applies the PCI quirk during the resume_noirq
and runtime_resume phase. This means that in the scenario you've given above,
even though the BIOS may have hidden the HDA, that change will be undone by the
quirk. The quirk is executed for the GPU device. We know that the HDA device
will resume *after* the GPU device because of the device link.

I cannot test these patches myself because the HDA is never hidden on my
machine. So the patches are compile-tested only.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 4852 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2018-03-09 16:10 UTC|newest]

Thread overview: 123+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 15:56 [Bug 75985] New: HDMI audio device only visible after rescan bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-75985-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-03-10 16:00   ` [Bug 75985] [NVC1] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 16:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-10 23:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-15 23:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-16  6:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-07-16 17:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-11-05 22:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-12-22 23:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2016-12-22 23:05   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-26 10:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-26 22:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-28 12:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-09-30  2:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-04 21:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-12 15:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-14 19:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-10-15  4:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-11-10 23:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-11-11  0:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-18 16:06   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-22 19:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-23  2:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-27 16:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-27 17:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-28  2:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2017-12-28  3:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 19:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 20:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 20:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-03 21:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04  7:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04 11:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-01-04 23:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-02-27 12:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-01 10:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 10:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 13:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 13:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 14:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 15:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 15:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-03 17:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  0:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  0:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  1:07   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  1:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04  2:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 10:23   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 10:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 12:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-04 17:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 19:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 20:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-06 20:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-07 12:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 15:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-09 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ [this message]
2018-03-10  6:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 19:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 19:42   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-10 20:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-11 12:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-03-16  3:54   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-04-24 20:27   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-05-20  1:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-09-18 10:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2018-09-21 11:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-03-31  9:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-02 22:29   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-03 12:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-20  7:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-20  8:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-06-24  9:56   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-07-11  7:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28  8:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 10:08   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 10:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 12:28   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 12:55   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 15:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-28 15:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  8:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  8:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:52   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 10:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 12:32   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:13   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-02 17:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  3:50   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  6:37   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  8:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03  9:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03 16:11   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-03 16:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-04  0:21   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-04 11:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-05 10:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-07 17:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-07 18:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-16 16:24   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-16 20:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-17 13:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-20  7:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-20  7:43   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 17:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 18:00   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-27 18:33   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-10-28  6:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-12-04  8:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-75985-8800-ORJPyF23DV@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon-cc+yj3umiyqdupfqwhejaq@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.