summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-11-01 11:08:24 +1000
committerDave Airlie <airlied@redhat.com>2019-11-01 11:09:05 +1000
commit6f966213fea0adf91684074e37177d2d61228137 (patch)
tree9cb645b2ae1349a59c750b4a80b328cedc85ec2b /drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
parentd6d5df1db6e9d7f8f76d2911707f7d5877251b02 (diff)
parenta2f10d4a3069fee666dab20fab5458757ba1f22d (diff)
Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes
One memory corruption fix in the MMUv2 GPU coredump code, a deadlock fix also in the coredump code and reintroduction of a helpful message, which got dropped by accident in this cycle. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Lucas Stach <l.stach@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/b0d640267662e3ce5e0089d0afedc1baba55058d.camel@pengutronix.de
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c b/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
index 043111a1d60c..f8bf488e9d71 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c
@@ -155,9 +155,11 @@ static void etnaviv_iommuv2_dump(struct etnaviv_iommu_context *context, void *bu
memcpy(buf, v2_context->mtlb_cpu, SZ_4K);
buf += SZ_4K;
- for (i = 0; i < MMUv2_MAX_STLB_ENTRIES; i++, buf += SZ_4K)
- if (v2_context->mtlb_cpu[i] & MMUv2_PTE_PRESENT)
+ for (i = 0; i < MMUv2_MAX_STLB_ENTRIES; i++)
+ if (v2_context->mtlb_cpu[i] & MMUv2_PTE_PRESENT) {
memcpy(buf, v2_context->stlb_cpu[i], SZ_4K);
+ buf += SZ_4K;
+ }
}
static void etnaviv_iommuv2_restore_nonsec(struct etnaviv_gpu *gpu,