This is a note to let you know that I've just added the patch titled drm/etnaviv: move flush_seq increment into etnaviv_iommu_map/unmap to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-etnaviv-move-flush_seq-increment-into-etnaviv_io.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 6e5106528a463124fb7dcfab32b0031f7b06abaf Author: Lucas Stach <l.stach@xxxxxxxxxxxxxx> Date: Wed Mar 23 17:08:24 2022 +0100 drm/etnaviv: move flush_seq increment into etnaviv_iommu_map/unmap [ Upstream commit 9247fcca3982a29b04b002f0d30def9ff50740d5 ] The flush sequence is a marker that the page tables have been changed and any affected TLBs need to be flushed. Move the flush_seq increment a little further down the call stack to place it next to the actual page table manipulation. Not functional change. Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> Tested-by: Guido Günther <agx@xxxxxxxxxxx> Acked-by: Guido Günther <agx@xxxxxxxxxxx> Stable-dep-of: 9aad03e7f5db ("drm/etnaviv: Drop the offset in page manipulation") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c index 2de806173b3aa..1d37b5bd86760 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_mmu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_mmu.c @@ -92,6 +92,8 @@ static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova, da += bytes; } + context->flush_seq++; + return 0; fail: @@ -117,6 +119,8 @@ static void etnaviv_iommu_unmap(struct etnaviv_iommu_context *context, u32 iova, da += bytes; } + + context->flush_seq++; } static void etnaviv_iommu_remove_mapping(struct etnaviv_iommu_context *context, @@ -272,7 +276,6 @@ int etnaviv_iommu_map_gem(struct etnaviv_iommu_context *context, } list_add_tail(&mapping->mmu_node, &context->mappings); - context->flush_seq++; unlock: mutex_unlock(&context->lock); @@ -297,7 +300,6 @@ void etnaviv_iommu_unmap_gem(struct etnaviv_iommu_context *context, etnaviv_iommu_remove_mapping(context, mapping); list_del(&mapping->mmu_node); - context->flush_seq++; mutex_unlock(&context->lock); }