diff options
Diffstat (limited to 'drm/nouveau/nvkm/subdev/bios/shadowrom.c')
-rw-r--r-- | drm/nouveau/nvkm/subdev/bios/shadowrom.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drm/nouveau/nvkm/subdev/bios/shadowrom.c b/drm/nouveau/nvkm/subdev/bios/shadowrom.c index be116f35c..ffa4b3952 100644 --- a/drm/nouveau/nvkm/subdev/bios/shadowrom.c +++ b/drm/nouveau/nvkm/subdev/bios/shadowrom.c @@ -22,6 +22,8 @@ */ #include "priv.h" +#include <subdev/pci.h> + static u32 prom_read(void *data, u32 offset, u32 length, struct nvkm_bios *bios) { @@ -39,23 +41,16 @@ static void prom_fini(void *data) { struct nvkm_device *device = data; - if (device->card_type < NV_50) - nvkm_mask(device, 0x001850, 0x00000001, 0x00000001); - else - nvkm_mask(device, 0x088050, 0x00000001, 0x00000001); + nvkm_pci_rom_shadow(device->pci, true); } static void * prom_init(struct nvkm_bios *bios, const char *name) { struct nvkm_device *device = bios->subdev.device; - if (device->card_type < NV_50) { - if (device->card_type == NV_40 && device->chipset >= 0x4c) - return ERR_PTR(-ENODEV); - nvkm_mask(device, 0x001850, 0x00000001, 0x00000000); - } else { - nvkm_mask(device, 0x088050, 0x00000001, 0x00000000); - } + if (device->card_type == NV_40 && device->chipset >= 0x4c) + return ERR_PTR(-ENODEV); + nvkm_pci_rom_shadow(device->pci, false); return device; } |