]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/nouveau: Add proper vgaarb support.
authorMarcin Kościelnicki <koriakin@0x04.net>
Mon, 8 Feb 2010 00:20:17 +0000 (00:20 +0000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 9 Feb 2010 02:50:27 +0000 (12:50 +1000)
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_state.c

index fcd7610817a1b650e04c4f972ee2482d2b4c772b..a4851af5b05ec535816eeb98973675c6cbb03aa4 100644 (file)
@@ -310,6 +310,14 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
 static unsigned int
 nouveau_vga_set_decode(void *priv, bool state)
 {
+       struct drm_device *dev = priv;
+       struct drm_nouveau_private *dev_priv = dev->dev_private;
+
+       if (dev_priv->chipset >= 0x40)
+               nv_wr32(dev, 0x88054, state);
+       else
+               nv_wr32(dev, 0x1854, state);
+
        if (state)
                return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM |
                       VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM;