drm/rockchip: Refactor IOMMU initialisation
authorRobin Murphy <robin.murphy@arm.com>
Tue, 5 Apr 2022 14:32:50 +0000 (15:32 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 2 May 2022 21:52:27 +0000 (23:52 +0200)
commit421be3ee36a497949a4b564cd1e4f7f9fe755f57
tree4341f028cdc79810332114d925ca3edbdb1b2a09
parentf8c242908ad15bbd604d3bcb54961b7d454c43f8
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
drivers/gpu/drm/rockchip/rockchip_drm_drv.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/rockchip/rockchip_drm_vop.c