drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULL
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 3 Jul 2015 01:02:27 +0000 (10:02 +0900)
committerJiri Slaby <jslaby@suse.cz>
Tue, 4 Aug 2015 14:52:19 +0000 (16:52 +0200)
commit1a9f8f2378ba1b5ef8e321df43097d07e79d0496
tree252199b0dafd85213264fa679b9af414e0f8386f
parent607272f1e72f8e3ea0ece948d12b97ecc8b8f86c
drm/radeon: Don't flush the GART TLB if rdev->gart.ptr == NULL

commit 233709d2cd6bbaaeda0aeb8d11f6ca7f98563b39 upstream.

This can be the case when the GPU is powered off, e.g. via vgaswitcheroo
or runpm. When the GPU is powered up again, radeon_gart_table_vram_pin
flushes the TLB after setting rdev->gart.ptr to non-NULL.

Fixes panic on powering off R7xx GPUs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61529
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/radeon/radeon_gart.c