drm/panfrost: Rework page table flushing and runtime PM interaction
authorRob Herring <robh@kernel.org>
Mon, 26 Aug 2019 22:33:13 +0000 (17:33 -0500)
committerRob Herring <robh@kernel.org>
Fri, 30 Aug 2019 14:53:07 +0000 (09:53 -0500)
commitec7eba47da867e1dd0ff7d442a8717d70c064658
tree5554c87507fdb841bbb2e5de6bdef5a143dc5f0c
parente316f08f1abf5f1116118e25dce7bc3e9ab03246
drm/panfrost: Rework page table flushing and runtime PM interaction

There is no point in resuming the h/w just to do flush operations and
doing so takes several locks which cause lockdep issues with the shrinker.
Rework the flush operations to only happen when the h/w is already awake.
This avoids taking any locks associated with resuming which trigger
lockdep warnings.

Fixes: 013b65101315 ("drm/panfrost: Add madvise and shrinker support")
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190826223317.28509-5-robh@kernel.org
drivers/gpu/drm/panfrost/panfrost_mmu.c