public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Takashi Iwai <tiwai@suse.de>,
	mario.limonciello@dell.com, andy@infradead.org,
	dvhart@infradead.org, mjg59@srcf.ucam.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics
Date: Sun, 15 Apr 2018 21:05:23 +0200	[thread overview]
Message-ID: <20180415190523.GA16129@wunner.de> (raw)
In-Reply-To: <20180415171746.futkvgbaoj6quy5z@pali>

On Sun, Apr 15, 2018 at 07:17:46PM +0200, Pali Rohár wrote:
> On Saturday 14 April 2018 13:17:11 Lukas Wunner wrote:
> > On Sat, Apr 14, 2018 at 12:49:50PM +0200, Pali Rohár wrote:
> > > On Saturday 14 April 2018 12:45:12 Lukas Wunner wrote:
> > > > On Thu, Apr 12, 2018 at 10:15:41PM +0800, Kai-Heng Feng wrote:
> > > > > Do you have any suggestion to check if it connects to the system via
> > > > > Thunderbolt?
> > > > 
> > > > Just use pci_is_thunderbolt_attached(), introduced by 8531e283bee6,
> > > > like this:
> > > > 
> > > > if (check_dell_switchable_gfx(pci) && !pci_is_thunderbolt_attached(pci))
> > > 
> > > And what about PCI-e device attached to ExpressCard slot?
> > 
> > I don't know of a bullet-proof way to recognize those.  In theory
> > one could check if the PCIe port above the GPU is a non-hotplug
> > root port, but I think there are machines with hotplug capable
> > root ports with GPUs below them that aren't actually removable.
> > 
> > However I think ExpressCard-attached GPUs were rare, much less ones
> > with integrated HDA controller, so in reality that's probably a
> > non-issue.
> 
> Hm... maybe another idea: Is it possible to detect which audio pci
> device belongs to graphics card via vga_switcheroo? Currently, looking
> at output it is same PCI device as graphic card, just different PCI
> function.

No, the DRM drivers don't filter ExpressCard-attached GPUs when
registering with vga_switcheroo.  They do filter Thunderbolt-
attached GPUs.

The ExpressCard 2.0 spec defines some ACPI stuff that *might* be
used to recognize root ports that are ExpressCard slots, but I'm
not sure how reliable that is.  I don't have such a machine and
have no experience with it.

This is from the MacBookPro8,3 DSDT:

            Device (RP04)
            {
                Name (_ADR, 0x001C0003)
                OperationRegion (A1E0, PCI_Config, 0x19, 0x01)
                Field (A1E0, ByteAcc, NoLock, Preserve)
                {
                    SECB,   8
                }

                Device (EXCD)
                {
                    Name (_ADR, 0x00)
                    Name (_SUN, 0x01)
                    Method (_RMV, 0, NotSerialized)
                    {
                        Return (0x01)
                    }

                    Name (_EJD, "\\_SB.PCI0.EHC2.HUBN.PRTN.PRT4")
                }
                ...
            }

Thanks,

Lukas

  reply	other threads:[~2018-04-15 19:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 10:42 [PATCH v3 1/3] dell-led: Change dell-led.h to dell-common.h Kai-Heng Feng
2018-04-12 10:42 ` [PATCH v3 2/3] platform/x86: dell-*: Add interface for switchable graphics status query Kai-Heng Feng
2018-04-12 10:42 ` [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics Kai-Heng Feng
2018-04-12 10:50   ` Takashi Iwai
2018-04-12 10:59     ` Pali Rohár
2018-04-12 14:15       ` Kai-Heng Feng
2018-04-13 16:08         ` Darren Hart
2018-04-14 10:45         ` Lukas Wunner
2018-04-14 10:49           ` Pali Rohár
2018-04-14 11:17             ` Lukas Wunner
2018-04-15 17:17               ` Pali Rohár
2018-04-15 19:05                 ` Lukas Wunner [this message]
2018-04-16 14:25                   ` Pali Rohár
2018-04-17  2:38                     ` Lukas Wunner
2018-04-17  7:52                       ` Pali Rohár
2018-04-12 14:12     ` Kai-Heng Feng
2018-04-14 11:25       ` Lukas Wunner

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=20180415190523.GA16129@wunner.de \
    --to=lukas@wunner.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox