From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Deucher Subject: [PATCH 08/14] drm/amdgpu: hdp flush&inval should always do Date: Wed, 4 May 2016 14:26:49 -0400 Message-ID: <1462386415-25600-8-git-send-email-alexander.deucher@amd.com> References: <1462386415-25600-1-git-send-email-alexander.deucher@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1462386415-25600-1-git-send-email-alexander.deucher@amd.com> Sender: stable-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org Cc: Monk Liu , Alex Deucher , stable@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org =46rom: Monk Liu This fixes Tonga vm-fault issue when running disaster (a multiple context GL heavy tests), We should always flush & invalidate hdp no matter vm used or not. Signed-off-by: Monk Liu Reviewed-by: Christian K=C3=B6nig Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/a= md/amdgpu/amdgpu_ib.c index 1693fc7e..61ca7e1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -164,11 +164,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, = unsigned num_ibs, amdgpu_ring_undo(ring); return r; } - - if (ring->funcs->emit_hdp_flush) - amdgpu_ring_emit_hdp_flush(ring); } =20 + if (ring->funcs->emit_hdp_flush) + amdgpu_ring_emit_hdp_flush(ring); + /* always set cond_exec_polling to CONTINUE */ *ring->cond_exe_cpu_addr =3D 1; =20 @@ -178,10 +178,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, u= nsigned num_ibs, } ring->last_fence_context =3D fence_context; =20 - if (vm) { - if (ring->funcs->emit_hdp_invalidate) - amdgpu_ring_emit_hdp_invalidate(ring); - } + if (ring->funcs->emit_hdp_invalidate) + amdgpu_ring_emit_hdp_invalidate(ring); =20 r =3D amdgpu_fence_emit(ring, &hwf); if (r) { --=20 2.5.5