Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4814112rwb; Wed, 17 Aug 2022 06:35:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7y6xlQCNFsW5xKACT91jvLOADyCF5aa5WiE7l1+I9pcyJD59407ZP0FQ0a/STHT0CWXaJF X-Received: by 2002:a05:6402:1bc9:b0:43d:3903:11ee with SMTP id ch9-20020a0564021bc900b0043d390311eemr23508996edb.113.1660743313554; Wed, 17 Aug 2022 06:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660743313; cv=none; d=google.com; s=arc-20160816; b=OjywKec8jzeAt27zs5vayv0u/XlnWr0dYA1yZhLn9nFGVq+cwaUMx/VEydDZpDHzBH CP82yRSLJ7NxVWio/0jGpfVo79EK8kiH9o5fd3peziJaSix2JD2lCiyvI1Ca39ks8N3j Lsc1YB9Jvivc1CgXoVNk4kPCQX9SvjaszCY5+2/4g37pV4EsvRPWUKkO/XAe3NhOQIoE yJrp+5u48j/2RgoRu9D1usbBh5X4IkeVOwAU/3Hp85cm+DtQOA89hBqFumCBP2h0LSgr 0HQ9ZF5G3X8e7oBJ2BxklmzY/M1eMSK7vdzY0GqIwrIAGM0lrZw5r47KiGOtqdMgF7/t ZcYw== 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=bIrirfGAqLnXHYj4LWlirpbQnMo2Ju0rvBaIo/RbZ10=; b=QsZgTCEC1pTTLdpAtn+aBiQ0HXqQsPeEODG5dwZrJQgmGg56L9cH2Ij/NGqwVjmPaT ydiiYYgLh2ChEaLFUifwjAKnZJi5VOSAt76n30nVACUv2OmZoGaHswOimf78DQlj2aQt wexULq6IRGD7+pzfFl4+JnOLFCxC5CqSEWoZtLOSvW/h95Eb6aFT1FAGHAaa77pAXlQJ 04/Ro50BE1URCAsFuUn4roB0YvYUnqIkd+kZWuxF8hwnjtuA9ikbXBauPKFUPb+WDw+P 1cH3mTzATIYudrg++ehFs7jZE9gVe2Ypswcwt86km7PZu//6Gei0kqyhkgPkA2seyF2F L7Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OpJdyNR2; 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 g1-20020a056402424100b0043cc0f63162si268152edb.559.2022.08.17.06.34.45; Wed, 17 Aug 2022 06:35:13 -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=OpJdyNR2; 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 S239721AbiHQNHj (ORCPT + 99 others); Wed, 17 Aug 2022 09:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239606AbiHQNHT (ORCPT ); Wed, 17 Aug 2022 09:07:19 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85AEA915F3 for ; Wed, 17 Aug 2022 06:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660741530; x=1692277530; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=0r/wRpHDY/cJKimAN46sLg8b9MsBF0hryVYD2PnhY/Y=; b=OpJdyNR2bYWw8SkK+futHoY/Y3Eu62ukr3+gskHvdfZije1zGO8uQtwN 5dAltjLH7+bb/P6ohjy2TtfS4fe0vVQxPlBVn/mhLVRX29XY1NlmqnOUt Q+l6aAE53habHzyTIZnzHZLAh5c1OcEcVl++AScv42Qb5kBx5utArN05I V1GKQVxaV90LrimxnKKBOrYeqvLJP/g6kS+MeoErLDQmf0uaFOl4MiyDf sEQrBGzXBWdlXR/N0eOHq6O9SdUAsVmjQornzKRbMn5T9X64lzodg+Cxm tSRlMRV94hl7OwXsAkROdaoDBRsKRowpvBrN+7YcKl4BCACMTQa2b7KFd w==; X-IronPort-AV: E=McAfee;i="6500,9779,10442"; a="279450522" X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="279450522" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2022 06:05:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,243,1654585200"; d="scan'208";a="710542739" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.59]) by fmsmga002.fm.intel.com with SMTP; 17 Aug 2022 06:05:14 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 17 Aug 2022 16:05:13 +0300 Date: Wed, 17 Aug 2022 16:05:13 +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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 08:15:58PM +0800, Kai-Heng Feng wrote: > On Wed, Aug 17, 2022 at 7:59 PM Ville Syrj?l? > wrote: > > [snipped] > > > 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 > > Is the dGPU presence denoted by the return bitmask of > INTEL_DSM_FN_GET_BIOS_DATA_FUNCS_SUPPORTED No, there are apparently some extra bits in the OpRegion header which we're not currently even decoding. > > IIUC the mask 20 won't be set when dGPU is not present. Not sure whether that bit would change depending on the dGPU presence or not. Windows doesn't seem trust it alone, so either it won't change or someone was just extra paranoid. > > > > > 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. > > Thanks for investigating this. I am not really familiar with other > stuffs you mentioned, but I am happy to test any follow-up patch. > > Kai-Heng > > > > > -- > > Ville Syrj?l? > > Intel -- Ville Syrj?l? Intel