aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-09-10 16:31:13 -0400
committerDave Airlie <airlied@redhat.com>2009-09-10 21:44:15 -0400
commit705af9c7a8bcb9c8752a73be9ca356acb5c7688c (patch)
treee1e9ff430981f875d9f3fce81e39ec456fc13430 /drivers/gpu
parenta381287759b2b65e7de9fb35801c781cab016f10 (diff)
drm/radeon/kms: pull in latest quirks and fixes from ddx
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_atombios.c47
-rw-r--r--drivers/gpu/drm/radeon/radeon_encoders.c2
2 files changed, 33 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index a8fb392c9cd6..4dff85b450ea 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -104,7 +104,7 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
104 uint32_t supported_device, 104 uint32_t supported_device,
105 int *connector_type, 105 int *connector_type,
106 struct radeon_i2c_bus_rec *i2c_bus, 106 struct radeon_i2c_bus_rec *i2c_bus,
107 uint8_t *line_mux) 107 uint16_t *line_mux)
108{ 108{
109 109
110 /* Asus M2A-VM HDMI board lists the DVI port as HDMI */ 110 /* Asus M2A-VM HDMI board lists the DVI port as HDMI */
@@ -143,23 +143,34 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
143 return false; 143 return false;
144 } 144 }
145 145
146 /* some BIOSes seem to report DAC on HDMI - they hurt me with their lies */
147 if ((*connector_type == DRM_MODE_CONNECTOR_HDMIA) ||
148 (*connector_type == DRM_MODE_CONNECTOR_HDMIB)) {
149 if (supported_device & (ATOM_DEVICE_CRT_SUPPORT)) {
150 return false;
151 }
152 }
153
154 /* ASUS HD 3600 XT board lists the DVI port as HDMI */ 146 /* ASUS HD 3600 XT board lists the DVI port as HDMI */
155 if ((dev->pdev->device == 0x9598) && 147 if ((dev->pdev->device == 0x9598) &&
156 (dev->pdev->subsystem_vendor == 0x1043) && 148 (dev->pdev->subsystem_vendor == 0x1043) &&
157 (dev->pdev->subsystem_device == 0x01da)) { 149 (dev->pdev->subsystem_device == 0x01da)) {
158 if (*connector_type == DRM_MODE_CONNECTOR_HDMIB) { 150 if (*connector_type == DRM_MODE_CONNECTOR_HDMIA) {
151 *connector_type = DRM_MODE_CONNECTOR_DVID;
152 }
153 }
154
155 /* ASUS HD 3450 board lists the DVI port as HDMI */
156 if ((dev->pdev->device == 0x95C5) &&
157 (dev->pdev->subsystem_vendor == 0x1043) &&
158 (dev->pdev->subsystem_device == 0x01e2)) {
159 if (*connector_type == DRM_MODE_CONNECTOR_HDMIA) {
159 *connector_type = DRM_MODE_CONNECTOR_DVID; 160 *connector_type = DRM_MODE_CONNECTOR_DVID;
160 } 161 }
161 } 162 }
162 163
164 /* some BIOSes seem to report DAC on HDMI - usually this is a board with
165 * HDMI + VGA reporting as HDMI
166 */
167 if (*connector_type == DRM_MODE_CONNECTOR_HDMIA) {
168 if (supported_device & (ATOM_DEVICE_CRT_SUPPORT)) {
169 *connector_type = DRM_MODE_CONNECTOR_VGA;
170 *line_mux = 0;
171 }
172 }
173
163 return true; 174 return true;
164} 175}
165 176
@@ -192,11 +203,11 @@ const int object_connector_convert[] = {
192 DRM_MODE_CONNECTOR_Composite, 203 DRM_MODE_CONNECTOR_Composite,
193 DRM_MODE_CONNECTOR_SVIDEO, 204 DRM_MODE_CONNECTOR_SVIDEO,
194 DRM_MODE_CONNECTOR_Unknown, 205 DRM_MODE_CONNECTOR_Unknown,
206 DRM_MODE_CONNECTOR_Unknown,
195 DRM_MODE_CONNECTOR_9PinDIN, 207 DRM_MODE_CONNECTOR_9PinDIN,
196 DRM_MODE_CONNECTOR_Unknown, 208 DRM_MODE_CONNECTOR_Unknown,
197 DRM_MODE_CONNECTOR_HDMIA, 209 DRM_MODE_CONNECTOR_HDMIA,
198 DRM_MODE_CONNECTOR_HDMIB, 210 DRM_MODE_CONNECTOR_HDMIB,
199 DRM_MODE_CONNECTOR_HDMIB,
200 DRM_MODE_CONNECTOR_LVDS, 211 DRM_MODE_CONNECTOR_LVDS,
201 DRM_MODE_CONNECTOR_9PinDIN, 212 DRM_MODE_CONNECTOR_9PinDIN,
202 DRM_MODE_CONNECTOR_Unknown, 213 DRM_MODE_CONNECTOR_Unknown,
@@ -218,7 +229,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
218 ATOM_OBJECT_HEADER *obj_header; 229 ATOM_OBJECT_HEADER *obj_header;
219 int i, j, path_size, device_support; 230 int i, j, path_size, device_support;
220 int connector_type; 231 int connector_type;
221 uint16_t igp_lane_info; 232 uint16_t igp_lane_info, conn_id;
222 bool linkb; 233 bool linkb;
223 struct radeon_i2c_bus_rec ddc_bus; 234 struct radeon_i2c_bus_rec ddc_bus;
224 235
@@ -405,9 +416,15 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
405 else 416 else
406 ddc_bus = radeon_lookup_gpio(dev, line_mux); 417 ddc_bus = radeon_lookup_gpio(dev, line_mux);
407 418
419 conn_id = le16_to_cpu(path->usConnObjectId);
420
421 if (!radeon_atom_apply_quirks
422 (dev, le16_to_cpu(path->usDeviceTag), &connector_type,
423 &ddc_bus, &conn_id))
424 continue;
425
408 radeon_add_atom_connector(dev, 426 radeon_add_atom_connector(dev,
409 le16_to_cpu(path-> 427 conn_id,
410 usConnObjectId),
411 le16_to_cpu(path-> 428 le16_to_cpu(path->
412 usDeviceTag), 429 usDeviceTag),
413 connector_type, &ddc_bus, 430 connector_type, &ddc_bus,
@@ -423,7 +440,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
423 440
424struct bios_connector { 441struct bios_connector {
425 bool valid; 442 bool valid;
426 uint8_t line_mux; 443 uint16_t line_mux;
427 uint16_t devices; 444 uint16_t devices;
428 int connector_type; 445 int connector_type;
429 struct radeon_i2c_bus_rec ddc_bus; 446 struct radeon_i2c_bus_rec ddc_bus;
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 9ad20350118f..e274bb13866e 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -537,6 +537,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
537 537
538 switch (connector->connector_type) { 538 switch (connector->connector_type) {
539 case DRM_MODE_CONNECTOR_DVII: 539 case DRM_MODE_CONNECTOR_DVII:
540 case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
540 if (drm_detect_hdmi_monitor((struct edid *)connector->edid_blob_ptr)) 541 if (drm_detect_hdmi_monitor((struct edid *)connector->edid_blob_ptr))
541 return ATOM_ENCODER_MODE_HDMI; 542 return ATOM_ENCODER_MODE_HDMI;
542 else if (radeon_connector->use_digital) 543 else if (radeon_connector->use_digital)
@@ -546,7 +547,6 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
546 break; 547 break;
547 case DRM_MODE_CONNECTOR_DVID: 548 case DRM_MODE_CONNECTOR_DVID:
548 case DRM_MODE_CONNECTOR_HDMIA: 549 case DRM_MODE_CONNECTOR_HDMIA:
549 case DRM_MODE_CONNECTOR_HDMIB:
550 default: 550 default:
551 if (drm_detect_hdmi_monitor((struct edid *)connector->edid_blob_ptr)) 551 if (drm_detect_hdmi_monitor((struct edid *)connector->edid_blob_ptr))
552 return ATOM_ENCODER_MODE_HDMI; 552 return ATOM_ENCODER_MODE_HDMI;