• Marek Szyprowski's avatar
    drm/exynos: Fix dma-buf import · 89452d4a
    Marek Szyprowski authored
    When IOMMU support was enabled, dma-buf import in Exynos DRM was broken
    since commit f43c3596 ("drm/exynos: use real device for DMA-mapping
    operations") due to using wrong struct device in drm_gem_prime_import()
    function. This patch fixes following kernel BUG caused by incorrect buffer
    mapping to DMA address space:
    
    exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0xb2e00000
    ------------[ cut here ]------------
    kernel BUG at drivers/iommu/exynos-iommu.c:449!
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4-next-20171016-00033-g990d723669fd #3165
    Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
    task: c0e0b7c0 task.stack: c0e00000
    PC is at exynos_sysmmu_irq+0x1d0/0x24c
    LR is at exynos_sysmmu_irq+0x154/0x24c
    ------------[ cut here ]------------
    Reported-by: default avatarMarian Mihailescu <mihailescu2m@gmail.com>
    Fixes: f43c3596 ("drm/exynos: use real device for DMA-mapping operations")
    Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
    Reviewed-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
    89452d4a
exynos_drm_gem.h 4.61 KB