lkml.org 
[lkml]   [2004]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: video-buf warning
On Wed, 28 Apr 2004 11:57:38 +0300 (EEST)
Meelis Roos <mroos@linux.ee> wrote:

> CC [M] drivers/media/video/video-buf.o
> drivers/media/video/video-buf.c: In function `videobuf_iolock':
> drivers/media/video/video-buf.c:327: warning: cast from pointer to integer of different size
...
> The specific code is
> /* FIXME: need sanity checks for vb->boff */
> bus = (dma_addr_t)fbuf->base + vb->boff;
>
> bus is dma_addr_t (==u32 on sparc64), base is void*
>
> So if buf->base is really an arbitrary pointer, it might not fit into
> u32. What is it actually?

It is the physical address of a frame buffer, this code is allowing
user programs to point the video capturing to go directly onto a
frame buffer at a specific location.

Using dma_addr_t here is a poor choice, since that data type is to
be used to PCI DMA API interfaces for doing transfers to/from real
memory, not frame buffers and the like :-)

Unfortunately, there is no portable interface available for what
this code wants to do, which is device<-->device DMA transfers.
We would need to create an interface that took two device structures,
and some base+offset values, in order to provide a portable way to
do this, then a reworked version of this user interface would be needed
as well.

In short, it's long term to fix this up, don't worry about it for
now.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.208 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site