Skip to content

Commit

Permalink
drm/rockchip: Check iommu itself instead of it's parent for device_is…
Browse files Browse the repository at this point in the history
…_available

When iommu itself is disabled in dts, we should
fallback to non-iommu buffer, check iommu parent
is meanless here.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210627084737.309163-1-andy.yan@rock-chips.com
  • Loading branch information
Andy Yan authored and Heiko Stuebner committed Sep 21, 2021
1 parent adfeef9 commit e1202c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/rockchip/rockchip_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static int rockchip_drm_platform_of_probe(struct device *dev)
}

iommu = of_parse_phandle(port->parent, "iommus", 0);
if (!iommu || !of_device_is_available(iommu->parent)) {
if (!iommu || !of_device_is_available(iommu)) {
DRM_DEV_DEBUG(dev,
"no iommu attached for %pOF, using non-iommu buffers\n",
port->parent);
Expand Down

0 comments on commit e1202c7

Please sign in to comment.