drm/radeon: apply Murphy's law to the kms irq code v3
1. It is really dangerous to have more than one spinlock protecting the same information. 2. radeon_irq_set sometimes wasn't called with lock protection, so it can happen that more than one CPU would tamper with the irq regs at the same time. 3. The pm.gui_idle variable was assuming that the 3D engine wasn't becoming idle between testing the register and setting the variable. So just remove it and test the register directly. v2: Also handle the hpd irq code the same way. v3: Rename hpd parameter for clarification. Signed-off-by: Christian Koenig <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Christian König

parent
c20dc3698d
commit
fb98257a9d
@@ -519,8 +519,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder)
|
||||
|
||||
if (rdev->irq.installed) {
|
||||
/* if irq is available use it */
|
||||
rdev->irq.afmt[dig->afmt->id] = true;
|
||||
radeon_irq_set(rdev);
|
||||
radeon_irq_kms_enable_afmt(rdev, dig->afmt->id);
|
||||
}
|
||||
|
||||
dig->afmt->enabled = true;
|
||||
@@ -556,8 +555,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder)
|
||||
offset, radeon_encoder->encoder_id);
|
||||
|
||||
/* disable irq */
|
||||
rdev->irq.afmt[dig->afmt->id] = false;
|
||||
radeon_irq_set(rdev);
|
||||
radeon_irq_kms_disable_afmt(rdev, dig->afmt->id);
|
||||
|
||||
/* Older chipsets not handled by AtomBIOS */
|
||||
if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) {
|
||||
|
Reference in New Issue
Block a user