linux/drivers/gpu/drm/radeon
Simon Kitching 16c58081eb drm/radeon: Prevent leak of scratch register on resume from suspend
Cards typically have 5-7 scratch registers; one of these is reserved for
rdev->rptr_save_reg. Unfortunately the reservation is done in function
r100_cp_init, which is called by all drivers except r600 - and this
function is also invoked on resume from suspend. After several resumes,
no scratch registers are free and graphics acceleration is disabled.

Dmesg then reports either:
   *ERROR* radeon: cp failed to get scratch reg (-22).
   *ERROR* radeon: cp isn't working(-22).
   radeon 0000:01:00.0: failed initializing CP (-22).
or:
   *ERROR* radeon: failed to get scratch reg (-22).
   *ERROR* radeon: failed testing IB on GFX ring (-22).
   *ERROR* ib ring test failed (-22).

The chain of calls on boot for all except r600 is:
radeon_init -> ... -> (rXXX_init) -> rXXX_startup -> r100_cp_init

The chain of calls on resume for all except r600 is:
rXXX_resume -> rXXX_startup -> r100_cp_init.

R600 correctly allocates rptr_save_reg in r600_init (ie once only, not
in resume). However moving the code into the init functions for all
drivers means touching 4 drivers. So instead, this patch just adds a
test in r100_cp_init to avoid reallocating on resume. As the rdev
structure is allocated via kzalloc in radeon_driver_load_kms, and zero
is not a valid registerid, zero safely implies not-yet-allocated.

This issue appears to have been introduced in c7eff978 (3.6.0-rcN)

Signed-off-by: Simon Kitching <skitching@vonos.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-20 12:59:16 -04:00
..
reg_srcs drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700 2012-08-29 12:11:00 -04:00
.gitignore
Kconfig
Makefile
ObjectID.h
atom-bits.h
atom-names.h
atom-types.h
atom.c
atom.h
atombios.h
atombios_crtc.c Revert "drm/radeon: rework pll selection (v3)" 2012-09-17 17:26:24 -04:00
atombios_dp.c drm/radeon: rework panel mode setup 2012-08-29 12:11:01 -04:00
atombios_encoders.c drm/radeon: fix dig encoder selection on DCE61 2012-08-29 19:57:34 -04:00
atombios_i2c.c
avivod.h
cayman_blit_shaders.c
cayman_blit_shaders.h
evergreen.c drm/radeon: do not reenable crtc after moving vram start address 2012-08-13 10:50:52 -04:00
evergreen_blit_kms.c
evergreen_blit_shaders.c
evergreen_blit_shaders.h
evergreen_cs.c drm/radeon/kms: add MSAA texture support for r600-evergreen 2012-08-13 10:50:56 -04:00
evergreen_hdmi.c
evergreen_reg.h
evergreend.h drm/radeon/kms: allow "invalid" DB formats as a means to disable DB 2012-08-09 09:53:13 +10:00
mkregtable.c
ni.c drm/radeon: fix bank tiling parameters on cayman 2012-08-13 10:50:52 -04:00
ni_reg.h
nid.h
r100.c drm/radeon: Prevent leak of scratch register on resume from suspend 2012-09-20 12:59:16 -04:00
r100_track.h
r100d.h
r200.c
r300.c
r300_cmdbuf.c
r300_reg.h
r300d.h
r420.c
r420d.h
r500_reg.h
r520.c
r520d.h
r600.c drm/radeon/kms: implement timestamp userspace query (v2) 2012-08-13 10:50:56 -04:00
r600_audio.c
r600_blit.c
r600_blit_kms.c
r600_blit_shaders.c
r600_blit_shaders.h
r600_cp.c
r600_cs.c drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700 2012-08-29 12:11:00 -04:00
r600_hdmi.c
r600_reg.h
r600d.h drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700 2012-08-29 12:11:00 -04:00
radeon.h drm/radeon: split ATRM support out from the ATPX handler (v3) 2012-08-20 11:13:05 -04:00
radeon_acpi.c
radeon_agp.c
radeon_asic.c
radeon_asic.h drm/radeon/kms: implement timestamp userspace query (v2) 2012-08-13 10:50:56 -04:00
radeon_atombios.c drm/radeon/kms: extend the Fujitsu D3003-S2 board connector quirk to cover later silicon stepping 2012-08-20 11:09:50 -04:00
radeon_atpx_handler.c drm/radeon: split ATRM support out from the ATPX handler (v3) 2012-08-20 11:13:05 -04:00
radeon_benchmark.c
radeon_bios.c drm/radeon: split ATRM support out from the ATPX handler (v3) 2012-08-20 11:13:05 -04:00
radeon_blit_common.h
radeon_clocks.c
radeon_combios.c drm/radeon: fix handling for ddc type 5 on combios 2012-08-13 10:50:48 -04:00
radeon_connectors.c drm/radeon: on hotplug force link training to happen (v2) 2012-07-25 14:14:12 +10:00
radeon_cp.c
radeon_cs.c drm/radeon: fence virtual address and free it once idle v4 2012-08-13 10:50:55 -04:00
radeon_cursor.c drm/radeon/dce4+: set a more reasonable cursor watermark 2012-08-13 10:50:49 -04:00
radeon_device.c drm/radeon: fix double free in radeon_gpu_reset 2012-08-29 12:11:01 -04:00
radeon_display.c
radeon_drv.c drm/radeon: add proper checking of RESOLVE_BOX command for r600-r700 2012-08-29 12:11:00 -04:00
radeon_drv.h
radeon_encoders.c
radeon_family.h
radeon_fb.c
radeon_fence.c drm/radeon: make 64bit fences more robust v3 2012-09-13 16:17:49 -04:00
radeon_gart.c drm/radeon: fix typo in function header comment 2012-08-13 10:53:29 -04:00
radeon_gem.c drm/radeon: fence virtual address and free it once idle v4 2012-08-13 10:50:55 -04:00
radeon_i2c.c
radeon_ioc32.c
radeon_irq.c
radeon_irq_kms.c
radeon_kms.c drm/radeon/kms: implement timestamp userspace query (v2) 2012-08-13 10:50:56 -04:00
radeon_legacy_crtc.c drm/radeon: properly handle crtc powergating 2012-08-13 10:50:50 -04:00
radeon_legacy_encoders.c
radeon_legacy_tv.c
radeon_mem.c
radeon_mode.h drm/radeon: properly handle crtc powergating 2012-08-13 10:50:50 -04:00
radeon_object.c Revert "drm/radeon: fix bo creation retry path" 2012-08-21 09:55:01 -04:00
radeon_object.h
radeon_pm.c
radeon_prime.c
radeon_reg.h
radeon_ring.c drm/radeon: init lockup timeout on ring init 2012-08-20 11:09:48 -04:00
radeon_sa.c
radeon_semaphore.c
radeon_state.c
radeon_test.c
radeon_trace.h
radeon_trace_points.c
radeon_ttm.c
rs100d.h
rs400.c
rs400d.h
rs600.c
rs600d.h
rs690.c
rs690d.h
rv200d.h
rv250d.h
rv350d.h
rv515.c drm/radeon: do not reenable crtc after moving vram start address 2012-08-13 10:50:52 -04:00
rv515d.h
rv770.c
rv770d.h
si.c drm/radeon/kms: implement timestamp userspace query (v2) 2012-08-13 10:50:56 -04:00
si_blit_shaders.c
si_blit_shaders.h
si_reg.h
sid.h drm/radeon/kms: implement timestamp userspace query (v2) 2012-08-13 10:50:56 -04:00