Commit 224d94b1 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: rewrite DP handling

- reorganize the functions based on use
- clean up function naming
- rework link training to better match what we use internally
- add initial support for DP 1.2 (no MST yet)
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 558e27db
This diff is collapsed.
...@@ -59,7 +59,7 @@ void radeon_connector_hotplug(struct drm_connector *connector) ...@@ -59,7 +59,7 @@ void radeon_connector_hotplug(struct drm_connector *connector)
(radeon_dp_getsinktype(radeon_connector) == CONNECTOR_OBJECT_ID_eDP)) { (radeon_dp_getsinktype(radeon_connector) == CONNECTOR_OBJECT_ID_eDP)) {
if (radeon_dp_needs_link_train(radeon_connector)) { if (radeon_dp_needs_link_train(radeon_connector)) {
if (connector->encoder) if (connector->encoder)
dp_link_train(connector->encoder, connector); radeon_dp_link_train(connector->encoder, connector);
} }
} }
} }
...@@ -1195,7 +1195,7 @@ static int radeon_dp_mode_valid(struct drm_connector *connector, ...@@ -1195,7 +1195,7 @@ static int radeon_dp_mode_valid(struct drm_connector *connector,
if ((radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) || if ((radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
(radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) (radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
return radeon_dp_mode_valid_helper(radeon_connector, mode); return radeon_dp_mode_valid_helper(connector, mode);
else else
return MODE_OK; return MODE_OK;
} }
......
...@@ -1417,7 +1417,9 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode) ...@@ -1417,7 +1417,9 @@ radeon_atom_encoder_dpms(struct drm_encoder *encoder, int mode)
ATOM_TRANSMITTER_ACTION_POWER_ON); ATOM_TRANSMITTER_ACTION_POWER_ON);
radeon_dig_connector->edp_on = true; radeon_dig_connector->edp_on = true;
} }
dp_link_train(encoder, connector); if (ASIC_IS_DCE4(rdev))
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_OFF, 0);
radeon_dp_link_train(encoder, connector);
if (ASIC_IS_DCE4(rdev)) if (ASIC_IS_DCE4(rdev))
atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0); atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_DP_VIDEO_ON, 0);
} }
......
...@@ -471,11 +471,11 @@ extern bool radeon_connector_is_dp12_capable(struct drm_connector *connector); ...@@ -471,11 +471,11 @@ extern bool radeon_connector_is_dp12_capable(struct drm_connector *connector);
extern void radeon_connector_hotplug(struct drm_connector *connector); extern void radeon_connector_hotplug(struct drm_connector *connector);
extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector); extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector);
extern int radeon_dp_mode_valid_helper(struct radeon_connector *radeon_connector, extern int radeon_dp_mode_valid_helper(struct drm_connector *connector,
struct drm_display_mode *mode); struct drm_display_mode *mode);
extern void radeon_dp_set_link_config(struct drm_connector *connector, extern void radeon_dp_set_link_config(struct drm_connector *connector,
struct drm_display_mode *mode); struct drm_display_mode *mode);
extern void dp_link_train(struct drm_encoder *encoder, extern void radeon_dp_link_train(struct drm_encoder *encoder,
struct drm_connector *connector); struct drm_connector *connector);
extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector); extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector);
extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector); extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment