On Thu, Jul 2, 2015 at 9:02 PM, Michel Dänzer michel@daenzer.net wrote:
From: Michel Dänzer michel.daenzer@amd.com
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.
This is a nice safely measure, but the underlying issue is that the acpiphp code is broken again on some boards and attempts to remove the device after the driver has already suspended the driver for runtime pm. So the the driver's pci_remove callback ends up being called after the driver has already been suspended and the the hw has been disabled.
Alex
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61529 Signed-off-by: Michel Dänzer michel.daenzer@amd.com
drivers/gpu/drm/radeon/radeon_gart.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 5450fa9..c4777c8 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -260,8 +260,10 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset, } } }
mb();
radeon_gart_tlb_flush(rdev);
if (rdev->gart.ptr) {
mb();
radeon_gart_tlb_flush(rdev);
}
}
/** @@ -306,8 +308,10 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset, page_base += RADEON_GPU_PAGE_SIZE; } }
mb();
radeon_gart_tlb_flush(rdev);
if (rdev->gart.ptr) {
mb();
radeon_gart_tlb_flush(rdev);
} return 0;
}
-- 2.1.4
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel