23,11 → 23,11 |
* Authors: Dave Airlie |
* Alex Deucher |
*/ |
#include "drmP.h" |
#include "drm_edid.h" |
#include "drm_crtc_helper.h" |
#include "drm_fb_helper.h" |
#include "radeon_drm.h" |
#include <drm/drmP.h> |
#include <drm/drm_edid.h> |
#include <drm/drm_crtc_helper.h> |
#include <drm/drm_fb_helper.h> |
#include <drm/radeon_drm.h> |
#include "radeon.h" |
#include "atom.h" |
|
40,12 → 40,6 |
struct drm_encoder *encoder, |
bool connected); |
|
extern void |
radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, |
struct drm_connector *drm_connector); |
|
bool radeon_connector_encoder_is_dp_bridge(struct drm_connector *connector); |
|
void radeon_connector_hotplug(struct drm_connector *connector) |
{ |
struct drm_device *dev = connector->dev; |
60,20 → 54,41 |
|
radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd); |
|
/* powering up/down the eDP panel generates hpd events which |
* can interfere with modesetting. |
*/ |
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) |
/* if the connector is already off, don't turn it back on */ |
if (connector->dpms != DRM_MODE_DPMS_ON) |
return; |
|
/* pre-r600 did not always have the hpd pins mapped accurately to connectors */ |
if (rdev->family >= CHIP_R600) { |
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) |
/* just deal with DP (not eDP) here. */ |
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { |
struct radeon_connector_atom_dig *dig_connector = |
radeon_connector->con_priv; |
|
/* if existing sink type was not DP no need to retrain */ |
if (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT) |
return; |
|
/* first get sink type as it may be reset after (un)plug */ |
dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); |
/* don't do anything if sink is not display port, i.e., |
* passive dp->(dvi|hdmi) adaptor |
*/ |
if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { |
int saved_dpms = connector->dpms; |
/* Only turn off the display if it's physically disconnected */ |
if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
} else if (radeon_dp_needs_link_train(radeon_connector)) { |
/* set it to OFF so that drm_helper_connector_dpms() |
* won't return immediately since the current state |
* is ON at this point. |
*/ |
connector->dpms = DRM_MODE_DPMS_OFF; |
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); |
else |
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
} |
connector->dpms = saved_dpms; |
} |
} |
} |
|
static void radeon_property_change_mode(struct drm_encoder *encoder) |
{ |
84,6 → 99,62 |
crtc->x, crtc->y, crtc->fb); |
} |
} |
|
int radeon_get_monitor_bpc(struct drm_connector *connector) |
{ |
struct drm_device *dev = connector->dev; |
struct radeon_device *rdev = dev->dev_private; |
struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
struct radeon_connector_atom_dig *dig_connector; |
int bpc = 8; |
|
switch (connector->connector_type) { |
case DRM_MODE_CONNECTOR_DVII: |
case DRM_MODE_CONNECTOR_HDMIB: |
if (radeon_connector->use_digital) { |
if (drm_detect_hdmi_monitor(radeon_connector->edid)) { |
if (connector->display_info.bpc) |
bpc = connector->display_info.bpc; |
} |
} |
break; |
case DRM_MODE_CONNECTOR_DVID: |
case DRM_MODE_CONNECTOR_HDMIA: |
if (drm_detect_hdmi_monitor(radeon_connector->edid)) { |
if (connector->display_info.bpc) |
bpc = connector->display_info.bpc; |
} |
break; |
case DRM_MODE_CONNECTOR_DisplayPort: |
dig_connector = radeon_connector->con_priv; |
if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || |
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP) || |
drm_detect_hdmi_monitor(radeon_connector->edid)) { |
if (connector->display_info.bpc) |
bpc = connector->display_info.bpc; |
} |
break; |
case DRM_MODE_CONNECTOR_eDP: |
case DRM_MODE_CONNECTOR_LVDS: |
if (connector->display_info.bpc) |
bpc = connector->display_info.bpc; |
else if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) { |
struct drm_connector_helper_funcs *connector_funcs = |
connector->helper_private; |
struct drm_encoder *encoder = connector_funcs->best_encoder(connector); |
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
|
if (dig->lcd_misc & ATOM_PANEL_MISC_V13_6BIT_PER_COLOR) |
bpc = 6; |
else if (dig->lcd_misc & ATOM_PANEL_MISC_V13_8BIT_PER_COLOR) |
bpc = 8; |
} |
break; |
} |
return bpc; |
} |
|
static void |
radeon_connector_update_scratch_regs(struct drm_connector *connector, enum drm_connector_status status) |
{ |
123,7 → 194,7 |
} |
} |
|
struct drm_encoder *radeon_find_encoder(struct drm_connector *connector, int encoder_type) |
static struct drm_encoder *radeon_find_encoder(struct drm_connector *connector, int encoder_type) |
{ |
struct drm_mode_object *obj; |
struct drm_encoder *encoder; |
144,7 → 215,7 |
return NULL; |
} |
|
struct drm_encoder *radeon_best_single_encoder(struct drm_connector *connector) |
static struct drm_encoder *radeon_best_single_encoder(struct drm_connector *connector) |
{ |
int enc_id = connector->encoder_ids[0]; |
struct drm_mode_object *obj; |
295,7 → 366,7 |
} |
} |
|
int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *property, |
static int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *property, |
uint64_t val) |
{ |
struct drm_device *dev = connector->dev; |
430,55 → 501,24 |
return 0; |
} |
|
/* |
* Some integrated ATI Radeon chipset implementations (e. g. |
* Asus M2A-VM HDMI) may indicate the availability of a DDC, |
* even when there's no monitor connected. For these connectors |
* following DDC probe extension will be applied: check also for the |
* availability of EDID with at least a correct EDID header. Only then, |
* DDC is assumed to be available. This prevents drm_get_edid() and |
* drm_edid_block_valid() from periodically dumping data and kernel |
* errors into the logs and onto the terminal. |
*/ |
static bool radeon_connector_needs_extended_probe(struct radeon_device *dev, |
uint32_t supported_device, |
int connector_type) |
{ |
/* Asus M2A-VM HDMI board sends data to i2c bus even, |
* if HDMI add-on card is not plugged in or HDMI is disabled in |
* BIOS. Valid DDC can only be assumed, if also a valid EDID header |
* can be retrieved via i2c bus during DDC probe */ |
if ((dev->pdev->device == 0x791e) && |
(dev->pdev->subsystem_vendor == 0x1043) && |
(dev->pdev->subsystem_device == 0x826d)) { |
if ((connector_type == DRM_MODE_CONNECTOR_HDMIA) && |
(supported_device == ATOM_DEVICE_DFP2_SUPPORT)) |
return true; |
} |
/* ECS A740GM-M with ATI RADEON 2100 sends data to i2c bus |
* for a DVI connector that is not implemented */ |
if ((dev->pdev->device == 0x796e) && |
(dev->pdev->subsystem_vendor == 0x1019) && |
(dev->pdev->subsystem_device == 0x2615)) { |
if ((connector_type == DRM_MODE_CONNECTOR_DVID) && |
(supported_device == ATOM_DEVICE_DFP2_SUPPORT)) |
return true; |
} |
|
/* Default: no EDID header probe required for DDC probing */ |
return false; |
} |
|
static void radeon_fixup_lvds_native_mode(struct drm_encoder *encoder, |
struct drm_connector *connector) |
{ |
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
struct drm_display_mode *t, *mode; |
|
/* If the EDID preferred mode doesn't match the native mode, use it */ |
list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { |
if (mode->type & DRM_MODE_TYPE_PREFERRED) { |
if (mode->hdisplay != native_mode->hdisplay || |
mode->vdisplay != native_mode->vdisplay) |
memcpy(native_mode, mode, sizeof(*mode)); |
} |
} |
|
/* Try to get native mode details from EDID if necessary */ |
if (!native_mode->clock) { |
struct drm_display_mode *t, *mode; |
|
list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { |
if (mode->hdisplay == native_mode->hdisplay && |
mode->vdisplay == native_mode->vdisplay) { |
489,6 → 529,7 |
} |
} |
} |
|
if (!native_mode->clock) { |
DRM_DEBUG_KMS("No LVDS native mode details, disabling RMX\n"); |
radeon_encoder->rmx_type = RMX_OFF; |
605,7 → 646,7 |
if (radeon_connector->edid) |
kfree(radeon_connector->edid); |
kfree(radeon_connector->con_priv); |
drm_sysfs_connector_remove(connector); |
// drm_sysfs_connector_remove(connector); |
drm_connector_cleanup(connector); |
kfree(connector); |
} |
646,13 → 687,13 |
} |
|
|
struct drm_connector_helper_funcs radeon_lvds_connector_helper_funcs = { |
static const struct drm_connector_helper_funcs radeon_lvds_connector_helper_funcs = { |
.get_modes = radeon_lvds_get_modes, |
.mode_valid = radeon_lvds_mode_valid, |
.best_encoder = radeon_best_single_encoder, |
}; |
|
struct drm_connector_funcs radeon_lvds_connector_funcs = { |
static const struct drm_connector_funcs radeon_lvds_connector_funcs = { |
.dpms = drm_helper_connector_dpms, |
.detect = radeon_lvds_detect, |
.fill_modes = drm_helper_probe_single_connector_modes, |
700,9 → 741,9 |
ret = connector_status_disconnected; |
|
if (radeon_connector->ddc_bus) |
dret = radeon_ddc_probe(radeon_connector, |
radeon_connector->requires_extended_probe); |
dret = radeon_ddc_probe(radeon_connector); |
if (dret) { |
radeon_connector->detected_by_load = false; |
if (radeon_connector->edid) { |
kfree(radeon_connector->edid); |
radeon_connector->edid = NULL; |
729,12 → 770,21 |
} else { |
|
/* if we aren't forcing don't do destructive polling */ |
if (!force) |
if (!force) { |
/* only return the previous status if we last |
* detected a monitor via load. |
*/ |
if (radeon_connector->detected_by_load) |
return connector->status; |
else |
return ret; |
} |
|
if (radeon_connector->dac_load_detect && encoder) { |
encoder_funcs = encoder->helper_private; |
ret = encoder_funcs->detect(encoder, connector); |
if (ret != connector_status_disconnected) |
radeon_connector->detected_by_load = true; |
} |
} |
|
755,13 → 805,13 |
return ret; |
} |
|
struct drm_connector_helper_funcs radeon_vga_connector_helper_funcs = { |
static const struct drm_connector_helper_funcs radeon_vga_connector_helper_funcs = { |
.get_modes = radeon_vga_get_modes, |
.mode_valid = radeon_vga_mode_valid, |
.best_encoder = radeon_best_single_encoder, |
}; |
|
struct drm_connector_funcs radeon_vga_connector_funcs = { |
static const struct drm_connector_funcs radeon_vga_connector_funcs = { |
.dpms = drm_helper_connector_dpms, |
.detect = radeon_vga_detect, |
.fill_modes = drm_helper_probe_single_connector_modes, |
825,13 → 875,13 |
return ret; |
} |
|
struct drm_connector_helper_funcs radeon_tv_connector_helper_funcs = { |
static const struct drm_connector_helper_funcs radeon_tv_connector_helper_funcs = { |
.get_modes = radeon_tv_get_modes, |
.mode_valid = radeon_tv_mode_valid, |
.best_encoder = radeon_best_single_encoder, |
}; |
|
struct drm_connector_funcs radeon_tv_connector_funcs = { |
static const struct drm_connector_funcs radeon_tv_connector_funcs = { |
.dpms = drm_helper_connector_dpms, |
.detect = radeon_tv_detect, |
.fill_modes = drm_helper_probe_single_connector_modes, |
848,6 → 898,27 |
return ret; |
} |
|
static bool radeon_check_hpd_status_unchanged(struct drm_connector *connector) |
{ |
struct drm_device *dev = connector->dev; |
struct radeon_device *rdev = dev->dev_private; |
struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
enum drm_connector_status status; |
|
/* We only trust HPD on R600 and newer ASICS. */ |
if (rdev->family >= CHIP_R600 |
&& radeon_connector->hpd.hpd != RADEON_HPD_NONE) { |
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) |
status = connector_status_connected; |
else |
status = connector_status_disconnected; |
if (connector->status == status) |
return true; |
} |
|
return false; |
} |
|
/* |
* DVI is complicated |
* Do a DDC probe, if DDC probe passes, get the full EDID so |
872,10 → 943,13 |
enum drm_connector_status ret = connector_status_disconnected; |
bool dret = false; |
|
if (!force && radeon_check_hpd_status_unchanged(connector)) |
return connector->status; |
|
if (radeon_connector->ddc_bus) |
dret = radeon_ddc_probe(radeon_connector, |
radeon_connector->requires_extended_probe); |
dret = radeon_ddc_probe(radeon_connector); |
if (dret) { |
radeon_connector->detected_by_load = false; |
if (radeon_connector->edid) { |
kfree(radeon_connector->edid); |
radeon_connector->edid = NULL; |
938,7 → 1012,17 |
if ((ret == connector_status_connected) && (radeon_connector->use_digital == true)) |
goto out; |
|
/* DVI-D and HDMI-A are digital only */ |
if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || |
(connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) |
goto out; |
|
/* if we aren't forcing don't do destructive polling */ |
if (!force) { |
/* only return the previous status if we last |
* detected a monitor via load. |
*/ |
if (radeon_connector->detected_by_load) |
ret = connector->status; |
goto out; |
} |
957,6 → 1041,10 |
|
encoder = obj_to_encoder(obj); |
|
if (encoder->encoder_type != DRM_MODE_ENCODER_DAC && |
encoder->encoder_type != DRM_MODE_ENCODER_TVDAC) |
continue; |
|
encoder_funcs = encoder->helper_private; |
if (encoder_funcs->detect) { |
if (ret != connector_status_connected) { |
964,6 → 1052,8 |
if (ret == connector_status_connected) { |
radeon_connector->use_digital = false; |
} |
if (ret != connector_status_disconnected) |
radeon_connector->detected_by_load = true; |
} |
break; |
} |
981,6 → 1071,7 |
* cases the DVI port is actually a virtual KVM port connected to the service |
* processor. |
*/ |
out: |
if ((!rdev->is_atom_bios) && |
(ret == connector_status_disconnected) && |
rdev->mode_info.bios_hardcoded_edid_size) { |
988,7 → 1079,6 |
ret = connector_status_connected; |
} |
|
out: |
/* updated in get modes as well since we need to know if it's analog or digital */ |
radeon_connector_update_scratch_regs(connector, ret); |
return ret; |
995,7 → 1085,7 |
} |
|
/* okay need to be smart in here about which encoder to pick */ |
struct drm_encoder *radeon_dvi_encoder(struct drm_connector *connector) |
static struct drm_encoder *radeon_dvi_encoder(struct drm_connector *connector) |
{ |
int enc_id = connector->encoder_ids[0]; |
struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1066,7 → 1156,7 |
(radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B)) |
return MODE_OK; |
else if (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_A) { |
if (ASIC_IS_DCE3(rdev)) { |
if (ASIC_IS_DCE6(rdev)) { |
/* HDMI 1.3+ supports max clock of 340 Mhz */ |
if (mode->clock > 340000) |
return MODE_CLOCK_HIGH; |
1085,13 → 1175,13 |
return MODE_OK; |
} |
|
struct drm_connector_helper_funcs radeon_dvi_connector_helper_funcs = { |
static const struct drm_connector_helper_funcs radeon_dvi_connector_helper_funcs = { |
.get_modes = radeon_dvi_get_modes, |
.mode_valid = radeon_dvi_mode_valid, |
.best_encoder = radeon_dvi_encoder, |
}; |
|
struct drm_connector_funcs radeon_dvi_connector_funcs = { |
static const struct drm_connector_funcs radeon_dvi_connector_funcs = { |
.dpms = drm_helper_connector_dpms, |
.detect = radeon_dvi_detect, |
.fill_modes = drm_helper_probe_single_connector_modes, |
1110,7 → 1200,7 |
if (radeon_dig_connector->dp_i2c_bus) |
radeon_i2c_destroy(radeon_dig_connector->dp_i2c_bus); |
kfree(radeon_connector->con_priv); |
drm_sysfs_connector_remove(connector); |
// drm_sysfs_connector_remove(connector); |
drm_connector_cleanup(connector); |
kfree(connector); |
} |
1126,6 → 1216,7 |
(connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { |
struct drm_display_mode *mode; |
|
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { |
if (!radeon_dig_connector->edp_on) |
atombios_set_edp_panel_power(connector, |
ATOM_TRANSMITTER_ACTION_POWER_ON); |
1133,6 → 1224,15 |
if (!radeon_dig_connector->edp_on) |
atombios_set_edp_panel_power(connector, |
ATOM_TRANSMITTER_ACTION_POWER_OFF); |
} else { |
/* need to setup ddc on the bridge */ |
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != |
ENCODER_OBJECT_ID_NONE) { |
if (encoder) |
radeon_atom_ext_encoder_setup_ddc(encoder); |
} |
ret = radeon_ddc_get_modes(radeon_connector); |
} |
|
if (ret > 0) { |
if (encoder) { |
1143,7 → 1243,6 |
return ret; |
} |
|
encoder = radeon_best_single_encoder(connector); |
if (!encoder) |
return 0; |
|
1160,7 → 1259,8 |
} |
} else { |
/* need to setup ddc on the bridge */ |
if (radeon_connector_encoder_is_dp_bridge(connector)) { |
if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != |
ENCODER_OBJECT_ID_NONE) { |
if (encoder) |
radeon_atom_ext_encoder_setup_ddc(encoder); |
} |
1170,13 → 1270,12 |
return ret; |
} |
|
bool radeon_connector_encoder_is_dp_bridge(struct drm_connector *connector) |
u16 radeon_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) |
{ |
struct drm_mode_object *obj; |
struct drm_encoder *encoder; |
struct radeon_encoder *radeon_encoder; |
int i; |
bool found = false; |
|
for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { |
if (connector->encoder_ids[i] == 0) |
1192,14 → 1291,13 |
switch (radeon_encoder->encoder_id) { |
case ENCODER_OBJECT_ID_TRAVIS: |
case ENCODER_OBJECT_ID_NUTMEG: |
found = true; |
break; |
return radeon_encoder->encoder_id; |
default: |
break; |
} |
} |
|
return found; |
return ENCODER_OBJECT_ID_NONE; |
} |
|
bool radeon_connector_encoder_is_hbr2(struct drm_connector *connector) |
1251,6 → 1349,9 |
struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; |
struct drm_encoder *encoder = radeon_best_single_encoder(connector); |
|
if (!force && radeon_check_hpd_status_unchanged(connector)) |
return connector->status; |
|
if (radeon_connector->edid) { |
kfree(radeon_connector->edid); |
radeon_connector->edid = NULL; |
1276,12 → 1377,24 |
if (!radeon_dig_connector->edp_on) |
atombios_set_edp_panel_power(connector, |
ATOM_TRANSMITTER_ACTION_POWER_OFF); |
} else { |
/* need to setup ddc on the bridge */ |
if (radeon_connector_encoder_is_dp_bridge(connector)) { |
if (encoder) |
} else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != |
ENCODER_OBJECT_ID_NONE) { |
/* DP bridges are always DP */ |
radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT; |
/* get the DPCD from the bridge */ |
radeon_dp_getdpcd(radeon_connector); |
|
if (encoder) { |
/* setup ddc on the bridge */ |
radeon_atom_ext_encoder_setup_ddc(encoder); |
if (radeon_ddc_probe(radeon_connector)) /* try DDC */ |
ret = connector_status_connected; |
else if (radeon_connector->dac_load_detect) { /* try load detection */ |
struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; |
ret = encoder_funcs->detect(encoder, connector); |
} |
} |
} else { |
radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); |
if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
ret = connector_status_connected; |
1292,22 → 1405,11 |
if (radeon_dp_getdpcd(radeon_connector)) |
ret = connector_status_connected; |
} else { |
if (radeon_ddc_probe(radeon_connector, |
radeon_connector->requires_extended_probe)) |
if (radeon_ddc_probe(radeon_connector)) |
ret = connector_status_connected; |
} |
} |
|
if ((ret == connector_status_disconnected) && |
radeon_connector->dac_load_detect) { |
struct drm_encoder *encoder = radeon_best_single_encoder(connector); |
struct drm_encoder_helper_funcs *encoder_funcs; |
if (encoder) { |
encoder_funcs = encoder->helper_private; |
ret = encoder_funcs->detect(encoder, connector); |
} |
} |
} |
|
radeon_connector_update_scratch_regs(connector, ret); |
return ret; |
1356,13 → 1458,13 |
} |
} |
|
struct drm_connector_helper_funcs radeon_dp_connector_helper_funcs = { |
static const struct drm_connector_helper_funcs radeon_dp_connector_helper_funcs = { |
.get_modes = radeon_dp_get_modes, |
.mode_valid = radeon_dp_mode_valid, |
.best_encoder = radeon_dvi_encoder, |
}; |
|
struct drm_connector_funcs radeon_dp_connector_funcs = { |
static const struct drm_connector_funcs radeon_dp_connector_funcs = { |
.dpms = drm_helper_connector_dpms, |
.detect = radeon_dp_detect, |
.fill_modes = drm_helper_probe_single_connector_modes, |
1448,9 → 1550,7 |
radeon_connector->shared_ddc = shared_ddc; |
radeon_connector->connector_object_id = connector_object_id; |
radeon_connector->hpd = *hpd; |
radeon_connector->requires_extended_probe = |
radeon_connector_needs_extended_probe(rdev, supported_device, |
connector_type); |
|
radeon_connector->router = *router; |
if (router->ddc_valid || router->cd_valid) { |
radeon_connector->router_bus = radeon_i2c_lookup(rdev, &router->i2c_info); |
1746,7 → 1846,7 |
connector->polled = DRM_CONNECTOR_POLL_HPD; |
|
connector->display_info.subpixel_order = subpixel_order; |
drm_sysfs_connector_add(connector); |
// drm_sysfs_connector_add(connector); |
return; |
|
failed: |
1797,9 → 1897,7 |
radeon_connector->devices = supported_device; |
radeon_connector->connector_object_id = connector_object_id; |
radeon_connector->hpd = *hpd; |
radeon_connector->requires_extended_probe = |
radeon_connector_needs_extended_probe(rdev, supported_device, |
connector_type); |
|
switch (connector_type) { |
case DRM_MODE_CONNECTOR_VGA: |
drm_connector_init(dev, &radeon_connector->base, &radeon_vga_connector_funcs, connector_type); |
1905,16 → 2003,5 |
} else |
connector->polled = DRM_CONNECTOR_POLL_HPD; |
connector->display_info.subpixel_order = subpixel_order; |
drm_sysfs_connector_add(connector); |
if (connector_type == DRM_MODE_CONNECTOR_LVDS) { |
struct drm_encoder *drm_encoder; |
|
list_for_each_entry(drm_encoder, &dev->mode_config.encoder_list, head) { |
struct radeon_encoder *radeon_encoder; |
|
radeon_encoder = to_radeon_encoder(drm_encoder); |
if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_LVDS) |
radeon_legacy_backlight_init(radeon_encoder, connector); |
// drm_sysfs_connector_add(connector); |
} |
} |
} |