Commit d3c34d2c authored by Alex Deucher's avatar Alex Deucher

drm/radeon: assign pin in detect

We need the pin from detect on, it's too late in dpms.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent add7d759
...@@ -452,7 +452,7 @@ void radeon_audio_enable(struct radeon_device *rdev, ...@@ -452,7 +452,7 @@ void radeon_audio_enable(struct radeon_device *rdev,
} }
void radeon_audio_detect(struct drm_connector *connector, void radeon_audio_detect(struct drm_connector *connector,
enum drm_connector_status status) enum drm_connector_status status)
{ {
struct radeon_device *rdev; struct radeon_device *rdev;
struct radeon_encoder *radeon_encoder; struct radeon_encoder *radeon_encoder;
...@@ -483,6 +483,7 @@ void radeon_audio_detect(struct drm_connector *connector, ...@@ -483,6 +483,7 @@ void radeon_audio_detect(struct drm_connector *connector,
else else
radeon_encoder->audio = rdev->audio.hdmi_funcs; radeon_encoder->audio = rdev->audio.hdmi_funcs;
dig->afmt->pin = radeon_audio_get_pin(connector->encoder);
radeon_audio_write_speaker_allocation(connector->encoder); radeon_audio_write_speaker_allocation(connector->encoder);
radeon_audio_write_sad_regs(connector->encoder); radeon_audio_write_sad_regs(connector->encoder);
if (connector->encoder->crtc) if (connector->encoder->crtc)
...@@ -491,6 +492,7 @@ void radeon_audio_detect(struct drm_connector *connector, ...@@ -491,6 +492,7 @@ void radeon_audio_detect(struct drm_connector *connector,
radeon_audio_enable(rdev, dig->afmt->pin, 0xf); radeon_audio_enable(rdev, dig->afmt->pin, 0xf);
} else { } else {
radeon_audio_enable(rdev, dig->afmt->pin, 0); radeon_audio_enable(rdev, dig->afmt->pin, 0);
dig->afmt->pin = NULL;
} }
} }
...@@ -704,7 +706,6 @@ static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder, ...@@ -704,7 +706,6 @@ static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
return; return;
/* disable audio prior to setting up hw */ /* disable audio prior to setting up hw */
dig->afmt->pin = radeon_audio_get_pin(encoder);
radeon_audio_enable(rdev, dig->afmt->pin, 0); radeon_audio_enable(rdev, dig->afmt->pin, 0);
radeon_audio_set_dto(encoder, mode->clock); radeon_audio_set_dto(encoder, mode->clock);
...@@ -734,7 +735,6 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder, ...@@ -734,7 +735,6 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
return; return;
/* disable audio prior to setting up hw */ /* disable audio prior to setting up hw */
dig->afmt->pin = radeon_audio_get_pin(encoder);
radeon_audio_enable(rdev, dig->afmt->pin, 0); radeon_audio_enable(rdev, dig->afmt->pin, 0);
radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10); radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10);
......
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