drm/radeon/kms: check/restore sanity before doing anything else with GPU.
authorDave Airlie <airlied@redhat.com>
Thu, 15 Jul 2010 02:13:50 +0000 (12:13 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 2 Aug 2010 00:00:09 +0000 (10:00 +1000)
commit4c712e6c7ef19e7e8e1f38b27bb65290def39b40
treec2f5d3663f849f445ff1154762188904e0633c2d
parente376573f7267390f4e1bdc552564b6fb913bce76
drm/radeon/kms: check/restore sanity before doing anything else with GPU.

On systems using kexec, the new kernel is booted straight from the old kernel, without any warning to the graphics driver. So the GPU is basically left as-is in a running state, however the CPU side is completly reset.

Without stating the saneness of anyone using kexec on live systems, we should at least try not to crash the GPU. This patch resets 3 registers to 0 that could cause bad things to happen to the running system.

This allows kexec to work on a Power6/RN50 system.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r420.c
drivers/gpu/drm/radeon/r520.c
drivers/gpu/drm/radeon/radeon_asic.h
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c
drivers/gpu/drm/radeon/rv515.c