From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Pasi Kärkkäinen" <pasik@iki.fi>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Xen-devel <xen-devel@lists.xensource.com>
Subject: [drm:r100_ring_test] *ERROR* radeon: ring test failed
Date: Tue, 20 Oct 2009 12:58:05 -0400 [thread overview]
Message-ID: <20091020165805.GA12035@phenom.dumpdata.com> (raw)
In-Reply-To: <20091016090159.GI1434@reaktio.net>
[-- Attachment #1: Type: text/plain, Size: 2391 bytes --]
> > > 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 #2: ttm.patch --]
[-- Type: text/plain, Size: 2136 bytes --]
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;
}
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index a68829d..e57e442 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -524,7 +524,7 @@ extern void ttm_tt_destroy(struct ttm_tt *ttm);
extern void ttm_tt_unbind(struct ttm_tt *ttm);
/**
- * ttm_ttm_destroy:
+ * ttm_tt_get_page:
*
* @ttm: The struct ttm_tt.
* @index: Index of the desired page.
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2009-10-20 16:58 UTC|newest]
Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-19 1:19 Announcing xen/master: pvops git trees rearranged Jeremy Fitzhardinge
2009-09-19 10:36 ` Marc - A. Dahlhaus
2009-09-20 19:29 ` Marc - A. Dahlhaus
2009-09-21 6:22 ` Pasi Kärkkäinen
2009-09-21 8:49 ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
2009-09-21 9:03 ` Pasi Kärkkäinen
2009-09-21 9:18 ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
2009-09-21 14:39 ` Konrad Rzeszutek Wilk
2009-09-21 16:19 ` [Cluster-devel] Re: [Xen-devel] " Marc
2009-09-21 15:20 ` Pasi Kärkkäinen
2009-09-19 14:46 ` pvops: AHCI problems with SB600 Patrick Scharrenberg
2009-09-21 5:57 ` Patrick Scharrenberg
2009-09-21 15:06 ` Konrad Rzeszutek Wilk
2009-09-22 9:00 ` Patrick Scharrenberg
2009-09-22 14:08 ` Konrad Rzeszutek Wilk
2009-09-23 7:37 ` Patrick Scharrenberg
2009-09-23 12:09 ` Konrad Rzeszutek Wilk
2009-09-23 12:06 ` Konrad Rzeszutek Wilk
2009-09-23 19:22 ` Jeremy Fitzhardinge
2009-09-23 19:32 ` Konrad Rzeszutek Wilk
2009-09-23 20:09 ` Jeremy Fitzhardinge
2009-09-23 20:30 ` Jeremy Fitzhardinge
2009-09-23 21:24 ` Konrad Rzeszutek Wilk
2009-09-23 21:56 ` Jeremy Fitzhardinge
2009-09-24 12:44 ` Konrad Rzeszutek Wilk
2009-09-24 18:23 ` Jeremy Fitzhardinge
2009-09-24 21:36 ` Konrad Rzeszutek Wilk
2009-09-24 19:12 ` Patrick Scharrenberg
2009-09-21 14:43 ` Announcing xen/master: pvops git trees rearranged (AMD tests?) Konrad Rzeszutek Wilk
2009-09-21 19:25 ` Announcing xen/master: pvops git trees rearranged Pasi Kärkkäinen
2009-09-21 19:30 ` Jeremy Fitzhardinge
2009-09-21 19:50 ` Pasi Kärkkäinen
2009-09-21 20:21 ` Jeremy Fitzhardinge
2009-09-21 20:26 ` Pasi Kärkkäinen
2009-09-21 20:29 ` Jeremy Fitzhardinge
2009-09-21 20:36 ` Pasi Kärkkäinen
2009-09-23 13:16 ` Christian Tramnitz
2009-09-23 20:13 ` Jeremy Fitzhardinge
2009-09-24 3:17 ` Qing He
2009-09-24 19:38 ` Jeremy Fitzhardinge
2009-09-24 8:15 ` Zhang, Xiantao
2009-09-25 1:44 ` Zhang, Xiantao
[not found] ` <706158FABBBA044BAD4FE898A02E4BC201C9AC7ED0@pdsmsx503.ccr.corp.intel.com>
[not found] ` <4AC54350.7040909@goop.org>
[not found] ` <706158FABBBA044BAD4FE898A02E4BC201C9AC8A88@pdsmsx503.ccr.corp.intel.com>
[not found] ` <4AD75A0B.9020508@goop.org>
[not found] ` <706158FABBBA044BAD4FE898A02E4BC201C9BD87FA@pdsmsx503.ccr.corp.intel.com>
2009-11-12 0:47 ` APIC rework Jeremy Fitzhardinge
2009-11-12 1:00 ` Jeremy Fitzhardinge
2009-11-12 23:51 ` Jeremy Fitzhardinge
2009-11-13 5:27 ` Zhang, Xiantao
2009-11-13 7:24 ` Keir Fraser
2009-11-13 23:57 ` Jeremy Fitzhardinge
2009-11-14 8:04 ` Keir Fraser
2009-11-16 10:38 ` Zhang, Xiantao
2009-11-16 18:37 ` Jeremy Fitzhardinge
2009-11-17 3:13 ` Zhang, Xiantao
2009-11-17 3:45 ` Keir Fraser
2009-11-17 5:20 ` Jeremy Fitzhardinge
2009-11-17 5:44 ` Keir Fraser
2009-11-17 12:46 ` Zhang, Xiantao
2009-11-17 13:05 ` Keir Fraser
2009-11-17 14:17 ` Zhang, Xiantao
2009-11-17 18:51 ` Jeremy Fitzhardinge
2009-11-18 3:37 ` Zhang, Xiantao
2009-11-18 14:29 ` Konrad Rzeszutek Wilk
2009-11-20 1:47 ` Zhang, Xiantao
2009-11-17 19:49 ` Keir Fraser
2009-11-18 3:12 ` Jiang, Yunhong
2009-11-18 3:25 ` Zhang, Xiantao
2009-11-18 9:37 ` Keir Fraser
2009-11-24 10:04 ` Zhang, Xiantao
2009-11-24 19:25 ` Jeremy Fitzhardinge
2009-11-25 1:42 ` Zhang, Xiantao
2009-11-24 19:44 ` Konrad Rzeszutek Wilk
2009-11-24 23:35 ` Jeremy Fitzhardinge
2009-11-25 14:10 ` Konrad Rzeszutek Wilk
2009-11-25 19:14 ` Jeremy Fitzhardinge
2009-11-30 14:26 ` Konrad Rzeszutek Wilk
2009-11-25 2:43 ` Zhang, Xiantao
2009-11-25 13:41 ` Konrad Rzeszutek Wilk
2009-11-25 15:21 ` Zhang, Xiantao
2009-11-25 18:00 ` Konrad Rzeszutek Wilk
2009-11-26 11:53 ` Zhang, Xiantao
2009-11-30 14:34 ` Konrad Rzeszutek Wilk
2009-12-03 2:13 ` Zhang, Xiantao
2009-12-03 14:38 ` Konrad Rzeszutek Wilk
2009-11-25 18:59 ` Jeremy Fitzhardinge
2009-11-26 1:11 ` Zhang, Xiantao
2009-11-18 14:15 ` Konrad Rzeszutek Wilk
2009-11-20 1:45 ` Zhang, Xiantao
2009-11-17 5:12 ` Jeremy Fitzhardinge
2009-09-24 13:20 ` Announcing xen/master: pvops git trees rearranged Christian Tramnitz
2009-09-24 17:47 ` Andy Burns
2009-09-24 18:29 ` Thiago Camargo Martins Cordeiro
2009-09-24 19:32 ` Thiago Camargo Martins Cordeiro
2009-09-24 20:00 ` Jeremy Fitzhardinge
2009-09-24 19:56 ` Jeremy Fitzhardinge
2009-10-11 15:39 ` Pasi Kärkkäinen
2009-10-12 20:02 ` Konrad Rzeszutek Wilk
2009-10-14 21:14 ` Pasi Kärkkäinen
2009-10-15 20:04 ` Konrad Rzeszutek Wilk
2009-10-16 9:01 ` Pasi Kärkkäinen
2009-10-20 16:58 ` Konrad Rzeszutek Wilk [this message]
2009-10-21 11:54 ` [drm:r100_ring_test] *ERROR* radeon: ring test failed Pasi Kärkkäinen
2009-10-21 18:31 ` Konrad Rzeszutek Wilk
2009-10-21 18:52 ` Pasi Kärkkäinen
2009-10-21 19:50 ` Jeremy Fitzhardinge
2009-10-21 20:22 ` Pasi Kärkkäinen
2009-10-27 15:46 ` Pasi Kärkkäinen
2009-10-27 17:00 ` Konrad Rzeszutek Wilk
2009-10-27 17:30 ` Pasi Kärkkäinen
2009-10-27 19:45 ` Pasi Kärkkäinen
2009-10-27 19:41 ` Konrad Rzeszutek Wilk
2009-10-27 20:18 ` Pasi Kärkkäinen
2009-10-27 20:13 ` Konrad Rzeszutek Wilk
2009-10-27 20:36 ` Pasi Kärkkäinen
2010-01-01 17:21 ` Pasi Kärkkäinen
2010-01-04 13:37 ` Konrad Rzeszutek Wilk
2010-01-04 19:42 ` Pasi Kärkkäinen
2010-01-14 20:05 ` Konrad Rzeszutek Wilk
2010-01-15 7:18 ` Pasi Kärkkäinen
2009-10-27 20:23 ` Pasi Kärkkäinen
2009-12-04 16:07 ` Announcing xen/master: pvops git trees rearranged Stefan Kuhne
2009-12-04 18:58 ` Pasi Kärkkäinen
2009-12-04 19:27 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091020165805.GA12035@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=jeremy@goop.org \
--cc=pasik@iki.fi \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.