>From e8c49ae42133c01ef87e01aa9a1ff11fed3b413b Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Thu, 15 Oct 2009 23:38:32 -0400
Subject: [PATCH] drm/radeon/kms: fix support for original r100

Original radeon didn't have a connector table in the
bios.  Check for the CRT table and if we have one,
add a VGA connector.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_combios.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
b/drivers/gpu/drm/radeon/radeon_combios.c
index 3c402b9..8298c99 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -1773,8 +1773,25 @@ bool
radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
                                                    DRM_MODE_CONNECTOR_DVII,
                                                    &ddc_i2c);
                } else {
-                       DRM_DEBUG("No connector info found\n");
-                       return false;
+                       uint16_t crt_info =
+                               combios_get_table_offset(dev, 
COMBIOS_CRT_INFO_TABLE);
+                       DRM_DEBUG("Found CRT table, assuming VGA connector\n");
+                       if (crt_info) {
+                               radeon_add_legacy_encoder(dev,
+                                                         
radeon_get_encoder_id(dev,
+                                                                               
ATOM_DEVICE_CRT1_SUPPORT,
+                                                                               
1),
+                                                         
ATOM_DEVICE_CRT1_SUPPORT);
+                               ddc_i2c = 
combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
+                               radeon_add_legacy_connector(dev,
+                                                           0,
+                                                           
ATOM_DEVICE_CRT1_SUPPORT,
+                                                           
DRM_MODE_CONNECTOR_VGA,
+                                                           &ddc_i2c);
+                       } else {
+                               DRM_DEBUG("No connector info found\n");
+                               return false;
+                       }
                }
        }

-- 
1.5.6.3
From e8c49ae42133c01ef87e01aa9a1ff11fed3b413b Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Thu, 15 Oct 2009 23:38:32 -0400
Subject: [PATCH] drm/radeon/kms: fix support for original r100

Original radeon didn't have a connector table in the
bios.  Check for the CRT table and if we have one,
add a VGA connector.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/radeon/radeon_combios.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 3c402b9..8298c99 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -1773,8 +1773,25 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
 						    DRM_MODE_CONNECTOR_DVII,
 						    &ddc_i2c);
 		} else {
-			DRM_DEBUG("No connector info found\n");
-			return false;
+			uint16_t crt_info =
+				combios_get_table_offset(dev, COMBIOS_CRT_INFO_TABLE);
+			DRM_DEBUG("Found CRT table, assuming VGA connector\n");
+			if (crt_info) {
+				radeon_add_legacy_encoder(dev,
+							  radeon_get_encoder_id(dev,
+										ATOM_DEVICE_CRT1_SUPPORT,
+										1),
+							  ATOM_DEVICE_CRT1_SUPPORT);
+				ddc_i2c = combios_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
+				radeon_add_legacy_connector(dev,
+							    0,
+							    ATOM_DEVICE_CRT1_SUPPORT,
+							    DRM_MODE_CONNECTOR_VGA,
+							    &ddc_i2c);
+			} else {
+				DRM_DEBUG("No connector info found\n");
+				return false;
+			}
 		}
 	}
 
-- 
1.5.6.3

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to