Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1868289rwb; Fri, 19 Aug 2022 10:43:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5HIZDXrD3dwJpYRkKZKz/BkCUmPzBaKEV647L2pH809P7jGImivm//W5yE7vy9L3vsJh+b X-Received: by 2002:a63:2048:0:b0:41c:daad:450d with SMTP id r8-20020a632048000000b0041cdaad450dmr6997313pgm.240.1660931014972; Fri, 19 Aug 2022 10:43:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660931014; cv=none; d=google.com; s=arc-20160816; b=PCNVlEPJZz0XW97gf6CL1noxD9UQqkDcofvei6Eo+40lGt6sJ/29ym5WjEjiOC/jAU WWHNRClX4LZ8jJNQ7F/2r3IJRzc1KBdM18Z79b1IoVKgWOFSRFBUhU0T1sn56cbzacEj w4DZLUbAhvxODslwxVz9GBKpVhHNzQ2PcY1eL/3uSom3UYYFOrchZhgx2HkbKTNnKZfJ 92GZfp3WICKk1SsARAXWX4ucRT8+iZjbP5yvbTp4qWIQk3ZBgJVA7d/o0AmLCXo2Xi5Q cADhaVlQGISI60ejOSw0IIIhw+NjdsvWtGyk4ovOefJCz1gUK/t13Fp4AoF7xck1zYRV 7bYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Hsc4yRhAhZ4DbPHQFkOZPha0cv9GZ3AkjwFlq+dmc4w=; b=FDS0JHU+HaVYi99CoQiWoeKHml+WEh+69VZv+p2BLe9Mqy17qtUnaIErmNq/ZCedD1 7O05zJvYx1xBsO80nNAudOIa2D55wzHPZgDY/nVhshM6AvSM3WkMFee3WbmqovWR3tsv oX+pMYuojY2prv/oF0HUuqzM/d+NdxvFjtxJvu6D3BU2VUGUnsqQabKahvIqZm5pOZBh 8FWx3mZZRLnUGRifvWeXwTrpz+aydMk+vzzoIO/NgbwCanCUBRn5EtWVryK2ZKmEwVgf G7KLcINXVa/5ryzW2LD/5NV0L0hstc0cyU5YN++VNRUEWdxKlE29HtEilhBioHJuwH9a Q45g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QBoDO7sK; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a63c112000000b0041c0a56edd1si4177412pgf.879.2022.08.19.10.43.22; Fri, 19 Aug 2022 10:43:34 -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=@redhat.com header.s=mimecast20190719 header.b=QBoDO7sK; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351652AbiHSRmj (ORCPT + 99 others); Fri, 19 Aug 2022 13:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350894AbiHSRmT (ORCPT ); Fri, 19 Aug 2022 13:42:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C958C131A2A for ; Fri, 19 Aug 2022 10:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660928494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hsc4yRhAhZ4DbPHQFkOZPha0cv9GZ3AkjwFlq+dmc4w=; b=QBoDO7sKvFahY+oIP7USeWCVRKtLoRIgVnsWontc7SOVl94zvo8MwY27OUFfERmyQljMPe lMTEds0jZglE43FylZwZxBVVmsLufK+mH/7lH7FotLy0JtOdmOZ3RUVDqzgCJh+u6B4ry7 OmxmgMYJoZfdRc1sbZc2STbjel5sDmo= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-232-vz29oyJdPXmtj3wY1RzSVw-1; Fri, 19 Aug 2022 13:01:31 -0400 X-MC-Unique: vz29oyJdPXmtj3wY1RzSVw-1 Received: by mail-qt1-f199.google.com with SMTP id fy12-20020a05622a5a0c00b00344569022f7so3822104qtb.17 for ; Fri, 19 Aug 2022 10:01:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Hsc4yRhAhZ4DbPHQFkOZPha0cv9GZ3AkjwFlq+dmc4w=; b=aS6T02+qBWa9fLiDhtTwkOe6mWQrGYska9NNtFKE/YtcgPx+aHHFz/swfoxIEVYp+Z FgrLf7cCIX5sd3NUHgbW65KVM/I42Xl0HjCzBksIX4UQwNBiMDJRW5PxnKQZuF+sPfEh nmHew4JS16Z5iZ2cHFv7y2MfjPEX1Giw1Yrb4zg8PMJD1f31Bm9dFW/BpT7yXQpGRU9y hdVendvbaEo8sd1TiSPq1W5kqtbLtYw7GYf5zafMyiuJb9YgOZmF+1bLtQGk/pXaEvFO gnQd0Q0z9NLA1+Z2v75JaBTD5YE4KbPutdYhj0JlSxD1iZcbRuQjrvreoQJp0AvbraF5 ugEQ== X-Gm-Message-State: ACgBeo0Y6beQmqdknbsSajbuYTr+V4CeVc7hoKC4VYwN/IccqQDgprjM tlSJAC6o1VwEsM5u7XKQz5J5kdnqBNCBb5bIX293PORl0GjdCGn1uscI7qu761UwDUnQjnWHRcQ /Qs1yWYexwpvk+pU4pFq/ohv8YK3TkC7F6RmdPW1n X-Received: by 2002:a05:6214:2588:b0:477:22bd:e1e6 with SMTP id fq8-20020a056214258800b0047722bde1e6mr6941503qvb.105.1660928490869; Fri, 19 Aug 2022 10:01:30 -0700 (PDT) X-Received: by 2002:a05:6214:2588:b0:477:22bd:e1e6 with SMTP id fq8-20020a056214258800b0047722bde1e6mr6941464qvb.105.1660928490528; Fri, 19 Aug 2022 10:01:30 -0700 (PDT) MIME-Version: 1.0 References: <20220816025217.618181-1-kai.heng.feng@canonical.com> <87leror4sl.fsf@intel.com> <20220818115338.GA26586@wunner.de> In-Reply-To: <20220818115338.GA26586@wunner.de> From: Karol Herbst Date: Fri, 19 Aug 2022 19:01:19 +0200 Message-ID: Subject: Re: [PATCH] drm/i915: Switch TGL-H DP-IN to dGFX when it's supported To: Lukas Wunner Cc: Jani Nikula , tvrtko.ursulin@linux.intel.com, Heikki Krogerus , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Hans de Goede , Kai-Heng Feng , rodrigo.vivi@intel.com, Zenghui Yu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thu, Aug 18, 2022 at 2:09 PM Lukas Wunner wrote: > > On Tue, Aug 16, 2022 at 11:06:18AM +0300, Jani Nikula wrote: > > On Tue, 16 Aug 2022, 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. > > > > Is this the policy decision that we want to unconditionally make, > > though? > > In general, we handle switching of outputs between GPUs in vga_switcheroo.c > upon a request from user space via sysfs (well, debugfs currently). > It's up to users to decide which policy suits their needs best. > > That said, we never grew support to allow different switching policies for > the built-in panel and external outputs. Laptops supporting this are > rare. Older MacBook Pros introduced between 2008 and 2010 are among them: > They have separate muxes for the panel and external DP port. Our policy > is documented in a code comment in drivers/platform/x86/apple-gmux.c: > > * The external DP port is only fully switchable on the first two unibody > * MacBook Pro generations, MBP5 2008/09 and MBP6 2010. This is done by an > * `NXP CBTL06141`_ which is controlled by gmux. > [...] > * Our switching policy for the external port is that on those generations > * which are able to switch it fully, the port is switched together with the > * panel when IGD / DIS commands are issued to vga_switcheroo. It is thus > * possible to drive e.g. a beamer on battery power with the integrated GPU. > * The user may manually switch to the discrete GPU if more performance is > * needed. > * > * On all newer generations, the external port can only be driven by the > * discrete GPU. If a display is plugged in while the panel is switched to > * the integrated GPU, *both* GPUs will be in use for maximum performance. > * To decrease power consumption, the user may manually switch to the > * discrete GPU, thereby suspending the integrated GPU. > > In other words, on these older MacBook Pros, we switch the panel and > external DP port in unison, thus always allowing one of the two GPUs > to runtime suspend and save power. > > Thanks, > > Lukas > sure, but this is changing now. I do have a laptop with a muxable internal display. But this is considered to be a dynamic on demand switching thing not a boot time switch. Anyway, I am still not convinced that doing that unconditionally is what we want, especially as userspace has to support dynamic switching regardless.