Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp557709rwb; Sat, 13 Aug 2022 04:06:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7V38fnXonifplg4GCldEKUU4EJF+evHUfCXvXwKCUSdaddeYLyKf/VAA8BWvnACQdBGr9U X-Received: by 2002:a17:90b:4d91:b0:1f5:24a:ff90 with SMTP id oj17-20020a17090b4d9100b001f5024aff90mr18649465pjb.152.1660388801486; Sat, 13 Aug 2022 04:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660388801; cv=none; d=google.com; s=arc-20160816; b=1CljoRxArJeOP/9IL4W7O8JohiAqYaO1SVVxCyEzGtV+Xyrh+28ePvu8kku+DK/sog 7+1sEyr6DXltHLJA7XAkap9CEdTvYcdn3rt/NIdI6Xr9rW7uBdTeNyKAEZjcNorxjO0X xeQelVK9NwI110lMnAs7+sXzNieztd7rV6hp6UGh20uylJPYEv3a1+8/9hTi+n5qWJST /076ciq3zfYk28UXt5us1NCUTSo+1hrsd/dfgjnTmNRqS2X25IGA09PrSDR5hW2llf5f ajmP2QwnkV9Us9ag0/M8kG61OzD/74LAgziixJXMhOmbDxv3Effr92mVYNWbRUlfcUxL xrmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fKZVI5Jo9hX3fFieIylKKzLDhfLVVwEvMwiBLLdZw0c=; b=EXtwd4m2zhsrmsyr9OEru2Sbr6UlGv/32WPX3DeeqJ2+ZIeDNKpyPYO2t4TINgRbTi ysjyG4H71T8JHmjSNjB+cBtjnBOkimpW44pomsgoPMyeQ44nyrbonSn+4BGBmbR36lcm i4Ugl8meb5SBRLNAtD6mweRLgWnQdiUDKNyPw8OfUejIpgdmEox7gJCIRnHC1Hpv7XgX OPXZT8swkrEF17+dVrbsgDqwxiaUO1+oVFveSA/NKEAxqck684vu3/2VgmnMv1J7SEDx XQYEOxmHnbLS+H0xyQRkaHLKPtyq/sQvPrtYkm7HwrkAvNImwF4fePdSYx6v4OeVeFWI VHRg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be7-20020a170902aa0700b0016d8b0dfd3fsi4531695plb.566.2022.08.13.04.06.28; Sat, 13 Aug 2022 04:06:41 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239249AbiHMKzr (ORCPT + 99 others); Sat, 13 Aug 2022 06:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238949AbiHMKzk (ORCPT ); Sat, 13 Aug 2022 06:55:40 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0182627CD5; Sat, 13 Aug 2022 03:55:38 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id D529128085F4A; Sat, 13 Aug 2022 12:55:33 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id BED3F23C443; Sat, 13 Aug 2022 12:55:33 +0200 (CEST) Date: Sat, 13 Aug 2022 12:55:33 +0200 From: Lukas Wunner To: "Luke D. Jones" Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] asus-wmi: Support the hardware GPU MUX on some laptops Message-ID: <20220813105533.GA3258@wunner.de> References: <20220813092624.6228-1-luke@ljones.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220813092624.6228-1-luke@ljones.dev> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,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 Sat, Aug 13, 2022 at 09:26:24PM +1200, 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. Could you please integrate this with the framework provided by: include/linux/vga_switcheroo.h drivers/gpu/vga/vga_switcheroo.c vga_switcheroo will then automatically expose a sysfs interface. Find existing vga_switcheroo mux drivers in the tree like this, they may serve as a template: git grep "struct vga_switcheroo_handler" -- :/ Thanks, Lukas