diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2010-08-18 21:46:13 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-22 02:24:50 -0400 |
commit | 877fdacf8291d7627f339885b5ae52c2f6061734 (patch) | |
tree | 2bfa23d723deeeb95298f69a83ab44f70dcac96c /drivers/char/agp/intel-agp.c | |
parent | 156dadc180a1bd3a25d644ee6c361afc465ccd0e (diff) |
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>
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index ddf5def1b0da..ab1903955ac0 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -825,7 +825,8 @@ static const struct intel_driver_description { | |||
825 | static int __devinit intel_gmch_probe(struct pci_dev *pdev, | 825 | static int __devinit intel_gmch_probe(struct pci_dev *pdev, |
826 | struct agp_bridge_data *bridge) | 826 | struct agp_bridge_data *bridge) |
827 | { | 827 | { |
828 | int i; | 828 | int i, mask; |
829 | |||
829 | bridge->driver = NULL; | 830 | bridge->driver = NULL; |
830 | 831 | ||
831 | for (i = 0; intel_agp_chipsets[i].name != NULL; i++) { | 832 | for (i = 0; intel_agp_chipsets[i].name != NULL; i++) { |
@@ -845,14 +846,19 @@ static int __devinit intel_gmch_probe(struct pci_dev *pdev, | |||
845 | 846 | ||
846 | dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name); | 847 | dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name); |
847 | 848 | ||
848 | if (bridge->driver->mask_memory == intel_i965_mask_memory) { | 849 | if (bridge->driver->mask_memory == intel_gen6_mask_memory) |
849 | if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) | 850 | mask = 40; |
850 | dev_err(&intel_private.pcidev->dev, | 851 | else if (bridge->driver->mask_memory == intel_i965_mask_memory) |
851 | "set gfx device dma mask 36bit failed!\n"); | 852 | mask = 36; |
852 | else | 853 | else |
853 | pci_set_consistent_dma_mask(intel_private.pcidev, | 854 | mask = 32; |
854 | DMA_BIT_MASK(36)); | 855 | |
855 | } | 856 | if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(mask))) |
857 | dev_err(&intel_private.pcidev->dev, | ||
858 | "set gfx device dma mask %d-bit failed!\n", mask); | ||
859 | else | ||
860 | pci_set_consistent_dma_mask(intel_private.pcidev, | ||
861 | DMA_BIT_MASK(mask)); | ||
856 | 862 | ||
857 | return 1; | 863 | return 1; |
858 | } | 864 | } |