summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-01-04 13:41:10 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-01-04 13:41:10 +0300
commitef426c103892eed94a9bb0ee59c2d0e6eac5179f (patch)
tree2d998f23fa6e3b3c51f4829f1f881b42e79b7c04 /drivers/gpu/drm/etnaviv/etnaviv_mmu.c
parenta402eae64d0ad12b1c4a411f250d6c161e67f623 (diff)
parent9b8b75de4cb379187c481a5332a12429f31c0887 (diff)
downloadlinux-ef426c103892eed94a9bb0ee59c2d0e6eac5179f.tar.xz
Merge tag 'drm-misc-next-2016-12-30' of git://anongit.freedesktop.org/git/drm-misc into drm-intel-next-queued
Directly merge drm-misc into drm-intel since Dave is on vacation and we need the various drm-misc patches (fb format rework, drm mm fixes, selftest framework and others). Also pulled back -rc2 in first to resync with drm-intel-fixes and make sure I can reuse the exact rerere solutions from drm-tip for safety, and because I'm lazy. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_mmu.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 169ac96e8f08..ae2733a609ba 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -113,6 +113,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
while (1) {
struct etnaviv_vram_mapping *m, *n;
+ struct drm_mm_scan scan;
struct list_head list;
bool found;
@@ -134,7 +135,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
}
/* Try to retire some entries */
- drm_mm_init_scan(&mmu->mm, size, 0, 0);
+ drm_mm_scan_init(&scan, &mmu->mm, size, 0, 0, 0);
found = 0;
INIT_LIST_HEAD(&list);
@@ -151,7 +152,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
continue;
list_add(&free->scan_node, &list);
- if (drm_mm_scan_add_block(&free->vram_node)) {
+ if (drm_mm_scan_add_block(&scan, &free->vram_node)) {
found = true;
break;
}
@@ -160,7 +161,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
if (!found) {
/* Nothing found, clean up and fail */
list_for_each_entry_safe(m, n, &list, scan_node)
- BUG_ON(drm_mm_scan_remove_block(&m->vram_node));
+ BUG_ON(drm_mm_scan_remove_block(&scan, &m->vram_node));
break;
}
@@ -171,7 +172,7 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu *mmu,
* can leave the block pinned.
*/
list_for_each_entry_safe(m, n, &list, scan_node)
- if (!drm_mm_scan_remove_block(&m->vram_node))
+ if (!drm_mm_scan_remove_block(&scan, &m->vram_node))
list_del_init(&m->scan_node);
/*