[PATCH] drm/radeon/kms: disable the tv encoder when tv/cv is not in use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Switching between TV and VGA caused VGA to break on some systems
since the TV encoder was left enabled when VGA was used.

fixes fdo bug 25520.

Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
Cc: stable <stable at kernel.org>
---
 drivers/gpu/drm/radeon/radeon_encoders.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c
b/drivers/gpu/drm/radeon/radeon_encoders.c
index c52fc30..d61a141 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -1373,8 +1373,12 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
 	case ENCODER_OBJECT_ID_INTERNAL_DAC2:
 	case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
 		atombios_dac_setup(encoder, ATOM_ENABLE);
-		if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT |
ATOM_DEVICE_CV_SUPPORT))
-			atombios_tv_setup(encoder, ATOM_ENABLE);
+		if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT |
ATOM_DEVICE_CV_SUPPORT)) {
+			if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT |
ATOM_DEVICE_CV_SUPPORT))
+				atombios_tv_setup(encoder, ATOM_ENABLE);
+			else
+				atombios_tv_setup(encoder, ATOM_DISABLE);
+		}
 		break;
 	}
 	atombios_apply_encoder_quirks(encoder, adjusted_mode);
-- 
1.5.6.3

--000e0ce0f3c873437504841fe3f5
Content-Type: text/x-diff; charset=US-ASCII; 
	name="0001-drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is.patch"
Content-Disposition: attachment; 
	filename="0001-drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g7yv7tqe0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lbmNvZGVycy5jCkBA
IC0xMzczLDggKzEzNzMsMTIgQEAgcmFkZW9uX2F0b21fZW5jb2Rlcl9tb2RlX3NldChzdHJ1Y3Qg
ZHJtX2VuY29kZXIgKmVuY29kZXIsCiAJY2FzZSBFTkNPREVSX09CSkVDVF9JRF9JTlRFUk5BTF9E
QUMyOgogCWNhc2UgRU5DT0RFUl9PQkpFQ1RfSURfSU5URVJOQUxfS0xEU0NQX0RBQzI6CiAJCWF0
b21iaW9zX2RhY19zZXR1cChlbmNvZGVyLCBBVE9NX0VOQUJMRSk7Ci0JCWlmIChyYWRlb25fZW5j
b2Rlci0+YWN0aXZlX2RldmljZSAmIChBVE9NX0RFVklDRV9UVl9TVVBQT1JUIHwgQVRPTV9ERVZJ
Q0VfQ1ZfU1VQUE9SVCkpCi0JCQlhdG9tYmlvc190dl9zZXR1cChlbmNvZGVyLCBBVE9NX0VOQUJM
RSk7CisJCWlmIChyYWRlb25fZW5jb2Rlci0+ZGV2aWNlcyAmIChBVE9NX0RFVklDRV9UVl9TVVBQ
T1JUIHwgQVRPTV9ERVZJQ0VfQ1ZfU1VQUE9SVCkpIHsKKwkJCWlmIChyYWRlb25fZW5jb2Rlci0+
YWN0aXZlX2RldmljZSAmIChBVE9NX0RFVklDRV9UVl9TVVBQT1JUIHwgQVRPTV9ERVZJQ0VfQ1Zf
U1VQUE9SVCkpCisJCQkJYXRvbWJpb3NfdHZfc2V0dXAoZW5jb2RlciwgQVRPTV9FTkFCTEUpOwor
CQkJZWxzZQorCQkJCWF0b21iaW9zX3R2X3NldHVwKGVuY29kZXIsIEFUT01fRElTQUJMRSk7CisJ
CX0KIAkJYnJlYWs7CiAJfQogCWF0b21iaW9zX2FwcGx5X2VuY29kZXJfcXVpcmtzKGVuY29kZXIs
IGFkanVzdGVkX21vZGUpOwotLSAKMS41LjYuMwoK
--000e0ce0f3c873437504841fe3f5--


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux