[PATCH] radeon: fix logic in r600_page_table_init() to match ati_gart

This fixes page table init on rs600.

Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>

please apply to both drm-next and drm-rawhide

http://www.botchco.com/alex/xorg/drm-rawhide/0001-radeon-fix-logic-in-r600_page_table_init-to-match.patch

>From d1a93f61cabcce5ed6d864c630a4592e14af944d Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeuc...@gmail.com>
Date: Mon, 16 Mar 2009 15:31:56 -0400
Subject: [PATCH] radeon: fix logic in r600_page_table_init() to match ati_gart

This fixes page table init on rs600.

Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
---
 drivers/gpu/drm/radeon/r600_cp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index ca4eb2f..dee3840 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -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;
 }
@@ -2089,7 +2089,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;
-- 
1.5.6.3

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to