drm/exynos: when to call dma_map_sg() on a GEM object?

Tobias Jakobi tjakobi at math.uni-bielefeld.de
Fri Oct 30 13:44:06 PDT 2015


Hey there,

this question arose during some discussion with someone concerning the
Exynos mixer and G2D.

The question is the following. Consider the Exynos mixer when run under
the IOMMU (that's sysmmu_tv IIRC). What exactly does setup the IOMMU
mapping so that the mixer can scanout the framebuffer?

There is exynos_gem_map_sgt_with_dma() in the Exynos GEM code, but it's
currently exclusively used for the G2D and only when dealing with
userptr (and not GEM) there.

I was looking at exynos_drm_alloc_buf() since this called when
allocating a BO to be used as scanout.

I see dma_alloc_attrs() being called, which also sets the DMA address
that is later used in the mixer code. But DMA_ATTR_NO_KERNEL_MAPPING is
passed, so no mapping is done at this point.

Is the mapping done somewhere else, or is it simply not necessary here?

With best wishes,
Tobias


More information about the dri-devel mailing list