Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1484041rwb; Fri, 12 Aug 2022 01:28:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XnKbFsne1+y02LfQPKtg0HlwQSAsI9OOIV0UZHwEQgA8zGg2RUayKFUJ7r4Mdqq9nu1DW X-Received: by 2002:a17:906:8a63:b0:730:9e5c:b456 with SMTP id hy3-20020a1709068a6300b007309e5cb456mr1898485ejc.571.1660292916935; Fri, 12 Aug 2022 01:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660292916; cv=none; d=google.com; s=arc-20160816; b=ZW6DaYNOS9uzFqggj4dpkdiRai3+xqRlQjgrsvtsNHqpw3jtrEHACiGL9PeLBV3Io3 L231Uz4I1vs4ivNN/sf6VmyRV6e8gIMoXhARYJL0gPZJFm22rLAcxmRAEULSUK7Q5szg EAINvvWQjH+yopxvlJJOeAe+853LiYty7kB72YxqQH4zQFmO3sPrEa9bq8F+mp0CQamM czD0UYORpzS7t34acpSCje4dGzN/1x1oVfxyRAPx+fkorZfG0Mx7yer6OKZLszmIQ46Y cOLWJfucK97n6wMuulIOWt8VWvkTWe8CIUKsPxHjsGMVgS0SaJbQF/HvtBgy2C+swgHT ZGtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3RvF5pWYrL8i75lgH8FqFoKdJPGIuSdBy8DXLPObphE=; b=Exv/JeyKOpu7oYEh/S3/0+f/n9dPFAr6dQEpATcugEcFwg1FJONZkwTUE79KkTLkN4 +Ayi2c+fwABhU50rF6yRgmVSHqvrJDa1rdexwRSfuqmqJJB+b0JCd29UvxJuSrW+SNfu 34hINNvAF5A5VQsGtYaAXnIBgRyKL2oeBaBfxGRXIVwy6Px+7WLoIEp/NDzJ0JbBFSQd mVtSIefA3ClC22oJsPXTvd8mYgb69l4IjUTruf3IAjYcgw+vkvJIjBpA+lbbMfwmTjSD 6J04v3yXMGZwDCn8y3GWPz/jtCd1GdDpagKgfgjrJnMRpcmJhOp+2kwSTLJVI9lgEGGH M3DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ev0JP6c+; 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 w2-20020a056402268200b0043db3c4b3b8si1617672edd.28.2022.08.12.01.28.08; Fri, 12 Aug 2022 01:28:36 -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=ev0JP6c+; 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 S237788AbiHLH7g (ORCPT + 99 others); Fri, 12 Aug 2022 03:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237413AbiHLH7e (ORCPT ); Fri, 12 Aug 2022 03:59:34 -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 ESMTP id E0307A74F3 for ; Fri, 12 Aug 2022 00:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660291173; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3RvF5pWYrL8i75lgH8FqFoKdJPGIuSdBy8DXLPObphE=; b=ev0JP6c+uApPo/6rJVCI9Q9IkR79bVTT51lTvhdIec13G09O74epQPm8VYleKcsm0PPa2E DA647iyiyRZC9A4NTrb+B6ahxsn4i8JFj+9scARrOedwBqMvawMk8ac4yyJBwbEWxct8VP XUH6hvzevqmJpn3xZrw03ypmdFd6aMk= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-586-XGf9OdTxPiStxdrwAYckkw-1; Fri, 12 Aug 2022 03:59:31 -0400 X-MC-Unique: XGf9OdTxPiStxdrwAYckkw-1 Received: by mail-ej1-f71.google.com with SMTP id hp22-20020a1709073e1600b007309edc4089so148176ejc.9 for ; Fri, 12 Aug 2022 00:59:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=3RvF5pWYrL8i75lgH8FqFoKdJPGIuSdBy8DXLPObphE=; b=QZrvG+lAlViMdCfEi7Teqode3IPraulnVVHQvVl6QmWLIcV7C3F2Vyv79+Aostu4A4 4G56FTKwoMlCaaxUXeO6ngGE7a8PVCVN6p/nCjCOv97WlM8HOPO1CFORVNn1rJCI7eBy xXOTIxGxNwr5/4fBUNmtn0hlXCpY1kcD9TWnvEymlUEhj9EIpnrk60P9TNFxcCTM41RH K5gwf79AqT2DJV/1L7dzNQ2jri+vIlvE1+2KNVwFg82xMVSd1gsBFPKDnxC8b9m9nUFW rM7/k1NzUlKrOtReeyLf0pcqC0IbLz4lFKgTyvXnMYEjsPe8AyXi58w4psFu7UowYV21 XQvQ== X-Gm-Message-State: ACgBeo02QhwVHtFJf019pDyhrLR0FtXfq1cLtoqYVAvwxloRX1gYIjer o7n10Mjt8FQqvvTyOb4AasHzOGfVcwzAtYVhzbPLxEYuUlBfQ0Awxh//oweVeEP0ytyclcu5p+x froSDKjQ63cW6Ox7UX3QJW0XJ X-Received: by 2002:a50:fc85:0:b0:43d:2284:1ea5 with SMTP id f5-20020a50fc85000000b0043d22841ea5mr2502455edq.105.1660291170815; Fri, 12 Aug 2022 00:59:30 -0700 (PDT) X-Received: by 2002:a50:fc85:0:b0:43d:2284:1ea5 with SMTP id f5-20020a50fc85000000b0043d22841ea5mr2502445edq.105.1660291170658; Fri, 12 Aug 2022 00:59:30 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id op5-20020a170906bce500b0072b51fb36f7sm496391ejb.196.2022.08.12.00.59.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Aug 2022 00:59:29 -0700 (PDT) Message-ID: Date: Fri, 12 Aug 2022 09:59:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 6/6] asus-wmi: Support the hardware GPU MUX on some laptops Content-Language: en-US To: Luke Jones Cc: andy.shevchenko@gmail.com, pobrn@protonmail.com, pavel@ucw.cz, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220809025054.1626339-1-luke@ljones.dev> <20220809025054.1626339-7-luke@ljones.dev> <7365d41a-1475-118c-96a8-6ab927bda5b7@redhat.com> <9ed62983bd03ed26cdb4399dd69b4096e8711fa9.camel@ljones.dev> From: Hans de Goede In-Reply-To: <9ed62983bd03ed26cdb4399dd69b4096e8711fa9.camel@ljones.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 Hi, On 8/12/22 00:01, Luke Jones wrote: > Hi Hans, > > On Thu, 2022-08-11 at 15:53 +0200, Hans de Goede wrote: >> Hi, >> >> On 8/9/22 04:50, Luke D. Jones wrote: >>> Support the hardware GPU MUX switch available on some models. This >>> switch can toggle the MUX between: >>> >>> - 0, Dedicated mode >>> - 1, Optimus mode >>> >>> Optimus mode is the regular iGPU + dGPU available, while dedicated >>> mode switches the system to have only the dGPU available. >>> >>> Signed-off-by: Luke D. Jones >> >> I see that you have replied to this that it needs more work. >> >> Besides it needing more work, ideally this should hook into >> the existing vga-switcheroo mechanism for this. Can you take >> a look at that please? >> >> I think this might be the first non GPU driver doing vga- >> switcheroo stuff. So this may be something to discuss >> on the dri-devel list. > > I'm not sure how this would work. In typical ASUS fashion they do non- > standard stuff. This switch is a basic toggle that requires a reboot to > enable after writing to the ACPI method, after reboot the dGPU becomes > the only visible GPU on the system and (this GPU) can not be suspended. > > In short: it toggles the laptop from discrete-only mode, and optimus > mode, requiring a reboot to switch. > > From what I understand of switcheroo it is more to manage having dual > (or more) GPU available during runtime, and manage the power states, > offload etc. Right, I did not realize this requires a reboot, that would be something to mention in the Documentation bits accompanying the patch. This is also a reason why it is good to have the docs update in the same patch as adding the functionality, because the docs may help with reviewing. Anyways I agree that if this requires a reboot then using the vga switcheroo stuff is not applicable. So we can just go with a simple(ish) asus-wmi sysfs attribute. > I have a vastly improved patch for this prepared now. Because of how > the actual feature works (and the above explanation) it must be under > the asus-nb-wmi sysfs (next to the dgpu_disable and egpu_enable toggles > which are also unusual and non-standard work-arounds of Windows > issues). Ack, sounds good. Regards, Hans