Skip to content

Commit

Permalink
agp/intel-agp: Set dma_mask for capable chipsets before agp_add_bridge()
Browse files Browse the repository at this point in the history
We should set this before calling agp_add_bridge() so that it's done
before we map the scratch page too.

This should probably fix the regression reported as k.o. bug #14627.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
dwmw2 authored and airlied committed Nov 19, 2009
1 parent 799dd75 commit ec402ba
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,12 +1161,6 @@ static int intel_i915_configure(void)

intel_i9xx_setup_flush();

#ifdef USE_PCI_DMA_API
if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36)))
dev_err(&intel_private.pcidev->dev,
"set gfx device dma mask 36bit failed!\n");
#endif

return 0;
}

Expand Down Expand Up @@ -2456,6 +2450,11 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
&bridge->mode);
}

if (bridge->driver->mask_memory == intel_i965_mask_memory)
if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36)))
dev_err(&intel_private.pcidev->dev,
"set gfx device dma mask 36bit failed!\n");

pci_set_drvdata(pdev, bridge);
return agp_add_bridge(bridge);
}
Expand Down

0 comments on commit ec402ba

Please sign in to comment.