Commit 41f13fe8 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon: fix logic in r600_page_table_init() to match ati_gart

This fixes page table init on rs600.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 06f0a488
...@@ -172,7 +172,6 @@ int r600_page_table_init(struct drm_device *dev) ...@@ -172,7 +172,6 @@ int r600_page_table_init(struct drm_device *dev)
if (entry->busaddr[i] == 0) { if (entry->busaddr[i] == 0) {
DRM_ERROR("unable to map PCIGART pages!\n"); DRM_ERROR("unable to map PCIGART pages!\n");
r600_page_table_cleanup(dev, gart_info); r600_page_table_cleanup(dev, gart_info);
ret = -EINVAL;
goto done; goto done;
} }
entry_addr = entry->busaddr[i]; entry_addr = entry->busaddr[i];
...@@ -191,6 +190,7 @@ int r600_page_table_init(struct drm_device *dev) ...@@ -191,6 +190,7 @@ int r600_page_table_init(struct drm_device *dev)
entry_addr += ATI_PCIGART_PAGE_SIZE; entry_addr += ATI_PCIGART_PAGE_SIZE;
} }
} }
ret = 1;
done: done:
return ret; return ret;
} }
...@@ -2095,7 +2095,7 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, ...@@ -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->gart_info.addr,
dev_priv->pcigart_offset); dev_priv->pcigart_offset);
if (r600_page_table_init(dev)) { if (!r600_page_table_init(dev)) {
DRM_ERROR("Failed to init GART table\n"); DRM_ERROR("Failed to init GART table\n");
r600_do_cleanup_cp(dev); r600_do_cleanup_cp(dev);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment