From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: John David Anglin <dave.anglin@bell.net>
Cc: Sven Schnelle <svens@stackframe.org>,
linux-parisc@vger.kernel.org, deller@gmx.de
Subject: Re: some progress with radeon on C8000
Date: Fri, 4 Oct 2019 14:06:32 +0200 [thread overview]
Message-ID: <20191004120632.GA7472@alpha.franken.de> (raw)
In-Reply-To: <c9ef7686-96fc-e4ed-33d2-ebee7fb4aeed@bell.net>
On Wed, Oct 02, 2019 at 04:37:41PM -0400, John David Anglin wrote:
> On 2019-10-02 10:19 a.m., Thomas Bogendoerfer wrote:
> > + pa = addr & IOVP_MASK;
> > + mtsp(0,1);
> > + asm("lci 0(%%sr1, %1), %0" : "=r" (ci) : "r" (__va(pa)));
> I believe you can remove the mtsp and just use "lci 0(%1), %0" to load the coherence index. The space
> registers sr4 to sr7 are always 0 in kernel.
ok, good to know.
while reading this I realized what the other hacks were for, which I didn't
include in my first mail.
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 028ab6007873..e84c7652eb1b 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -66,7 +67,8 @@ static int ttm_agp_bind(struct ttm_tt *ttm, struct ttm_mem_reg *bo_mem)
if (!page)
page = ttm->dummy_read_page;
- mem->pages[mem->page_count++] = page;
+ mem->pages[(ttm->num_pages - 1) - mem->page_count] = page;
+ mem->page_count++;
}
agp_be->mem = mem;
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index d0459b392e5e..4bb301cab128 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -571,8 +571,14 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
*/
prot = ttm_io_prot(mem->placement, PAGE_KERNEL);
map->bo_kmap_type = ttm_bo_map_vmap;
+ printk("vmap %p\n", ttm->pages[start_page]);
+#if 0
map->virtual = vmap(ttm->pages + start_page, num_pages,
0, prot);
+#else
+ map->virtual = kmap(ttm->pages[start_page]);
+#endif
+
}
return (!map->virtual) ? -ENOMEM : 0;
}
This is needed to be able to get the virtual address with __va(pa).
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
next prev parent reply other threads:[~2019-10-04 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-28 21:44 some progress with radeon on C8000 Sven Schnelle
2019-10-02 14:19 ` Thomas Bogendoerfer
2019-10-02 20:37 ` John David Anglin
2019-10-04 12:06 ` Thomas Bogendoerfer [this message]
2019-10-04 12:36 ` Helge Deller
2019-10-07 7:33 ` Sven Schnelle
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=20191004120632.GA7472@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
--cc=svens@stackframe.org \
/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.