RE: [Question] PCI device memory management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: [email protected] 
> [mailto:[email protected]] On Behalf Of Deepak Saxena
> Sent: Friday, November 11, 2005 7:56 PM
> To: Alex Song
> Cc: [email protected]
> 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 - [email protected] - 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 
> [email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux