agp/intel: set 40-bit dma mask on Sandybridge
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
156dadc180
commit
877fdacf82
@ -825,7 +825,8 @@ static const struct intel_driver_description {
|
|||||||
static int __devinit intel_gmch_probe(struct pci_dev *pdev,
|
static int __devinit intel_gmch_probe(struct pci_dev *pdev,
|
||||||
struct agp_bridge_data *bridge)
|
struct agp_bridge_data *bridge)
|
||||||
{
|
{
|
||||||
int i;
|
int i, mask;
|
||||||
|
|
||||||
bridge->driver = NULL;
|
bridge->driver = NULL;
|
||||||
|
|
||||||
for (i = 0; intel_agp_chipsets[i].name != NULL; i++) {
|
for (i = 0; intel_agp_chipsets[i].name != NULL; i++) {
|
||||||
@ -845,14 +846,19 @@ static int __devinit intel_gmch_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
|
dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
|
||||||
|
|
||||||
if (bridge->driver->mask_memory == intel_i965_mask_memory) {
|
if (bridge->driver->mask_memory == intel_gen6_mask_memory)
|
||||||
if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36)))
|
mask = 40;
|
||||||
dev_err(&intel_private.pcidev->dev,
|
else if (bridge->driver->mask_memory == intel_i965_mask_memory)
|
||||||
"set gfx device dma mask 36bit failed!\n");
|
mask = 36;
|
||||||
else
|
else
|
||||||
pci_set_consistent_dma_mask(intel_private.pcidev,
|
mask = 32;
|
||||||
DMA_BIT_MASK(36));
|
|
||||||
}
|
if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(mask)))
|
||||||
|
dev_err(&intel_private.pcidev->dev,
|
||||||
|
"set gfx device dma mask %d-bit failed!\n", mask);
|
||||||
|
else
|
||||||
|
pci_set_consistent_dma_mask(intel_private.pcidev,
|
||||||
|
DMA_BIT_MASK(mask));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user