Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4740653rwb; Wed, 17 Aug 2022 05:28:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5onGzQ/75ySdPURW9Qu6tKHGYZldrSv7mgh2HYH/yoB8/sLFiZi6UZSPLksMLdpU4rWoJM X-Received: by 2002:a62:5293:0:b0:52f:aacc:156c with SMTP id g141-20020a625293000000b0052faacc156cmr25659415pfb.50.1660739328245; Wed, 17 Aug 2022 05:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660739328; cv=none; d=google.com; s=arc-20160816; b=KaJcxgKHpfZOQr5Gs25DQGA5Za/l6Y7sXHlv641e7A4n7wPwttdXvSFk8xUK2prydd gXnv6MKE5BouDXWayt+jj9liRkK1/r9usO+OyU/LGFEVg6PDnVQFq6/4e16rBxva73YY sZowvwm45ZepL+eUqTVdcQIsD9QzjY6CSjYNbctUohWw2cSu0RDekxpHS61v3clbvHVV HxvBB+Dy5gLdVmTW2ovBo3WPCbgQsIP3LOE5hUCJF8Z1A9Tu/cc6vNotkNVDCrR0Sc3A HaZ108ddsirIe3y3ogXEqn6dzfa7RsKbSeCCpGqjWqn39Z9ZUiOENw04+eALIomHS0jv Pt5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Pa9f4D5v6F2OOFa2oqBxS/HQY8hKv3KOeZ31ttIsAX8=; b=UiX8ZyU36aRt+fZYjoL0nMYDvqEnKWbDpgzlIUVIX6cYyb0lkdCw1bvsdi3ZBfaRA9 Ipm6RkNqYuhxb4EiDmqkMn49dwAmW/mB/ZvzF1w+7PX/ohJZ9klSWQkH4/u5cYgUrTsZ 8LKqUiC04B6hJVNnZsdqxxygSzK7ULRgf1GIZTc6HGgP5rIZbwDGUdABjchQeEFrJyBT N823b9r2siXrFg3XJs/Y9puURULdQwIaWRWDtbYKp5bDNaH+2zFLYUtv1ZcnE1cSISxl VnlVHxqxT0bzSOprTc49djkYlw5QbLW4alecyvV2x3vdeX7S8LaV4RFdvOcnFHFd/+aY 6ehQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WCjvydOP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id il14-20020a17090b164e00b001f55af5f9e0si1794968pjb.97.2022.08.17.05.28.37; Wed, 17 Aug 2022 05:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WCjvydOP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236517AbiHQL7k (ORCPT + 99 others); Wed, 17 Aug 2022 07:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234128AbiHQL7h (ORCPT ); Wed, 17 Aug 2022 07:59:37 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B42D6BCFA for ; Wed, 17 Aug 2022 04:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660737576; x=1692273576; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=6b3c6v23oiX+x1U/ZFEx/KYy2/TE/UWN/aBtKal7zRQ=; b=WCjvydOPykhBD2cYvCRbsaeoH72u3NRPCzLNpuG2iOzialsIgeXdtxPh MXU4d94ajNp5rI2s4wf7vyFI+RqpRnL9AbWEA0GfklMWbKB+C1CRY3LWg BTR1U/RKWkYYd3IJGjGvNpYnxc9tKhIzi01tPLMp98eodnpsmG+IBG1XQ X8LOIQnkDKvQKbyR8J/jU7mmkltrYtffhVS9zUKLftT2udWSyqKlDUC5n /EqK3G88ZfrVcA3Vdrre95jvWkhaSubSYcL0CReUFmV5EkeHyZU0IemTe KpBdBExfAguNetGKnYbpKgYZ7O/b2GLqFGHGc/jJGlNdtyVm58wV10uUG g==; X-IronPort-AV: E=McAfee;i="6400,9594,10441"; a="275526407" X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="275526407" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 04:59:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="610618489" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.59]) by fmsmga007.fm.intel.com with SMTP; 17 Aug 2022 04:59:21 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 17 Aug 2022 14:59:20 +0300 Date: Wed, 17 Aug 2022 14:59:20 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Kai-Heng Feng Cc: Karol Herbst , Heikki Krogerus , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, rodrigo.vivi@intel.com, Zenghui Yu , Imre Deak Subject: Re: [Intel-gfx] [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported Message-ID: References: <20220816025217.618181-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wrote: > > > > On Wed, Aug 17, 2022 at 3:18 AM Kai-Heng Feng > > wrote: > > > > > > On Wed, Aug 17, 2022 at 2:50 AM Karol Herbst wrote: > > > > > > > > On Tue, Aug 16, 2022 at 4:53 AM Kai-Heng Feng > > > > 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