Re: [PATCH v3] platform/x86: Add new vga-switcheroo gmux driver for ACPI-driven muxes

2020-08-12 Thread Daniel Dadap
On 8/10/20 10:43 PM, Lukas Wunner wrote: On Mon, Aug 10, 2020 at 01:44:58PM -0500, Daniel Dadap wrote: Would it be clearer to write it out as something like 0 << 4 & 1 << 0 for MUX_STATE_SET_IGPU and 1 << 4 & 1 << 0 for MUX_STATE_SET_DGPU? BIT(4) | BIT(0) might be clearer, but that gives you

Re: [PATCH v3] platform/x86: Add new vga-switcheroo gmux driver for ACPI-driven muxes

2020-08-10 Thread Daniel Dadap
On 8/10/20 3:37 AM, Lukas Wunner wrote: External email: Use caution opening links or attachments On Wed, Jul 29, 2020 at 04:05:57PM -0500, Daniel Dadap wrote: + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Pub

Re: [PATCH v3] platform/x86: Add new vga-switcheroo gmux driver for ACPI-driven muxes

2020-08-10 Thread Lukas Wunner
On Mon, Aug 10, 2020 at 01:44:58PM -0500, Daniel Dadap wrote: > On 8/10/20 3:37 AM, Lukas Wunner wrote: > > On Wed, Jul 29, 2020 at 04:05:57PM -0500, Daniel Dadap wrote: > > > + * Call MXDS with bit 0 set to change the current state. > > > + * When changing state, clear bit 4 for iGPU and set bit 4

Re: [PATCH v3] platform/x86: Add new vga-switcheroo gmux driver for ACPI-driven muxes

2020-08-10 Thread Lukas Wunner
On Wed, Jul 29, 2020 at 04:05:57PM -0500, Daniel Dadap wrote: > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program

[PATCH v3] platform/x86: Add new vga-switcheroo gmux driver for ACPI-driven muxes

2020-08-10 Thread Daniel Dadap
Some upcoming notebook designs utilize display muxes driven by a pair of ACPI methods, MXDM to query and configure the operational mode of the mux (integrated only, discrete only, hybrid non-muxed, hybrid with dynamic mux switching), and MXDS to query and set the mux state when running in dynamic s