[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [drm:r100_ring_test] *ERROR* radeon: ring test failed
> > > http://pasik.reaktio.net/xen/pv_ops-dom0-debug/radeondebug/dmesg-2.6.31.3-1.2.71.xendom0.fc12.x86_64-2009-10-14.txt > > > > Nah. Still has the same problem: > > > > [drm:r100_ring_test] *ERROR* radeon: ring test failed > > (sracth(0x15E4)=0xCAFEDEAD) > > [drm:r100_cp_init] *ERROR* radeon: cp isn't working (- I looked a bit at the code and tried to reproduce this, but found out that the hardware I've is a bit too modern for mode-setting to work (no support yet for RS780). I looked at the code yesterday and I think I've found the the failure. But I don't have yet a test bed for this, so if you are willing to be guinea pig, please test this patch (also attached): diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index b8b6c4a..4445364 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -27,7 +27,7 @@ /* * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com> */ - +#include <linux/dma-mapping.h> #include <linux/vmalloc.h> #include <linux/sched.h> #include <linux/highmem.h> @@ -138,6 +138,9 @@ static void ttm_tt_free_page_directory(struct ttm_tt *ttm) static struct page *ttm_tt_alloc_page(unsigned page_flags) { gfp_t gfp_flags = GFP_USER; + void *addr; + dma_addr_t phys; + struct page *page; if (page_flags & TTM_PAGE_FLAG_ZERO_ALLOC) gfp_flags |= __GFP_ZERO; @@ -147,7 +150,24 @@ static struct page *ttm_tt_alloc_page(unsigned page_flags) else gfp_flags |= __GFP_HIGHMEM; - return alloc_page(gfp_flags); + addr = dma_alloc_coherent(NULL, PAGE_SIZE, &phys, gfp_flags); + BUG_ON(!addr); + page = virt_to_page(addr); + get_page(page); + return page; +} + +static void ttm_tt_free_page(struct page *page) +{ + void *addr; + + if (page == NULL) + return; + + put_page(page); + addr = page_address(page); + + dma_free_coherent(NULL, PAGE_SIZE, addr, virt_to_bus(addr)); } static void ttm_tt_free_user_pages(struct ttm_tt *ttm) @@ -180,7 +200,7 @@ static void ttm_tt_free_user_pages(struct ttm_tt *ttm) ttm->pages[i] = NULL; ttm_mem_global_free(ttm->bdev->mem_glob, PAGE_SIZE, false); - put_page(page); + ttm_tt_free_page(page); } ttm->state = tt_unpopulated; ttm->first_himem_page = ttm->num_pages; @@ -218,7 +238,7 @@ static struct page *__ttm_tt_get_page(struct ttm_tt *ttm, int index) } return p; out_err: - put_page(p); + ttm_tt_free_page(p); return NULL; } Attachment:
ttm.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |