[PATCH] drm/radeon/kms: fix tv dac conflict resolver

Alex Deucher alexdeucher at gmail.com
Thu Apr 15 10:31:12 PDT 2010


On systems with the tv dac shared between DVI and TV,
we can only use the dac for one of the connectors.
However, when using a digital monitor on the DVI port,
you can use the dac for the TV connector just fine.
Check the use_digital status when resolving the conflict.

Fixes fdo bug 27649, possibly others.

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

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 5c5776d..c489346 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -162,12 +162,14 @@
radeon_connector_analog_encoder_conflict_solve(struct drm_connector
*connector,
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_connector *conflict;
+	struct radeon_connector *radeon_conflict;
 	int i;

 	list_for_each_entry(conflict, &dev->mode_config.connector_list, head) {
 		if (conflict == connector)
 			continue;

+		radeon_conflict = to_radeon_connector(conflict);
 		for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
 			if (conflict->encoder_ids[i] == 0)
 				break;
@@ -177,6 +179,9 @@
radeon_connector_analog_encoder_conflict_solve(struct drm_connector
*connector,
 				if (conflict->status != connector_status_connected)
 					continue;

+				if (radeon_conflict->use_digital)
+					continue;
+
 				if (priority == true) {
 					DRM_INFO("1: conflicting encoders switching off %s\n",
drm_get_connector_name(conflict));
 					DRM_INFO("in favor of %s\n", drm_get_connector_name(connector));
-- 
1.5.6.3

--001517475482766cee048449ff51
Content-Type: text/x-diff; charset=US-ASCII; 
	name="0001-drm-radeon-kms-fix-tv-dac-conflict-resolver.patch"
Content-Disposition: attachment; 
	filename="0001-drm-radeon-kms-fix-tv-dac-conflict-resolver.patch"
Content-Transfer-Encoding: base64
X-Attachment-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