OSDN Git Service

drm/panfrost: Don't try to map pages that are already mapped
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 5 Feb 2021 11:17:56 +0000 (12:17 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 15 Feb 2021 08:43:33 +0000 (09:43 +0100)
commitf45da8204ff1707c529a8769f5467ff16f504b26
tree5a64fa93de48d7f3469f046eae22f6283432fe83
parent3aa0a80fc692c9959c261f4c5bfe9c23ddd90562
drm/panfrost: Don't try to map pages that are already mapped

We allocate 2MB chunks at a time, so it might appear that a page fault
has already been handled by a previous page fault when we reach
panfrost_mmu_map_fault_addr(). Bail out in that case to avoid mapping the
same area twice.

Cc: <stable@vger.kernel.org>
Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210205111757.585248-3-boris.brezillon@collabora.com
drivers/gpu/drm/panfrost/panfrost_mmu.c