]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/msm/a6xx: Track current ctx by seqno
authorRob Clark <robdclark@chromium.org>
Thu, 30 Sep 2021 17:43:20 +0000 (10:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:57:57 +0000 (11:57 +0200)
commit20cfa89cd7e1274268b23306a73fa496b6fe83cf
tree805bf95db6ff5184fdfc48ca700414c1f509accd
parent00ba7a3951f4ea7c91b29e2bfbb3a4ecf72bf542
drm/msm/a6xx: Track current ctx by seqno

commit 14eb0cb4e9a7323c8735cf6c681ed8423ce6ae06 upstream.

In theory a context can be destroyed and a new one allocated at the same
address, making the pointer comparision to detect when we don't need to
update the current pagetables invalid.  Instead assign a sequence number
to each context on creation, and use this for the check.

Fixes: 84c31ee16f90 ("drm/msm/a6xx: Add support for per-instance pagetables")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.h
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h