drm: Reject page_flip for !DRIVER_MODESET
[pandora-kernel.git] / drivers / gpu / drm / ati_pcigart.c
index 17be051..9afe495 100644 (file)
@@ -31,6 +31,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/export.h>
 #include "drmP.h"
 
 # define ATI_PCIGART_PAGE_SIZE         4096    /**< PCI GART page size */
@@ -152,7 +153,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
                /* we need to support large memory configurations */
                entry->busaddr[i] = pci_map_page(dev->pdev, entry->pagelist[i],
                                                 0, PAGE_SIZE, PCI_DMA_BIDIRECTIONAL);
-               if (entry->busaddr[i] == 0) {
+               if (pci_dma_mapping_error(dev->pdev, entry->busaddr[i])) {
                        DRM_ERROR("unable to map PCIGART pages!\n");
                        drm_ati_pcigart_cleanup(dev, gart_info);
                        address = NULL;