[Bug] VCHIQ functional test broken
Stefan Wahren
stefan.wahren at i2se.com
Mon Apr 24 09:12:09 PDT 2017
Am 20.04.2017 um 21:58 schrieb Rabin Vincent:
> On Thu, Apr 20, 2017 at 11:27:38AM -0700, Eric Anholt wrote:
>> I'm confused by what you're saying here. The driver has already been
>> converted to not use dmac_map_area (commit
>> cf9caf1929882b66922aee698e99e6c8f357bee5), and uses dma_map_sg instead,
>> matching the radeon driver you give as a model as far as I can see.
>> That commit is in v4.11-rc6 from Stefan's regression report.
> Right. Sorry. I must have had an old tag checked out when I looked at
> the driver earlier. The DMA API usage in the driver in v4.11-rc6 and
> current master looks fine, except for one thing:
>
> The flush in flush_dcache_page() (from get_user_pages()) was done with a
> v6_flush_kern_dcache_page() which always did a clean+invalidate while
> the DMA API only does what is required by the direction, which is only a
> invalidate for DMA_FROM_DEVICE. Since the driver calls dma_from_sg() on
> the entire page, even if userspace sent in an offset into the page,
> unrelated data in userspace may be thrown away.
>
> Does changing the dma API calls to always use DMA_BIDIRECTIONAL make the
> test pass?
Unfortunately not (at least not that simple).
Do we need special DMA mapping attributes here ? Or a dma_sync_sg_for_* ?
More information about the linux-rpi-kernel
mailing list