search for: vgasr_mutex

Displaying 11 results from an estimated 11 matches for "vgasr_mutex".

2015 Aug 12
2
[Intel-gfx] [PATCH v2 00/22] Enable gpu switching on the MacBook Pro
...u/drm/nouveau/nvkm/subdev/i2c/pad*.c. Thus, when proxying via nouveau, there are two locking mechanisms at work (drm_dp_aux hw_mutex as outer lock + pad as inner lock). This is nothing introduced by this patch set, all existing code. Locking of access to the struct vgasr_priv is facilitated by the vgasr_mutex in vga_switcheroo.c. Also existing code. Best regards, Lukas
2016 Jan 11
0
[PATCH v5 01/12] vga_switcheroo: Add handler flags infrastructure
...o_register_handler(&radeon_atpx_handler, handler_flags); } /** diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index d64d905..81da941 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -125,6 +125,7 @@ static DEFINE_MUTEX(vgasr_mutex); * (counting 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...
2018 Feb 18
0
[PATCH 5/7] vga_switcheroo: Use device link for HDA controller
...it notifies vga_switcheroo - * thereof using this helper so that it can power the audio device on the GPU - * up or down. - */ -void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, - enum vga_switcheroo_state dynamic) -{ - struct vga_switcheroo_client *client; - - mutex_lock(&vgasr_mutex); - client = find_client_from_pci(&vgasr_priv.clients, pdev); - if (!client || !client->driver_power_control) { - mutex_unlock(&vgasr_mutex); - return; - } - - set_audio_state(client->id, dynamic); - mutex_unlock(&vgasr_mutex); -} -EXPORT_SYMBOL(vga_switcheroo_set_dynamic_switch...
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
...using this helper so that it can power the audio device on the GPU > - * up or down. > - */ > -void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, > - enum vga_switcheroo_state dynamic) > -{ > - struct vga_switcheroo_client *client; > - > - mutex_lock(&vgasr_mutex); > - client = find_client_from_pci(&vgasr_priv.clients, pdev); > - if (!client || !client->driver_power_control) { > - mutex_unlock(&vgasr_mutex); > - return; > - } > - > - set_audio_state(client->id, dynamic); > - mutex_unlock(&vgasr_mutex); > -} &gt...
2016 Jul 10
2
vga_switcheroo audio runpm
...ops to vga_switcheroo, this is something that Pierre Moreau (cc:) has expressed an interest in for his MacBook Pro. I came across a major roadblock in the form of vga_switcheroo_set_dynamic_switch(). That function is called from the DRM driver when the GPU runtime suspends and resumes. It takes the vgasr_mutex. The problem is, if the user initiates a switch of the mux, that mutex is already taken in vga_switcheroo_debugfs_write(). If the GPU we're switching to is asleep, it'll wake up for the switch and we'll get a deadlock when the DRM driver subsequently calls vga_switcheroo_set_dynamic_swi...
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 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 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
2013 Jan 03
2
3.8-rc2: EFI framebuffer lock inversion...
...t might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(console_lock); lock((fb_notifier_list).rwsem); lock(console_lock); lock((fb_notifier_list).rwsem); *** DEADLOCK *** 2 locks held by sh/1017: #0: (vgasr_mutex){+.+.+.}, at: [<ffffffff81300ea7>] vga_switcheroo_debugfs_write+0x57/0x380 #1: (console_lock){+.+.+.}, at: [<ffffffffa0204d35>] nouveau_fbcon_set_suspend+0x25/0xc0 [nouveau] stack backtrace: Pid: 1017, comm: sh Not tainted 3.8.0-rc2-expert #1 Call Trace: [<ffffffff8154f6c6>] pr...
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