summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-04-05 17:32:50 +0300
committerHeiko Stuebner <heiko@sntech.de>2022-05-03 00:52:27 +0300
commit421be3ee36a497949a4b564cd1e4f7f9fe755f57 (patch)
tree4341f028cdc79810332114d925ca3edbdb1b2a09 /drivers/gpu/drm/rockchip/rockchip_drm_drv.h
parentf8c242908ad15bbd604d3bcb54961b7d454c43f8 (diff)
downloadlinux-421be3ee36a497949a4b564cd1e4f7f9fe755f57.tar.xz
drm/rockchip: Refactor IOMMU initialisation
Defer the IOMMU domain setup until after successfully binding components, so we can figure out IOMMU support directly from the VOP devices themselves, rather than manually inferring it from the DT (which also fails to account for whether the IOMMU driver is actually loaded). Although this is somewhat of a logical cleanup, the main motivation is to prepare for a change in the iommu_domain_alloc() interface. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/94eee7ab434fe11eb0787f691e9f1ab03a2e91be.1649168685.git.robin.murphy@arm.com
Diffstat (limited to 'drivers/gpu/drm/rockchip/rockchip_drm_drv.h')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
index 143a48330f84..008c44aef400 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
@@ -44,6 +44,7 @@ struct rockchip_crtc_state {
*/
struct rockchip_drm_private {
struct iommu_domain *domain;
+ struct device *iommu_dev;
struct mutex mm_lock;
struct drm_mm mm;
};
@@ -52,6 +53,8 @@ int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
struct device *dev);
void rockchip_drm_dma_detach_device(struct drm_device *drm_dev,
struct device *dev);
+void rockchip_drm_dma_init_device(struct drm_device *drm_dev,
+ struct device *dev);
int rockchip_drm_wait_vact_end(struct drm_crtc *crtc, unsigned int mstimeout);
int rockchip_drm_endpoint_is_subdriver(struct device_node *ep);