Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp4776387rwb; Wed, 17 Aug 2022 06:04:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR43fgFemH//Lp7mn9SpVYkuTVGs+L3TsJacw0LlwZ9I8sgGOJp8Le0Lwagb6afWwoLBxSRz X-Received: by 2002:a17:906:5a71:b0:730:aaa1:a9ec with SMTP id my49-20020a1709065a7100b00730aaa1a9ecmr16582321ejc.440.1660741484748; Wed, 17 Aug 2022 06:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660741484; cv=none; d=google.com; s=arc-20160816; b=GE3OcuQt4P3M7UjUvPei/CK1DL7GfK9rtrba2bO/UkgKS0A3FawpYvfvOpck0j9FeB Sjh5FmJP7IEQHDSNuimzs9agxFVOf2p3V0OEEu+k2OccBZKMSWsDQ1zw60d9Dt7js/5T 4PV4i6uaa9oXA2UQXn094MF1YF4ytEXACvl5/tWl40vxpgpuRD/BHJyZ3qgMmwftCqg5 KqiTuLrWQM/LZiS3lj6vELmrbIFt1BumCAen7IjxhlVb+Pc0CEpu1u3m1llMKn5cr6r6 hddZ3oNdVfiswtHqIrQq80dKn0vhsdSJR/sYQzu1Gxe8ubyhueUYPzwpy7Q3TZ2nW0m3 nXvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DSb7iQYDJqXj92ygGsNtJZCJ5hZY67yzyY/MzoJmNKE=; b=b2F2BOll+OsFHPMevdRKgPWM0zZdQWzSPzK48IKjOhn0GFxPTtrlpFRs2cpwQ69BXK l98ZgLsXaiLFO2AgOhDDQvDLiMAwQza5ZvAX9GEszitvQkZAmWgSgdAroJuBEJC4PYVO 8WsDLV4iEO+8XqDbUHZE1lOubW9PbP4mEjLU/KBq2S5tnWFEx0N+IQOW2aD82Cm8c5QD Z7R02F6cilQ857NEIuCY2WifJDljbiZ1sdxmNJQwmypAXcHvYudRLrM1cNS+FS2/FBkI yM+4biHY82CV9PUj5J6/8LEasP+SwsvgaUdIeki/LuOi6RAfHSklaUS040ZIvOB/tAr6 WEdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=KRDNs4Dl; 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=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q28-20020a50c35c000000b0043cd18d34e1si11103534edb.177.2022.08.17.06.04.13; Wed, 17 Aug 2022 06:04:44 -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=@canonical.com header.s=20210705 header.b=KRDNs4Dl; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238946AbiHQMQQ (ORCPT + 99 others); Wed, 17 Aug 2022 08:16:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234942AbiHQMQP (ORCPT ); Wed, 17 Aug 2022 08:16:15 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37B9086B55 for ; Wed, 17 Aug 2022 05:16:14 -0700 (PDT) Received: from mail-oa1-f72.google.com (mail-oa1-f72.google.com [209.85.160.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 0A85E3F46F for ; Wed, 17 Aug 2022 12:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1660738572; bh=DSb7iQYDJqXj92ygGsNtJZCJ5hZY67yzyY/MzoJmNKE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KRDNs4DlZy0naxAqTyeX1AwWIBsGndM/pZCct6xxhGDhtruewwNGbnLNqFtR/+xVu Vi8uMkkLwuBExQqEHSKegzN52m4KQ1oFmF59s6ZWAMrczktLTAduHMxS+LN4ecn2vr W1vVAiAJIfkn0zqMMsVKsNM2PX0D/MTbcBtm+j6q+Ra7CjjFvDvmNjyMPot7/680H8 XHwnHVTDywMfU4SXcTj/eoRcqqCH2iKJsf/Ksh11S07ebk7mNJJ7mmBtqR63NMAiH8 5p0oTwOe1UyY4X7UHyizoP7XRdGKPBpRwvgPWNr1Jb8gLGbgHMf5VKauPZobUO7RE6 +oyiLh7AqG5Xg== Received: by mail-oa1-f72.google.com with SMTP id 586e51a60fabf-117b96393f3so3893028fac.9 for ; Wed, 17 Aug 2022 05:16:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=DSb7iQYDJqXj92ygGsNtJZCJ5hZY67yzyY/MzoJmNKE=; b=DAQH3p7cemVS2QWRcBi49mgouQG4Krkk3b1GB1ZnQhaQChuxS+OMWxVlQRT8r8KL30 A5YZ22H6ZO5DpELH6oTzIfGv/QZONW4E29PrD2TOZa0KmTxkgSIrTcIgekElwWy2db1g F8dyGEHFgEUGaXCtrEyRVAES5NByLjBo0YMoNKbvfzkoQosN+R5xdKGq7Vs8XwFs9mfN WVZ9JfXIbOppD6MFbEA8xV0BRPYQNZyNKgP1uKgVkyRZBLsY84rJ2n9jJwnnlhOF7xu+ XqhJ+cHea9Dwbunn/AmkzO0aDncwA/YKCcqJ0z6CF7jDbrGTCRHP+4sUNjP6vXv82ie/ un7w== X-Gm-Message-State: ACgBeo0TyMctxxxAynyBYkMRpYVs+wuuJ1MnY4OYrZ8wjzKdNS2saghT nwif/nsaPwmCEriJJVNbB0cySydZUyfiEgKldk6BGSudS4LUQFH7mJgO/aHbW/tJOodCw6E6r6N TKkd8zV0cdQQRphkhZFjdZmHc5mgOFnfMcFZqazMGNrbL7i37Nhgzz+DK9Q== X-Received: by 2002:a9d:f05:0:b0:637:1068:1081 with SMTP id 5-20020a9d0f05000000b0063710681081mr8767017ott.224.1660738570900; Wed, 17 Aug 2022 05:16:10 -0700 (PDT) X-Received: by 2002:a9d:f05:0:b0:637:1068:1081 with SMTP id 5-20020a9d0f05000000b0063710681081mr8767013ott.224.1660738570591; Wed, 17 Aug 2022 05:16:10 -0700 (PDT) MIME-Version: 1.0 References: <20220816025217.618181-1-kai.heng.feng@canonical.com> In-Reply-To: From: Kai-Heng Feng Date: Wed, 17 Aug 2022 20:15:58 +0800 Message-ID: Subject: Re: [Intel-gfx] [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 7:59 PM Ville Syrj=C3=A4l=C3=A4 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? IIUC the mask 20 won't be set when dGPU is not present. > > 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=C3=A4l=C3=A4 > Intel