Symbol: vgasr_priv
drivers/gpu/vga/vga_switcheroo.c
1002
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
1009
vgasr_priv.handler->power_state(client->id, state);
drivers/gpu/vga/vga_switcheroo.c
1022
if (vgasr_priv.handler->switchto) {
drivers/gpu/vga/vga_switcheroo.c
1023
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
1024
vgasr_priv.handler->switchto(VGA_SWITCHEROO_IGD);
drivers/gpu/vga/vga_switcheroo.c
1025
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
168
static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv);
drivers/gpu/vga/vga_switcheroo.c
169
static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv);
drivers/gpu/vga/vga_switcheroo.c
172
static struct vgasr_priv vgasr_priv = {
drivers/gpu/vga/vga_switcheroo.c
173
.clients = LIST_HEAD_INIT(vgasr_priv.clients),
drivers/gpu/vga/vga_switcheroo.c
174
.mux_hw_lock = __MUTEX_INITIALIZER(vgasr_priv.mux_hw_lock),
drivers/gpu/vga/vga_switcheroo.c
180
return !vgasr_priv.active &&
drivers/gpu/vga/vga_switcheroo.c
181
vgasr_priv.registered_clients == 2 && vgasr_priv.handler;
drivers/gpu/vga/vga_switcheroo.c
190
if (vgasr_priv.handler->init)
drivers/gpu/vga/vga_switcheroo.c
191
vgasr_priv.handler->init();
drivers/gpu/vga/vga_switcheroo.c
193
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
198
ret = vgasr_priv.handler->get_client_id(client->pdev);
drivers/gpu/vga/vga_switcheroo.c
205
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
210
ret = vgasr_priv.handler->get_client_id(client->vga_dev);
drivers/gpu/vga/vga_switcheroo.c
219
vga_switcheroo_debugfs_init(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
220
vgasr_priv.active = true;
drivers/gpu/vga/vga_switcheroo.c
238
if (vgasr_priv.handler) {
drivers/gpu/vga/vga_switcheroo.c
243
vgasr_priv.handler = handler;
drivers/gpu/vga/vga_switcheroo.c
244
vgasr_priv.handler_flags = handler_flags;
drivers/gpu/vga/vga_switcheroo.c
262
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
263
vgasr_priv.handler_flags = 0;
drivers/gpu/vga/vga_switcheroo.c
264
vgasr_priv.handler = NULL;
drivers/gpu/vga/vga_switcheroo.c
265
if (vgasr_priv.active) {
drivers/gpu/vga/vga_switcheroo.c
267
vga_switcheroo_debugfs_fini(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
268
vgasr_priv.active = false;
drivers/gpu/vga/vga_switcheroo.c
270
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
285
return vgasr_priv.handler_flags;
drivers/gpu/vga/vga_switcheroo.c
311
list_add_tail(&client->list, &vgasr_priv.clients);
drivers/gpu/vga/vga_switcheroo.c
313
vgasr_priv.registered_clients++;
drivers/gpu/vga/vga_switcheroo.c
374
if (vgasr_priv.active) {
drivers/gpu/vga/vga_switcheroo.c
375
id = vgasr_priv.handler->get_client_id(vga_dev);
drivers/gpu/vga/vga_switcheroo.c
444
!vgasr_priv.handler_flags)
drivers/gpu/vga/vga_switcheroo.c
480
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
501
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
504
vgasr_priv.registered_clients--;
drivers/gpu/vga/vga_switcheroo.c
508
if (vgasr_priv.active && vgasr_priv.registered_clients < 2) {
drivers/gpu/vga/vga_switcheroo.c
510
vga_switcheroo_debugfs_fini(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
511
vgasr_priv.active = false;
drivers/gpu/vga/vga_switcheroo.c
531
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
561
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
562
if (!vgasr_priv.handler || !vgasr_priv.handler->switch_ddc) {
drivers/gpu/vga/vga_switcheroo.c
563
vgasr_priv.old_ddc_owner = -ENODEV;
drivers/gpu/vga/vga_switcheroo.c
567
id = vgasr_priv.handler->get_client_id(pdev);
drivers/gpu/vga/vga_switcheroo.c
568
vgasr_priv.old_ddc_owner = vgasr_priv.handler->switch_ddc(id);
drivers/gpu/vga/vga_switcheroo.c
569
return vgasr_priv.old_ddc_owner;
drivers/gpu/vga/vga_switcheroo.c
592
int ret = vgasr_priv.old_ddc_owner;
drivers/gpu/vga/vga_switcheroo.c
594
if (WARN_ON_ONCE(!mutex_is_locked(&vgasr_priv.mux_hw_lock)))
drivers/gpu/vga/vga_switcheroo.c
597
if (vgasr_priv.old_ddc_owner >= 0) {
drivers/gpu/vga/vga_switcheroo.c
598
id = vgasr_priv.handler->get_client_id(pdev);
drivers/gpu/vga/vga_switcheroo.c
599
if (vgasr_priv.old_ddc_owner != id)
drivers/gpu/vga/vga_switcheroo.c
600
ret = vgasr_priv.handler->switch_ddc(
drivers/gpu/vga/vga_switcheroo.c
601
vgasr_priv.old_ddc_owner);
drivers/gpu/vga/vga_switcheroo.c
603
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
650
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
674
if (vgasr_priv.handler->power_state)
drivers/gpu/vga/vga_switcheroo.c
675
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON);
drivers/gpu/vga/vga_switcheroo.c
688
if (vgasr_priv.handler->power_state)
drivers/gpu/vga/vga_switcheroo.c
689
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF);
drivers/gpu/vga/vga_switcheroo.c
699
client = find_client_from_id(&vgasr_priv.clients, id | ID_BIT_AUDIO);
drivers/gpu/vga/vga_switcheroo.c
709
active = find_active_client(&vgasr_priv.clients);
drivers/gpu/vga/vga_switcheroo.c
726
active = find_active_client(&vgasr_priv.clients);
drivers/gpu/vga/vga_switcheroo.c
741
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
742
ret = vgasr_priv.handler->switchto(new_client->id);
drivers/gpu/vga/vga_switcheroo.c
743
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
765
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
793
if (!vgasr_priv.active) {
drivers/gpu/vga/vga_switcheroo.c
800
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
813
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
853
client = find_client_from_id(&vgasr_priv.clients, client_id);
drivers/gpu/vga/vga_switcheroo.c
857
vgasr_priv.delayed_switch_active = false;
drivers/gpu/vga/vga_switcheroo.c
860
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
861
ret = vgasr_priv.handler->switchto(client_id);
drivers/gpu/vga/vga_switcheroo.c
862
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
886
vgasr_priv.delayed_switch_active = true;
drivers/gpu/vga/vga_switcheroo.c
887
vgasr_priv.delayed_client_id = client_id;
drivers/gpu/vga/vga_switcheroo.c
908
static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv)
drivers/gpu/vga/vga_switcheroo.c
914
static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv)
drivers/gpu/vga/vga_switcheroo.c
942
if (!vgasr_priv.delayed_switch_active)
drivers/gpu/vga/vga_switcheroo.c
946
vgasr_priv.delayed_client_id);
drivers/gpu/vga/vga_switcheroo.c
948
client = find_client_from_id(&vgasr_priv.clients,
drivers/gpu/vga/vga_switcheroo.c
949
vgasr_priv.delayed_client_id);
drivers/gpu/vga/vga_switcheroo.c
957
vgasr_priv.delayed_switch_active = false;
drivers/gpu/vga/vga_switcheroo.c
999
if (!vgasr_priv.handler->power_state)