FROMLIST: drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain
authorTomasz Figa <tfiga@chromium.org>
Tue, 21 Jun 2016 04:34:39 +0000 (13:34 +0900)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 7 Dec 2016 06:08:38 +0000 (14:08 +0800)
commit103866399aa294c1946dee13f0689b343590ff98
tree4f06a016e6e841a24c28649eaeb1e693227b9f79
parent982ceedab057dd1efcc4c893f84989fac29de80c
FROMLIST: drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain

The API is not suitable for subsystems consisting of multiple devices
and requires severe hacks to use it. To mitigate this, this patch
implements allocation and address space management locally by using
helpers provided by DRM framework, like other DRM drivers do, e.g.
Tegra.

This patch should not introduce any functional changes until the driver
is made to attach subdevices into an IOMMU domain with the generic IOMMU
API, which will happen in following patch. Based heavily on GEM
implementation of Tegra DRM driver.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9196387/)

BUG=chrome-os-partner:53565
TEST=boot to ui on Gru

Reviewed-on: https://chromium-review.googlesource.com/353591
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Conflicts:
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/rockchip/rockchip_drm_gem.c
drivers/gpu/drm/rockchip/rockchip_drm_gem.h

Change-Id: I599b2551e8e8000024894426e4e19d7543af3b0a
Signed-off-by: Randy Li <randy.li@rock-chips.com>
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/rockchip/rockchip_drm_gem.c
drivers/gpu/drm/rockchip/rockchip_drm_gem.h