lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvzYGGXils/Gf44d@intel.com>
Date:   Wed, 17 Aug 2022 14:59:20 +0300
From:   Ville Syrjälä <ville.syrjala@...ux.intel.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     Karol Herbst <kherbst@...hat.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, rodrigo.vivi@...el.com,
        Zenghui Yu <yuzenghui@...wei.com>,
        Imre Deak <imre.deak@...el.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when
 it's supported

On Wed, Aug 17, 2022 at 11:04:21AM +0800, Kai-Heng Feng wrote:
> On Wed, Aug 17, 2022 at 9:49 AM Karol Herbst <kherbst@...hat.com> wrote:
> >
> > On Wed, Aug 17, 2022 at 3:18 AM Kai-Heng Feng
> > <kai.heng.feng@...onical.com> wrote:
> > >
> > > On Wed, Aug 17, 2022 at 2:50 AM Karol Herbst <kherbst@...hat.com> wrote:
> > > >
> > > > On Tue, Aug 16, 2022 at 4:53 AM Kai-Heng Feng
> > > > <kai.heng.feng@...onical.com> wrote:
> > > > >
> > > > > On mobile workstations like HP ZBook Fury G8, iGFX's DP-IN can switch to
> > > > > dGFX so external monitors are routed to dGFX, and more monitors can be
> > > > > supported as result.
> > > > >
> > > > > To switch the DP-IN to dGFX, the driver needs to invoke _DSM function 20
> > > > > on intel_dsm_guid2. This method is described in Intel document 632107.
> > > > >
> > > >
> > > > Can we please not do things like this just because?
> > >
> > > I there's a very good reason to support more external monitors,
> > > especially when eDP is already 4K so iGPU don't have enough buffer for
> > > more displays.
> > >
> >
> > well.. they do have it. What's the limit? 3 or 4 4K displays with gen
> > 11th+? I find conflicting information, but 3 4K displays are no
> > problem. It might be if you get to higher refresh rates or something.
> >
> > I know that 2 work quite reliably and I know I can put even more on
> > the Intel GPU.
> 
> More monitors can be supported via a thunderbolt dock.
> 
> >
> > > >
> > > > It forces the discrete GPU to be on leading to higher thermal pressure
> > > > and power consumption of the system. Lower battery runtime or higher
> > > > fan noise is the result. Not everybody wants to use an AC simply just
> > > > because they attach an external display.
> > >
> > > The system is designed in this way.
> > >
> >
> > ?!? This makes no sense. If the discrete GPU is turned on, it means
> > the system has to cool away more heat, because it consumes more power.
> > It then causes louder fans. No idea how a "system design" can just go
> > around simple physics...
> 
> The spec from HP [1] says:
> Multi Display Support
> Without HP Thunderbolt™ Dock G2
> UMA Graphics: Unit supports up to 4 independent displays. Any
> combination of displays outputs may be used except one of
> Thunderbolt™ 4 and HDMI.
> Hybrid Graphics: Unit supports up 5 simultaneous displays (4 from dGPU
> + 1 from iGPU). Any combination of displays outputs may
> be used except when using one USBC and HDMI are exclusive
> 
> With HP Thunderbolt™ Dock G2
> UMA Graphics: Unit supports up to 4 simultaneous displays. Any
> combination of displays outputs may be used except one of
> Thunderbolt™ 4 and HDMI.
> Hybrid Graphics (NVIDIA): Unit supports up to 5 simultaneous displays
> (4 from dGPU + 1 from iGPU). Any combination of displays
> outputs may be used except when using one USBC and HDMI are exclusive
> Hybrid Graphics (AMD): Unit supports up to 5 simultaneous displays (5
> from dGPU + 1 from iGPU). Any combination of displays
> outputs may be used except when using one USBC and HDMI are exclusive
> 
> So it's "designed" to use dGPU on the hybrid configs.
> 
> Let's hope the copper tubes have can dissipate the heat fast enough.
> 
> >
> > Even the CPU consumes more power, because on some systems it prevents
> > deeper package sleeping modes due to the active PCIe bridge
> > controller.
> >
> > But if you have certain systems where you want to enable this behavior
> > despite the drawbacks, maybe maintain a list of systems where to apply
> > this method?
> 
> The behavior will be enabled only when _DSM function 20 is present.
> So it's already a selected few.

I had a quick trawl through some Windows stuff for this and
it does seem to do a few extra checks:
- platform must be TGL-H (nothing else has the DPin stuff I guess)
- OpRegion header must indicate dGPU presence

Otherwise it does call this DSM uncoditionally on boot/S4 resume
so seems like that is the only really validated configuration.
Although it does seem to explicitly turn off displays prior to
the DSM so that does perhaps indicate that those ports might have
also been enabled via the iGPU by the BIOS. Not sure if disabling
the ports would work correctly after the DSM or not. If not then
the DSM call would need to happen after state readout/sanitization
so that we can shut things down gracefully.

Additionally after the DSM call it scans the FIA TC live state
bits to check for DPin usage. Looks like its trying to make sure
the driver stops poking at the relevant power wells once in DPin
mode. i915 doesn't check that stuff atm so we might end up
mangling something while the dGPU is driving the port.

-- 
Ville Syrjälä
Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ