diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-07-02 15:49:38 +0300 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-08-16 04:23:32 +0300 |
commit | bf56608a73444037d6960204d81662ccbdebe282 (patch) | |
tree | c84982fe6e47b768f2de6e49cf3c17abf4d06f13 /drivers/gpu/drm/exynos/exynos_drm_iommu.c | |
parent | b24919575ea26937013a4380a604c4e8c0a71c81 (diff) | |
download | linux-bf56608a73444037d6960204d81662ccbdebe282.tar.xz |
drm/exynos: remove unnecessary checking to support iommu
Already drm_iommu_attach_device and drm_iommu_detach_device check
whether support iommu internally, so we don't have to call
is_drm_iommu_supported before call them.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_iommu.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_iommu.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_iommu.c b/drivers/gpu/drm/exynos/exynos_drm_iommu.c index d4ec7465e9cc..4c2ec1bef252 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_iommu.c +++ b/drivers/gpu/drm/exynos/exynos_drm_iommu.c @@ -87,10 +87,8 @@ int drm_iommu_attach_device(struct drm_device *drm_dev, struct device *dev = drm_dev->dev; int ret; - if (!dev->archdata.mapping) { - DRM_ERROR("iommu_mapping is null.\n"); - return -EFAULT; - } + if (!dev->archdata.mapping) + return 0; subdrv_dev->dma_parms = devm_kzalloc(subdrv_dev, sizeof(*subdrv_dev->dma_parms), @@ -148,13 +146,10 @@ void drm_iommu_detach_device(struct drm_device *drm_dev, int drm_iommu_attach_device_if_possible(struct exynos_drm_crtc *exynos_crtc, struct drm_device *drm_dev, struct device *subdrv_dev) { - int ret = 0; - if (is_drm_iommu_supported(drm_dev)) { if (exynos_crtc->ops->clear_channels) exynos_crtc->ops->clear_channels(exynos_crtc); - return drm_iommu_attach_device(drm_dev, subdrv_dev); } - return ret; + return drm_iommu_attach_device(drm_dev, subdrv_dev); } |