diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-08-09 22:10:22 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-09 23:13:11 +0400 |
commit | db2bec187dd68e79d512112df1f6e7a849e7f0ce (patch) | |
tree | 1a43c57fcea7915c837d5338d2bdf103259bc7be /drivers/gpu/drm/nouveau/nouveau_vga.c | |
parent | fa2bade99a6fb24c3847d48ba3cad9a70dbb5364 (diff) | |
download | linux-db2bec187dd68e79d512112df1f6e7a849e7f0ce.tar.xz |
drm/nouveau: kill nouveau_dev() + wrap register macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_vga.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_vga.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c index 4f4c3fec6916..0f0bafb4fe02 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c @@ -12,14 +12,16 @@ static unsigned int nouveau_vga_set_decode(void *priv, bool state) { - struct nouveau_device *device = nouveau_dev(priv); + struct nouveau_object *device = nouveau_drm(priv)->device; - if (device->card_type == NV_40 && device->chipset >= 0x4c) - nv_wr32(device, 0x088060, state); - else if (device->chipset >= 0x40) - nv_wr32(device, 0x088054, state); + if (nv_device(device)->card_type == NV_40 && + nv_device(device)->chipset >= 0x4c) + nvif_wr32(device, 0x088060, state); else - nv_wr32(device, 0x001854, state); + if (nv_device(device)->chipset >= 0x40) + nvif_wr32(device, 0x088054, state); + else + nvif_wr32(device, 0x001854, state); if (state) return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM | |