Re: [RFC 4/4] drm: Add NVIDIA Tegra support |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [RFC 4/4] drm: Add NVIDIA Tegra support
- From: Daniel Vetter <daniel@xxxxxxxx>
- Date: Thu, 12 Apr 2012 16:23:27 +0200
- Cc: Tomasz Stanislawski <t.stanislaws@xxxxxxxxxxx>, "'Joerg Roedel'" <joerg.roedel@xxxxxxx>, devicetree-discuss@xxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, "'Colin Cross'" <ccross@xxxxxxxxxxx>, "'Jon Mayo'" <jmayo@xxxxxxxxxx>, "'Hiroshi Doyu'" <hdoyu@xxxxxxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
- Delivered-to: dri-devel@xxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <201204121118.19685.arnd@arndb.de>
- References: <1334146230-1795-1-git-send-email-thierry.reding@avionic-design.de> <20120412071816.GA18252@avionic-0098.mockup.avionic-design.de> <025f01cd1887$da56b6e0$8f0424a0$%szyprowski@samsung.com> <201204121118.19685.arnd@arndb.de>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Apr 12, 2012 at 11:18:19AM +0000, Arnd Bergmann wrote:
> On Thursday 12 April 2012, Marek Szyprowski wrote:
> > Scatter lists were initially designed for the disk based block io operations,
> > hence the presence of the in-page offsets and lengths for each chunk. For
> > multimedia use cases providing an array of struct pages and asking dma-mapping
> > to map them into contiguous memory is probably all we need. I wonder if
> > introducing such new calls is a good idea. Anrd, what do think? It will
> > definitely simplify the drivers and improve the code understanding. On the
> > other hand it requires a significant amount of work in the dma-mapping
> > framework for all architectures, but that's not a big issue for me.
>
> My feeling is that it's too much like the existing _sg version, so I wouldn't
> add yet another variant. While having a simple page array is definitely
> simpler and potentially faster, I think the API is already too complex
> and we need to be very careful with new additions.
I concur here. For VT-d support we wrestle the pages through an sg list in
drm/i915, too. It's not beautiful, and because our gpu internal pagetables
need 2 loops to walk the sg lists, one for the sg segments, one to loop
over all pages in a segment. And additional a WARN_ON if the segment
dma address isn't page-aligned. It's ugly, but imo adding some helpers to
easier deal with this common case (like the drm_prime_pages_to_sg)
function is better than creating an entirely new interface.
-Daniel
--
Daniel Vetter
Mail: daniel@xxxxxxxx
Mobile: +41 (0)79 365 57 48
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Free Online Dating]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[16.7MP]