RE: [PATCH 2/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

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

 



Hello,

On Tuesday, April 26, 2011 4:10 PM Arnd Bergmann wrote:

> On Friday 22 April 2011, Marek Szyprowski wrote:
> > > * Create two codec devices in parallel and bind to both with your
> > >   driver, ideally splitting up the resources between the two
> > >   devices in a meaningful way.
> >
> > Video codec has only standard 2 resources - ioregs and irq, so there
> > is not much left for such splitting.
> 
> Ok, I see.
> 
> > > None of them are extremely nice, but it's not that hard either.
> > > You should probably prototype a few of these approaches to see
> > > which one is the least ugly one.
> >
> > Ok. Today while iterating over the hardware requirements I noticed
> > one more thing. Our codec hardware has one more, odd requirement for
> > video buffers. The DMA addresses need to be aligned to 8KiB or 16KiB
> > (depending on buffer type). Do you have any idea how this can be
> > handled in a generic way?
> 
> I don't think you can force the mappings to be aligned to that size
> in the streaming mapping, but you should be able to just align inside
> of dma_map_single etc and map a larger region.
> 
> For the allocation functions (dma_alloc_coherent, dma_alloc_noncoherent),
> using alloc_pages to allocate multiples of the size you need should
> always give you aligned buffers because of the way that the underlying
> buddy allocator works.

Well, I thought about the alignment of the IOVA mapping. I will probably
handle it with some additional archdata stuff.

I've started hacking ARM dma-mapping interface to get support for 
dma-mapping-common.h and then to integrate with Samsung IOMMU driver.
I hope to post the initial version before Linaro meeting in Budapest.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux