Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345630
b: refs/heads/master
c: c12e261
h: refs/heads/master
v: v3
  • Loading branch information
Eunchul Kim authored and Inki Dae committed Dec 14, 2012
1 parent cfc79c2 commit 8d9682d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb471f14b5eebfed22bb9f2d0f06601f171c574a
refs/heads/master: c12e2617b25535014a766a0bc3e05134ef817b82
18 changes: 18 additions & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "exynos_drm_drv.h"
#include "exynos_drm_gem.h"
#include "exynos_drm_ipp.h"
#include "exynos_drm_iommu.h"

/*
* IPP is stand for Image Post Processing and
Expand Down Expand Up @@ -1771,10 +1772,24 @@ static int ipp_subdrv_probe(struct drm_device *drm_dev, struct device *dev)
ippdrv->event_workq = ctx->event_workq;
ippdrv->sched_event = ipp_sched_event;
INIT_LIST_HEAD(&ippdrv->cmd_list);

if (is_drm_iommu_supported(drm_dev)) {
ret = drm_iommu_attach_device(drm_dev, ippdrv->dev);
if (ret) {
DRM_ERROR("failed to activate iommu\n");
goto err_iommu;
}
}
}

return 0;

err_iommu:
/* get ipp driver entry */
list_for_each_entry_reverse(ippdrv, &exynos_drm_ippdrv_list, drv_list)
if (is_drm_iommu_supported(drm_dev))
drm_iommu_detach_device(drm_dev, ippdrv->dev);

err_idr:
idr_remove_all(&ctx->ipp_idr);
idr_remove_all(&ctx->prop_idr);
Expand All @@ -1791,6 +1806,9 @@ static void ipp_subdrv_remove(struct drm_device *drm_dev, struct device *dev)

/* get ipp driver entry */
list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
if (is_drm_iommu_supported(drm_dev))
drm_iommu_detach_device(drm_dev, ippdrv->dev);

ippdrv->drm_dev = NULL;
exynos_drm_ippdrv_unregister(ippdrv);
}
Expand Down

0 comments on commit 8d9682d

Please sign in to comment.