From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD95BC25B0F for ; Sat, 13 Aug 2022 10:55:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239380AbiHMKzr (ORCPT ); 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) 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