aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_agp.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:49 +1000
commit26c9e8effebb9166eb1cfba2d164676e98c505c7 (patch)
tree96e5f84d927825fc7d527ae914aeae03257a0844 /drivers/gpu/drm/nouveau/nouveau_agp.c
parentdrm/nouveau/device: import pciid list and integrate quirks with it (diff)
downloadlinux-dev-26c9e8effebb9166eb1cfba2d164676e98c505c7.tar.xz
linux-dev-26c9e8effebb9166eb1cfba2d164676e98c505c7.zip
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.c7
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);