diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-02-07 13:15:28 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-13 18:22:55 -0500 |
commit | 9fad321ac6bedd96f449754a1a25289ea1789a49 (patch) | |
tree | eed154c20916085eba6dd00c161b92478a0bbe24 | |
parent | e917fd39eb35e5b2c464e67a80e759f3eb468e48 (diff) |
drm/radeon/kms: add connector table for mac g5 9600
PPC Mac cards do not provide connector tables in
their vbios. Their connector/encoder configurations
must be hardcoded in the driver.
verified by nyef on #radeon
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_combios.c | 47 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mode.h | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index d27ef74590cd..cf7c8d5b4ec2 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
@@ -1504,6 +1504,11 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) | |||
1504 | (rdev->pdev->subsystem_device == 0x4a48)) { | 1504 | (rdev->pdev->subsystem_device == 0x4a48)) { |
1505 | /* Mac X800 */ | 1505 | /* Mac X800 */ |
1506 | rdev->mode_info.connector_table = CT_MAC_X800; | 1506 | rdev->mode_info.connector_table = CT_MAC_X800; |
1507 | } else if ((rdev->pdev->device == 0x4150) && | ||
1508 | (rdev->pdev->subsystem_vendor == 0x1002) && | ||
1509 | (rdev->pdev->subsystem_device == 0x4150)) { | ||
1510 | /* Mac G5 9600 */ | ||
1511 | rdev->mode_info.connector_table = CT_MAC_G5_9600; | ||
1507 | } else | 1512 | } else |
1508 | #endif /* CONFIG_PPC_PMAC */ | 1513 | #endif /* CONFIG_PPC_PMAC */ |
1509 | #ifdef CONFIG_PPC64 | 1514 | #ifdef CONFIG_PPC64 |
@@ -2022,6 +2027,48 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev) | |||
2022 | CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I, | 2027 | CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I, |
2023 | &hpd); | 2028 | &hpd); |
2024 | break; | 2029 | break; |
2030 | case CT_MAC_G5_9600: | ||
2031 | DRM_INFO("Connector Table: %d (mac g5 9600)\n", | ||
2032 | rdev->mode_info.connector_table); | ||
2033 | /* DVI - tv dac, dvo */ | ||
2034 | ddc_i2c = combios_setup_i2c_bus(rdev, DDC_DVI, 0, 0); | ||
2035 | hpd.hpd = RADEON_HPD_1; /* ??? */ | ||
2036 | radeon_add_legacy_encoder(dev, | ||
2037 | radeon_get_encoder_enum(dev, | ||
2038 | ATOM_DEVICE_DFP2_SUPPORT, | ||
2039 | 0), | ||
2040 | ATOM_DEVICE_DFP2_SUPPORT); | ||
2041 | radeon_add_legacy_encoder(dev, | ||
2042 | radeon_get_encoder_enum(dev, | ||
2043 | ATOM_DEVICE_CRT2_SUPPORT, | ||
2044 | 2), | ||
2045 | ATOM_DEVICE_CRT2_SUPPORT); | ||
2046 | radeon_add_legacy_connector(dev, 0, | ||
2047 | ATOM_DEVICE_DFP2_SUPPORT | | ||
2048 | ATOM_DEVICE_CRT2_SUPPORT, | ||
2049 | DRM_MODE_CONNECTOR_DVII, &ddc_i2c, | ||
2050 | CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, | ||
2051 | &hpd); | ||
2052 | /* ADC - primary dac, internal tmds */ | ||
2053 | ddc_i2c = combios_setup_i2c_bus(rdev, DDC_VGA, 0, 0); | ||
2054 | hpd.hpd = RADEON_HPD_2; /* ??? */ | ||
2055 | radeon_add_legacy_encoder(dev, | ||
2056 | radeon_get_encoder_enum(dev, | ||
2057 | ATOM_DEVICE_DFP1_SUPPORT, | ||
2058 | 0), | ||
2059 | ATOM_DEVICE_DFP1_SUPPORT); | ||
2060 | radeon_add_legacy_encoder(dev, | ||
2061 | radeon_get_encoder_enum(dev, | ||
2062 | ATOM_DEVICE_CRT1_SUPPORT, | ||
2063 | 1), | ||
2064 | ATOM_DEVICE_CRT1_SUPPORT); | ||
2065 | radeon_add_legacy_connector(dev, 1, | ||
2066 | ATOM_DEVICE_DFP1_SUPPORT | | ||
2067 | ATOM_DEVICE_CRT1_SUPPORT, | ||
2068 | DRM_MODE_CONNECTOR_DVII, &ddc_i2c, | ||
2069 | CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, | ||
2070 | &hpd); | ||
2071 | break; | ||
2025 | default: | 2072 | default: |
2026 | DRM_INFO("Connector table: %d (invalid)\n", | 2073 | DRM_INFO("Connector table: %d (invalid)\n", |
2027 | rdev->mode_info.connector_table); | 2074 | rdev->mode_info.connector_table); |
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 6794cdf91f28..a670caaee29e 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -209,6 +209,7 @@ enum radeon_connector_table { | |||
209 | CT_EMAC, | 209 | CT_EMAC, |
210 | CT_RN50_POWER, | 210 | CT_RN50_POWER, |
211 | CT_MAC_X800, | 211 | CT_MAC_X800, |
212 | CT_MAC_G5_9600, | ||
212 | }; | 213 | }; |
213 | 214 | ||
214 | enum radeon_dvo_chip { | 215 | enum radeon_dvo_chip { |