diff options
Diffstat (limited to 'drivers/gpu/vga/vga_switcheroo.c')
-rw-r--r-- | drivers/gpu/vga/vga_switcheroo.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 38f9534ac51..eb4f64f0a56 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c | |||
@@ -190,6 +190,19 @@ find_active_client(struct list_head *head) | |||
190 | return NULL; | 190 | return NULL; |
191 | } | 191 | } |
192 | 192 | ||
193 | int vga_switcheroo_get_client_state(struct pci_dev *pdev) | ||
194 | { | ||
195 | struct vga_switcheroo_client *client; | ||
196 | |||
197 | client = find_client_from_pci(&vgasr_priv.clients, pdev); | ||
198 | if (!client) | ||
199 | return VGA_SWITCHEROO_NOT_FOUND; | ||
200 | if (!vgasr_priv.active) | ||
201 | return VGA_SWITCHEROO_INIT; | ||
202 | return client->pwr_state; | ||
203 | } | ||
204 | EXPORT_SYMBOL(vga_switcheroo_get_client_state); | ||
205 | |||
193 | void vga_switcheroo_unregister_client(struct pci_dev *pdev) | 206 | void vga_switcheroo_unregister_client(struct pci_dev *pdev) |
194 | { | 207 | { |
195 | struct vga_switcheroo_client *client; | 208 | struct vga_switcheroo_client *client; |