summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ati_pcigart.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: Fix pci_map_page() error checkingBenjamin Herrenschmidt2010-08-121-1/+1
| | | | | | | | | | 0 is a valid DMA address from pci_map_page(), use pci_dma_mapping_error() instead to check for errors [airlied: fix warning + two other places with errors.] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* ati_pcigart: fix printk format warningRandy Dunlap2010-02-051-1/+1
| | | | | | | | | | | | Fix ati_pcigart printk format warning: drivers/gpu/drm/ati_pcigart.c:115: warning: format '%Lx' expects type 'long long unsigned int', but argument 3 has type 'dma_addr_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: remove address mask param for drm_pci_alloc()Zhenyu Wang2010-01-071-2/+8
| | | | | | | | | | | | drm_pci_alloc() has input of address mask for setting pci dma mask on the device, which should be properly setup by drm driver. And leave it as a param for drm_pci_alloc() would cause confusion or mistake would corrupt the correct dma mask setting, as seen on intel hw which set wrong dma mask for hw status page. So remove it from drm_pci_alloc() function. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ati_pcigart: use memset_io to reset the memoryDave Airlie2009-03-131-4/+3
| | | | | | Also don't setup pci_gart if we aren't going to need it. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: ati_pcigart: Fix limit check in drm_ati_pcigart_init().David Miller2009-03-131-6/+7
| | | | | | | | | | | | | | The variable 'max_pages' is ambiguous. There are two concepts of "pages" being used in this function. First, we have ATI GART pages which are always 4096 bytes. Then, we have system pages which are of size PAGE_SIZE. Eliminate the confusion by creating max_ati_pages and max_real_pages. Calculate and use them as appropriate. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: ati_pcigart: Need to use PCI_DMA_BIDIRECTIONAL.David Miller2009-03-131-2/+2
| | | | | | | | | | | | | The buffers mapped by the PCI GART can be written to by the device, not just read. For example, this happens via the RB_RPTR writeback on Radeon. So we can't use PCI_DMA_TODEVICE else we'll get protection faults on IOMMU platforms. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: ati_pcigart: Do not access I/O MEM space using pointer derefs.David Miller2009-03-131-6/+20
| | | | | | | | | | | | | | | | | The PCI GART table initialization code treats the GART table mapping unconditionally as a kernel virtual address. But it could be in the framebuffer, for example, and thus we're dealing with a PCI MEM space ioremap() cookie. Treating that as a virtual address is illegal and will crash some system types (such as sparc64 where the ioremap() return value is actually a physical I/O address). So access the area correctly, using gart_info->gart_table_location as our guide. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm: reorganise drm tree to be more future proof.Dave Airlie2008-07-141-0/+181
With the coming of kernel based modesetting and the memory manager stuff, the everything in one directory approach was getting very ugly and starting to be unmanageable. This restructures the drm along the lines of other kernel components. It creates a drivers/gpu/drm directory and moves the hw drivers into subdirectores. It moves the includes into an include/drm, and sets up the unifdef for the userspace headers we should be exporting. Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud