* drm fixup 1/2 - missing bus_address assignment
@ 2004-08-27 14:12 Dave Airlie
2004-08-27 14:21 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2004-08-27 14:12 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
This is a series of two minor patches for the DRM, one fixes a missing
bus_address and the other from Arjan optimises some access in the i8x0
drivers..
Patch from Tom Arbuckle for missing bus_address
Signed-off-by: Dave Airlie <airlied@linux.ie>
diff -Nru a/drivers/char/drm/drm_bufs.h b/drivers/char/drm/drm_bufs.h
--- a/drivers/char/drm/drm_bufs.h Sat Aug 28 00:02:27 2004
+++ b/drivers/char/drm/drm_bufs.h Sat Aug 28 00:02:28 2004
@@ -691,6 +691,7 @@
buf->used = 0;
buf->offset = (dma->byte_count + byte_count + offset);
buf->address = (void *)(page + offset);
+ buf->bus_address = virt_to_bus(buf->address);
buf->next = NULL;
buf->waiting = 0;
buf->pending = 0;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drm fixup 1/2 - missing bus_address assignment
2004-08-27 14:12 drm fixup 1/2 - missing bus_address assignment Dave Airlie
@ 2004-08-27 14:21 ` Christoph Hellwig
2004-08-27 23:55 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2004-08-27 14:21 UTC (permalink / raw)
To: Dave Airlie; +Cc: torvalds, linux-kernel
On Fri, Aug 27, 2004 at 03:12:30PM +0100, Dave Airlie wrote:
> + buf->bus_address = virt_to_bus(buf->address);
this iw wrong. never use virt_to_bus in new code and whenever you see it
in old code get rid of it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drm fixup 1/2 - missing bus_address assignment
2004-08-27 14:21 ` Christoph Hellwig
@ 2004-08-27 23:55 ` Dave Airlie
2004-08-28 0:12 ` David S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: Dave Airlie @ 2004-08-27 23:55 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: torvalds, linux-kernel
> > + buf->bus_address = virt_to_bus(buf->address);
>
> this iw wrong. never use virt_to_bus in new code and whenever you see it
> in old code get rid of it.
>
Is there an alternative or do I just dump it? I think we only use the
bus_address for debugging in /proc and I don't think many people actually
have used it ..
Dave.
--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: drm fixup 1/2 - missing bus_address assignment
2004-08-27 23:55 ` Dave Airlie
@ 2004-08-28 0:12 ` David S. Miller
2004-08-28 0:16 ` Dave Airlie
0 siblings, 1 reply; 5+ messages in thread
From: David S. Miller @ 2004-08-28 0:12 UTC (permalink / raw)
To: Dave Airlie; +Cc: hch, torvalds, linux-kernel
On Sat, 28 Aug 2004 00:55:32 +0100 (IST)
Dave Airlie <airlied@linux.ie> wrote:
> > > + buf->bus_address = virt_to_bus(buf->address);
> >
> > this iw wrong. never use virt_to_bus in new code and whenever you see it
> > in old code get rid of it.
> >
>
> Is there an alternative or do I just dump it? I think we only use the
> bus_address for debugging in /proc and I don't think many people actually
> have used it ..
You really have to use the defined DMA apis for stuff like this.
I was going to bark about this too.
Check out Documentation/DMA-mapping.txt and friends.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-28 0:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27 14:12 drm fixup 1/2 - missing bus_address assignment Dave Airlie
2004-08-27 14:21 ` Christoph Hellwig
2004-08-27 23:55 ` Dave Airlie
2004-08-28 0:12 ` David S. Miller
2004-08-28 0:16 ` Dave Airlie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®