drm/radeon: fix logic in r600_page_table_init() to match ati_gart
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 16 Mar 2009 19:37:02 +0000 (15:37 -0400)
committerDave Airlie <airlied@redhat.com>
Wed, 18 Mar 2009 04:18:15 +0000 (14:18 +1000)
This fixes page table init on rs600.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r600_cp.c

index 76eb0d5ab570c9ee264742a4bef586785c66912c..9d14eee3ed092e52e82b7c05aa20c2e30502f237 100644 (file)
@@ -172,7 +172,6 @@ int r600_page_table_init(struct drm_device *dev)
                if (entry->busaddr[i] == 0) {
                        DRM_ERROR("unable to map PCIGART pages!\n");
                        r600_page_table_cleanup(dev, gart_info);
-                       ret = -EINVAL;
                        goto done;
                }
                entry_addr = entry->busaddr[i];
@@ -191,6 +190,7 @@ int r600_page_table_init(struct drm_device *dev)
                        entry_addr += ATI_PCIGART_PAGE_SIZE;
                }
        }
+       ret = 1;
 done:
        return ret;
 }
@@ -2095,7 +2095,7 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init,
                          dev_priv->gart_info.addr,
                          dev_priv->pcigart_offset);
 
-               if (r600_page_table_init(dev)) {
+               if (!r600_page_table_init(dev)) {
                        DRM_ERROR("Failed to init GART table\n");
                        r600_do_cleanup_cp(dev);
                        return -EINVAL;