13 nouveau_vga_set_decode(
void *
priv,
bool state)
18 nv_wr32(device, 0x088054, state);
20 nv_wr32(device, 0x001854, state);
38 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
41 dev->switch_power_state = DRM_SWITCH_POWER_ON;
44 dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
48 dev->switch_power_state = DRM_SWITCH_POWER_OFF;
53 nouveau_switcheroo_reprobe(
struct pci_dev *pdev)
55 struct drm_device *dev = pci_get_drvdata(pdev);
60 nouveau_switcheroo_can_switch(
struct pci_dev *pdev)
62 struct drm_device *dev = pci_get_drvdata(pdev);
65 spin_lock(&dev->count_lock);
66 can_switch = (dev->open_count == 0);
67 spin_unlock(&dev->count_lock);
72 nouveau_switcheroo_ops = {
73 .set_gpu_state = nouveau_switcheroo_set_state,
74 .reprobe = nouveau_switcheroo_reprobe,
75 .can_switch = nouveau_switcheroo_can_switch,