summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-10-29 15:20:56 +0100
committerLucas Stach <l.stach@pengutronix.de>2020-10-30 15:33:59 +0100
commit4612bad5701e158f3c40951f2c7aa8e64b3445eb (patch)
tree26371673369a8ca3cd7947d938d009daf576d37f
parent3136fed4f91e02ad754464bf1ec15e22b800cc69 (diff)
downloadlinux-etnaviv/next.tar.gz
drm/etnaviv: Add lockdep annotations for context locketnaviv/next
etnaviv_iommu_find_iova has it so etnaviv_iommu_insert_exact and lockdep_assert_held should have it as well. Signed-off-by: Guido Günther <agx@sigxcpu.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_mmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
index 3607d34..cd599ac 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c
@@ -131,6 +131,8 @@ static void etnaviv_iommu_remove_mapping(struct etnaviv_iommu_context *context,
{
struct etnaviv_gem_object *etnaviv_obj = mapping->object;
+ lockdep_assert_held(&context->lock);
+
etnaviv_iommu_unmap(context, mapping->vram_node.start,
etnaviv_obj->sgt, etnaviv_obj->base.size);
drm_mm_remove_node(&mapping->vram_node);
@@ -223,6 +225,8 @@ static int etnaviv_iommu_find_iova(struct etnaviv_iommu_context *context,
static int etnaviv_iommu_insert_exact(struct etnaviv_iommu_context *context,
struct drm_mm_node *node, size_t size, u64 va)
{
+ lockdep_assert_held(&context->lock);
+
return drm_mm_insert_node_in_range(&context->mm, node, size, 0, 0, va,
va + size, DRM_MM_INSERT_LOWEST);
}