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
170
static void vga_switcheroo_debugfs_init(struct vgasr_priv *priv);
drivers/gpu/vga/vga_switcheroo.c
171
static void vga_switcheroo_debugfs_fini(struct vgasr_priv *priv);
drivers/gpu/vga/vga_switcheroo.c
174
static struct vgasr_priv vgasr_priv = {
drivers/gpu/vga/vga_switcheroo.c
175
.clients = LIST_HEAD_INIT(vgasr_priv.clients),
drivers/gpu/vga/vga_switcheroo.c
176
.mux_hw_lock = __MUTEX_INITIALIZER(vgasr_priv.mux_hw_lock),
drivers/gpu/vga/vga_switcheroo.c
182
return !vgasr_priv.active &&
drivers/gpu/vga/vga_switcheroo.c
183
vgasr_priv.registered_clients == 2 && vgasr_priv.handler;
drivers/gpu/vga/vga_switcheroo.c
192
if (vgasr_priv.handler->init)
drivers/gpu/vga/vga_switcheroo.c
193
vgasr_priv.handler->init();
drivers/gpu/vga/vga_switcheroo.c
195
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
200
ret = vgasr_priv.handler->get_client_id(client->pdev);
drivers/gpu/vga/vga_switcheroo.c
207
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
212
ret = vgasr_priv.handler->get_client_id(client->vga_dev);
drivers/gpu/vga/vga_switcheroo.c
221
vga_switcheroo_debugfs_init(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
222
vgasr_priv.active = true;
drivers/gpu/vga/vga_switcheroo.c
240
if (vgasr_priv.handler) {
drivers/gpu/vga/vga_switcheroo.c
245
vgasr_priv.handler = handler;
drivers/gpu/vga/vga_switcheroo.c
246
vgasr_priv.handler_flags = handler_flags;
drivers/gpu/vga/vga_switcheroo.c
264
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
265
vgasr_priv.handler_flags = 0;
drivers/gpu/vga/vga_switcheroo.c
266
vgasr_priv.handler = NULL;
drivers/gpu/vga/vga_switcheroo.c
267
if (vgasr_priv.active) {
drivers/gpu/vga/vga_switcheroo.c
269
vga_switcheroo_debugfs_fini(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
270
vgasr_priv.active = false;
drivers/gpu/vga/vga_switcheroo.c
272
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
287
return vgasr_priv.handler_flags;
drivers/gpu/vga/vga_switcheroo.c
313
list_add_tail(&client->list, &vgasr_priv.clients);
drivers/gpu/vga/vga_switcheroo.c
315
vgasr_priv.registered_clients++;
drivers/gpu/vga/vga_switcheroo.c
376
if (vgasr_priv.active) {
drivers/gpu/vga/vga_switcheroo.c
377
id = vgasr_priv.handler->get_client_id(vga_dev);
drivers/gpu/vga/vga_switcheroo.c
446
!vgasr_priv.handler_flags)
drivers/gpu/vga/vga_switcheroo.c
482
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
503
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
506
vgasr_priv.registered_clients--;
drivers/gpu/vga/vga_switcheroo.c
510
if (vgasr_priv.active && vgasr_priv.registered_clients < 2) {
drivers/gpu/vga/vga_switcheroo.c
512
vga_switcheroo_debugfs_fini(&vgasr_priv);
drivers/gpu/vga/vga_switcheroo.c
513
vgasr_priv.active = false;
drivers/gpu/vga/vga_switcheroo.c
533
client = find_client_from_pci(&vgasr_priv.clients, pdev);
drivers/gpu/vga/vga_switcheroo.c
563
mutex_lock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
564
if (!vgasr_priv.handler || !vgasr_priv.handler->switch_ddc) {
drivers/gpu/vga/vga_switcheroo.c
565
vgasr_priv.old_ddc_owner = -ENODEV;
drivers/gpu/vga/vga_switcheroo.c
569
id = vgasr_priv.handler->get_client_id(pdev);
drivers/gpu/vga/vga_switcheroo.c
570
vgasr_priv.old_ddc_owner = vgasr_priv.handler->switch_ddc(id);
drivers/gpu/vga/vga_switcheroo.c
571
return vgasr_priv.old_ddc_owner;
drivers/gpu/vga/vga_switcheroo.c
594
int ret = vgasr_priv.old_ddc_owner;
drivers/gpu/vga/vga_switcheroo.c
596
if (WARN_ON_ONCE(!mutex_is_locked(&vgasr_priv.mux_hw_lock)))
drivers/gpu/vga/vga_switcheroo.c
599
if (vgasr_priv.old_ddc_owner >= 0) {
drivers/gpu/vga/vga_switcheroo.c
600
id = vgasr_priv.handler->get_client_id(pdev);
drivers/gpu/vga/vga_switcheroo.c
601
if (vgasr_priv.old_ddc_owner != id)
drivers/gpu/vga/vga_switcheroo.c
602
ret = vgasr_priv.handler->switch_ddc(
drivers/gpu/vga/vga_switcheroo.c
603
vgasr_priv.old_ddc_owner);
drivers/gpu/vga/vga_switcheroo.c
605
mutex_unlock(&vgasr_priv.mux_hw_lock);
drivers/gpu/vga/vga_switcheroo.c
652
list_for_each_entry(client, &vgasr_priv.clients, list) {
drivers/gpu/vga/vga_switcheroo.c
676
if (vgasr_priv.handler->power_state)
drivers/gpu/vga/vga_switcheroo.c
677
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_ON);
drivers/gpu/vga/vga_switcheroo.c
690
if (vgasr_priv.handler->power_state)
drivers/gpu/vga/vga_switcheroo.c
691
vgasr_priv.handler->power_state(client->id, VGA_SWITCHEROO_OFF);
drivers/gpu/vga/vga_switcheroo.c
701
client = find_client_from_id(&vgasr_priv.clients, id | ID_BIT_AUDIO);
drivers/gpu/vga/vga_switcheroo.c
711
active = find_active_client(&vgasr_priv.clients);
drivers/gpu/vga/vga_switcheroo.c
728
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)