Rev 1268 | Rev 1321 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1268 | Rev 1313 | ||
---|---|---|---|
Line 564... | Line 564... | ||
564 | radeon_i2c_do_lock(radeon_connector, 1); |
564 | radeon_i2c_do_lock(radeon_connector, 1); |
565 | radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); |
565 | radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); |
566 | radeon_i2c_do_lock(radeon_connector, 0); |
566 | radeon_i2c_do_lock(radeon_connector, 0); |
Line 567... | Line 567... | ||
567 | 567 | ||
568 | if (!radeon_connector->edid) { |
568 | if (!radeon_connector->edid) { |
569 | DRM_ERROR("DDC responded but not EDID found for %s\n", |
569 | DRM_ERROR("%s: probed a monitor but no|invalid EDID\n", |
- | 570 | drm_get_connector_name(connector)); |
|
570 | drm_get_connector_name(connector)); |
571 | ret = connector_status_connected; |
571 | } else { |
572 | } else { |
Line 572... | Line 573... | ||
572 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); |
573 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); |
573 | 574 | ||
Line 718... | Line 719... | ||
718 | radeon_i2c_do_lock(radeon_connector, 1); |
719 | radeon_i2c_do_lock(radeon_connector, 1); |
719 | radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); |
720 | radeon_connector->edid = drm_get_edid(&radeon_connector->base, &radeon_connector->ddc_bus->adapter); |
720 | radeon_i2c_do_lock(radeon_connector, 0); |
721 | radeon_i2c_do_lock(radeon_connector, 0); |
Line 721... | Line 722... | ||
721 | 722 | ||
722 | if (!radeon_connector->edid) { |
723 | if (!radeon_connector->edid) { |
723 | DRM_ERROR("DDC responded but not EDID found for %s\n", |
724 | DRM_ERROR("%s: probed a monitor but no|invalid EDID\n", |
724 | drm_get_connector_name(connector)); |
725 | drm_get_connector_name(connector)); |
725 | } else { |
726 | } else { |
Line 726... | Line 727... | ||
726 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); |
727 | radeon_connector->use_digital = !!(radeon_connector->edid->input & DRM_EDID_INPUT_DIGITAL); |
Line 1068... | Line 1069... | ||
1068 | struct drm_connector *connector; |
1069 | struct drm_connector *connector; |
1069 | struct radeon_connector *radeon_connector; |
1070 | struct radeon_connector *radeon_connector; |
1070 | uint32_t subpixel_order = SubPixelNone; |
1071 | uint32_t subpixel_order = SubPixelNone; |
1071 | int ret; |
1072 | int ret; |
Line 1072... | Line -... | ||
1072 | - | ||
1073 | ENTER(); |
- | |
1074 | - | ||
1075 | dbgprintf("id %d device %x type %x i2c %x\n", |
- | |
1076 | connector_id, supported_device, connector_type, i2c_bus); |
1073 | |
1077 | /* fixme - tv/cv/din */ |
1074 | /* fixme - tv/cv/din */ |
1078 | if (connector_type == DRM_MODE_CONNECTOR_Unknown) |
1075 | if (connector_type == DRM_MODE_CONNECTOR_Unknown) |
Line 1079... | Line 1076... | ||
1079 | return; |
1076 | return; |
1080 | 1077 | ||
1081 | /* see if we already added it */ |
1078 | /* see if we already added it */ |
1082 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
1079 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
1083 | radeon_connector = to_radeon_connector(connector); |
1080 | radeon_connector = to_radeon_connector(connector); |
1084 | if (radeon_connector->connector_id == connector_id) { |
- | |
1085 | radeon_connector->devices |= supported_device; |
1081 | if (radeon_connector->connector_id == connector_id) { |
1086 | LEAVE(); |
1082 | radeon_connector->devices |= supported_device; |
1087 | return; |
1083 | return; |
Line 1088... | Line 1084... | ||
1088 | } |
1084 | } |
Line 1152... | Line 1148... | ||
1152 | drm_connector_init(dev, &radeon_connector->base, &radeon_tv_connector_funcs, connector_type); |
1148 | drm_connector_init(dev, &radeon_connector->base, &radeon_tv_connector_funcs, connector_type); |
1153 | ret = drm_connector_helper_add(&radeon_connector->base, &radeon_tv_connector_helper_funcs); |
1149 | ret = drm_connector_helper_add(&radeon_connector->base, &radeon_tv_connector_helper_funcs); |
1154 | if (ret) |
1150 | if (ret) |
1155 | goto failed; |
1151 | goto failed; |
1156 | radeon_connector->dac_load_detect = true; |
1152 | radeon_connector->dac_load_detect = true; |
- | 1153 | /* RS400,RC410,RS480 chipset seems to report a lot |
|
- | 1154 | * of false positive on load detect, we haven't yet |
|
- | 1155 | * found a way to make load detect reliable on those |
|
- | 1156 | * chipset, thus just disable it for TV. |
|
- | 1157 | */ |
|
- | 1158 | if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) |
|
- | 1159 | radeon_connector->dac_load_detect = false; |
|
1157 | drm_connector_attach_property(&radeon_connector->base, |
1160 | drm_connector_attach_property(&radeon_connector->base, |
1158 | rdev->mode_info.load_detect_property, |
1161 | rdev->mode_info.load_detect_property, |
1159 | 1); |
1162 | 1); |
1160 | } |
1163 | } |
1161 | break; |
1164 | break; |
Line 1176... | Line 1179... | ||
1176 | break; |
1179 | break; |
1177 | } |
1180 | } |
Line 1178... | Line 1181... | ||
1178 | 1181 | ||
1179 | connector->display_info.subpixel_order = subpixel_order; |
1182 | connector->display_info.subpixel_order = subpixel_order; |
1180 | drm_sysfs_connector_add(connector); |
- | |
1181 | LEAVE(); |
1183 | drm_sysfs_connector_add(connector); |
Line 1182... | Line 1184... | ||
1182 | return; |
1184 | return; |
1183 | 1185 | ||
1184 | failed: |
1186 | failed: |
1185 | if (radeon_connector->ddc_bus) |
1187 | if (radeon_connector->ddc_bus) |
1186 | radeon_i2c_destroy(radeon_connector->ddc_bus); |
1188 | radeon_i2c_destroy(radeon_connector->ddc_bus); |
1187 | drm_connector_cleanup(connector); |
- | |
1188 | kfree(connector); |
1189 | drm_connector_cleanup(connector); |