lkml.org 
[lkml]   [2005]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [Question] PCI device memory management
Date
From
Hi,

The PCI device memory is shared by several hardware blocks, say, the
DSP, the video decoder, video overlay, etc. And these hardware blocks
are also on this PCI device. So I need to do some memory management over
the PCI device memory based on the hardware needs. A function like what
kmalloc does for system memory but must simpler, I think.

So, for example, the video decoder needs some memory to put its decoded
picture. Its driver calls this function to allocate some PCI device
memory, tells the decoder where the memory is and starts the decoder.
The decoder will decode MPEG2 stream and put the decoded picture in this
piece of PCI device memory. Other drivers are similar.

I guess request/release_region don't apply here cause the caller of
these functions knows exactly where the memory/io is.
Mapping to user space may also be necessary in our driver but I think
that's after we allocate a chunk of memory from this PCI device memory
space.

Hope this is clear.

Thanks a lot,

Alex




> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Deepak Saxena
> Sent: Friday, November 11, 2005 7:56 PM
> To: Alex Song
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [Question] PCI device memory management
>
> On Nov 11 2005, at 16:53, Alex Song was caught saying:
> > Hi,
> >
> > Our PCI device has a lot of memory and we have to provide memory
> > management function for it.
> >
> > Does kernel already have this mechanism in place?
> >
> > Or we have to manage it on our own?
>
> I'm guessing what you mean is that there is more memory on
> the device then can be mapped in via the outbound window?
> You will have to carve it up into chunks and map/unmap
> regions as needed.
> Can you provide a bit more detail on what exactly you need to do?
>
> ~Deepak
>
> --
> Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net
>
> When law and duty are one, united by religion, you never
> become fully conscious, fully aware of yourself. You are
> always a little less than an individual. - Frank Herbert
> -
> 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/
>
>

-
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-11-14 21:25    [from the cache]
©2003-2011 Jasper Spaans