summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-01-23 00:25:00 +0100
committerDave Airlie <airlied@redhat.com>2017-01-23 00:25:00 +0100
commit2f39258e5744d34db5db27a1272fd41ac9d2397d (patch)
treeb21431c3acb9f453e19100ab3e2b5be658d5fe05 /drivers
parentMerge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentdrm/etnaviv: trick drm_mm into giving out a low IOVA (diff)
downloadlinux-2f39258e5744d34db5db27a1272fd41ac9d2397d.tar.xz
linux-2f39258e5744d34db5db27a1272fd41ac9d2397d.zip
Merge branch 'drm-etnaviv-fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes
a single fix for a FE hang after IOVA rollover on GC3000. This isn't pretty, but is the minimal fix for the issue. A larger rework of the code, that will also fix this issue properly, is currently in the works, but that needs to wait for at least the next feature pull. * 'drm-etnaviv-fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: trick drm_mm into giving out a low IOVA
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 169ac96e8f08..fe0e85b41310 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -116,9 +116,14 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
struct list_head list;
bool found;
+ /*
+ * XXX: The DRM_MM_SEARCH_BELOW is really a hack to trick
+ * drm_mm into giving out a low IOVA after address space
+ * rollover. This needs a proper fix.
+ */
ret = drm_mm_insert_node_in_range(&mmu->mm, node,
size, 0, mmu->last_iova, ~0UL,
- DRM_MM_SEARCH_DEFAULT);
+ mmu->last_iova ? DRM_MM_SEARCH_DEFAULT : DRM_MM_SEARCH_BELOW);
if (ret != -ENOSPC)
break;