search for: vgasr_priv

Displaying 14 results from an estimated 14 matches for "vgasr_priv".

2016 Jan 11
0
[PATCH v5 01/12] vga_switcheroo: Add handler flags infrastructure
...ting only vga clients, not audio clients) * @clients: list of registered clients * @handler: registered handler + * @handler_flags: flags of registered handler * * vga_switcheroo private data. Currently only one vga_switcheroo instance * per system is supported. @@ -141,6 +142,7 @@ struct vgasr_priv { struct list_head clients; const struct vga_switcheroo_handler *handler; + enum vga_switcheroo_handler_flags_t handler_flags; }; #define ID_BIT_AUDIO 0x100 @@ -189,13 +191,15 @@ static void vga_switcheroo_enable(void) /** * vga_switcheroo_register_handler() - register handler * @ha...
2016 May 31
2
[PATCH v6 1/2] vga_switcheroo: Add helper for deferred probing
...deferred, otherwise %false. + */ +bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev) +{ + /* + * apple-gmux is needed on pre-retina MacBook Pro + * to probe the panel if pdev is the inactive GPU. + */ + if (apple_gmux_present() && pdev != vga_default_device() && + !vgasr_priv.handler_flags) + return true; + + return false; +} +EXPORT_SYMBOL(vga_switcheroo_client_probe_defer); + +/** * vga_switcheroo_get_client_state() - obtain power state of a given client * @pdev: client pci device * diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h in...
2015 Oct 20
2
[PATCH 0/1] vga_switcheroo: Constify vga_switcheroo_handler
Another vga_switcheroo cleanup. Maintainers, is it okay to include the one-line change of each driver in here or do you want that split into separate patches? Thanks, Lukas Lukas Wunner (1): vga_switcheroo: Constify vga_switcheroo_handler drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +-
2016 May 31
0
[PATCH v6 2/2] vga_switcheroo: Support deferred probing of audio clients
...ient(struct list_head *head) */ bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev) { - /* - * apple-gmux is needed on pre-retina MacBook Pro - * to probe the panel if pdev is the inactive GPU. - */ - if (apple_gmux_present() && pdev != vga_default_device() && - !vgasr_priv.handler_flags) - return true; + if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { + /* + * apple-gmux is needed on pre-retina MacBook Pro + * to probe the panel if pdev is the inactive GPU. + */ + if (apple_gmux_present() && pdev != vga_default_device() && +...
2015 Aug 12
2
[Intel-gfx] [PATCH v2 00/22] Enable gpu switching on the MacBook Pro
...ee if this stategy is sufficient for the drivers to set up their outputs. > I think the real tricky bit here with vgaswitcheroo is locking, I need to > take a separate lock at the patches for that. Locking when switching only the DDC lines is facilitated by the ddc_lock attribute of struct vgasr_priv. This is all local to vga_switcheroo.c and contained in patches 5 and 6. Locking when proxying the AUX channel is facilitated by the hw_mutex attribute of struct drm_dp_aux. nouveau has its own locking mechanism contained in drivers/gpu/drm/nouveau/nvkm/subdev/i2c/pad*.c. Thus, when proxying via n...
2016 Jan 11
8
[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
Enable GPU switching on the pre-retina MacBook Pro (2008 - 2013), v5. The main obstacle on these machines is that the panel mode in VBIOS is bogus. Fortunately gmux can switch DDC independently from the display, thereby allowing the inactive GPU to probe the panel's EDID. In short, vga_switcheroo and apple-gmux are amended with hooks to switch DDC, DRM core is amended with a
2018 Feb 18
0
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...e, false); + return register_client(pdev, ops, id | ID_BIT_AUDIO, false, true); } EXPORT_SYMBOL(vga_switcheroo_register_audio_client); @@ -655,10 +654,8 @@ static void set_audio_state(enum vga_switcheroo_client_id id, struct vga_switcheroo_client *client; client = find_client_from_id(&vgasr_priv.clients, id | ID_BIT_AUDIO); - if (client) { + if (client) client->ops->set_gpu_state(client->pdev, state); - client->pwr_state = state; - } } /* stage one happens before delay */ @@ -953,10 +950,6 @@ EXPORT_SYMBOL(vga_switcheroo_process_delayed_switch); * Specifying nouveau.r...
2018 Feb 18
12
[PATCH 0/7] Modernize vga_switcheroo by using device link for HDA
Modernize vga_switcheroo by using a "device link" to enforce a runtime PM dependency from an HDA controller to the GPU it's integrated into. Remove thereby obsoleted code and fix a bunch of bugs. Device links were introduced in v4.10. Users might see a small power saving if the discrete GPU is in use and its HDA controller is not, because the HDA controller is now allowed to runtime
2018 Feb 20
2
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...(pdev, ops, id | ID_BIT_AUDIO, false, true); > } > EXPORT_SYMBOL(vga_switcheroo_register_audio_client); > > @@ -655,10 +654,8 @@ static void set_audio_state(enum vga_switcheroo_client_id id, > struct vga_switcheroo_client *client; > > client = find_client_from_id(&vgasr_priv.clients, id | ID_BIT_AUDIO); > - if (client) { > + if (client) > client->ops->set_gpu_state(client->pdev, state); > - client->pwr_state = state; > - } > } > > /* stage one happens before delay */ > @@ -953,10 +950,6 @@ EXPORT_SYMBOL(vga_switcheroo_proc...
2016 May 21
3
[PATCH v5] vga_switcheroo: Add helper for deferred probing
...fer(struct pci_dev *pdev) +{ + if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { + /* + * apple-gmux is needed on pre-retina MacBook Pro + * to probe the panel if pdev is the inactive GPU. + */ + if (apple_gmux_present() && pdev != vga_default_device() && + !vgasr_priv.handler_flags) + return true; + } + + return false; +} +EXPORT_SYMBOL(vga_switcheroo_client_probe_defer); + +/** * vga_switcheroo_get_client_state() - obtain power state of a given client * @pdev: client pci device * diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo...
2018 Mar 03
12
[PATCH v2 0/7] Modernize vga_switcheroo by using device link for HDA
Modernize vga_switcheroo by using a device link to enforce a runtime PM dependency from an HDA controller to the GPU it's integrated into, v2. Changes since v1: - Replace patch [1/7] to use pci_save_state() / pci_restore_state() for consistency between runtime PM code path of bound and unbound devices. (Rafael, Bjorn) - Patch [5/7]: Drop an unnecessary initialization. (Bjorn) Rephrase
2015 Aug 11
2
[PATCH v2 00/22] Enable gpu switching on the MacBook Pro
This is a follow-up to the v1 posted in April: http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html Patches 1 - 17 enable GPU switching on the pre-retina MacBook Pro. These were tested successfully by multiple people and solve two tickets in Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 https://bugs.freedesktop.org/show_bug.cgi?id=61115 Patches 18 - 22 are a
2016 May 23
0
[Intel-gfx] [PATCH v5] vga_switcheroo: Add helper for deferred probing
...if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { > + /* > + * apple-gmux is needed on pre-retina MacBook Pro > + * to probe the panel if pdev is the inactive GPU. > + */ > + if (apple_gmux_present() && pdev != vga_default_device() && > + !vgasr_priv.handler_flags) > + return true; > + } > + > + return false; > +} > +EXPORT_SYMBOL(vga_switcheroo_client_probe_defer); > + > +/** > * vga_switcheroo_get_client_state() - obtain power state of a given client > * @pdev: client pci device > * > diff --git a/i...
2016 May 19
2
[PATCH v4] vga_switcheroo: Add helper for deferred probing
...defer(struct pci_dev *pdev) +{ + if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { + /* + * apple-gmux is needed on pre-retina MacBook Pro + * to probe the panel if pdev is the inactive GPU. + */ + if (apple_gmux_present() && pdev != vga_default_device() && + !vgasr_priv.handler_flags) + return true; + } + + return false; +} +EXPORT_SYMBOL(vga_switcheroo_client_probe_defer); + +/** * vga_switcheroo_get_client_state() - obtain power state of a given client * @pdev: client pci device * diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo...