drm/etnaviv: reference MMU context when setting up hardware state
authorLucas Stach <l.stach@pengutronix.de>
Fri, 20 Aug 2021 20:18:29 +0000 (22:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:27:55 +0000 (12:27 +0200)
commitea995e8a629446c4a27e7f8042fc08e05659298b
tree0ac47576cd41a55f940fcf5e5ef66ece17345a16
parent660dfbf208a4bf3eaab8560e8671be831b52e1c1
drm/etnaviv: reference MMU context when setting up hardware state

commit d6408538f091fb22d47f792d4efa58143d56c3fb upstream.

Move the refcount manipulation of the MMU context to the point where the
hardware state is programmed. At that point it is also known if a previous
MMU state is still there, or the state needs to be reprogrammed with a
potentially different context.

Cc: stable@vger.kernel.org # 5.4
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Michael Walle <michael@walle.cc>
Tested-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c
drivers/gpu/drm/etnaviv/etnaviv_iommu.c
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c