diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:23 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:49 +0300 |
commit | 26c9e8effebb9166eb1cfba2d164676e98c505c7 (patch) | |
tree | 96e5f84d927825fc7d527ae914aeae03257a0844 /drivers/gpu/drm/nouveau/nouveau_agp.c | |
parent | c7af0ff0e89327918743052d12bf5536e34c7f1a (diff) | |
download | linux-26c9e8effebb9166eb1cfba2d164676e98c505c7.tar.xz |
drm/nouveau/device: remove pci/platform_device from common struct
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_agp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_agp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_agp.c b/drivers/gpu/drm/nouveau/nouveau_agp.c index 320f48c41fe0..c3f3e49e5f8f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_agp.c +++ b/drivers/gpu/drm/nouveau/nouveau_agp.c @@ -4,6 +4,8 @@ #include "nouveau_agp.h" #include "nouveau_reg.h" +#include <core/pci.h> + #if __OS_HAS_AGP MODULE_PARM_DESC(agpmode, "AGP mode (0 to disable AGP)"); static int nouveau_agpmode = -1; @@ -28,6 +30,7 @@ static unsigned long get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info) { struct nvif_device *device = &drm->device; + struct pci_dev *pdev = nvxx_device(device)->func->pci(nvxx_device(device))->pdev; struct nouveau_agpmode_quirk *quirk = nouveau_agpmode_quirk_list; int agpmode = nouveau_agpmode; unsigned long mode = info->mode; @@ -45,8 +48,8 @@ get_agp_mode(struct nouveau_drm *drm, const struct drm_agp_info *info) while (agpmode == -1 && quirk->hostbridge_vendor) { if (info->id_vendor == quirk->hostbridge_vendor && info->id_device == quirk->hostbridge_device && - nvxx_device(device)->pdev->vendor == quirk->chip_vendor && - nvxx_device(device)->pdev->device == quirk->chip_device) { + pdev->vendor == quirk->chip_vendor && + pdev->device == quirk->chip_device) { agpmode = quirk->mode; NV_INFO(drm, "Forcing agp mode to %dX. Use agpmode to override.\n", agpmode); |