Commit b20932dd authored by Alex Deucher's avatar Alex Deucher

drm/radeon/audio: update EDID derived fields in modeset

We don't necessarily have an EDID at this point when
audio detect gets called.  Ideally we'd update these
fields in detect, but that requires a larger rework
of the display detect code.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3ed7ceea
...@@ -484,11 +484,6 @@ void radeon_audio_detect(struct drm_connector *connector, ...@@ -484,11 +484,6 @@ void radeon_audio_detect(struct drm_connector *connector,
radeon_encoder->audio = rdev->audio.hdmi_funcs; radeon_encoder->audio = rdev->audio.hdmi_funcs;
dig->afmt->pin = radeon_audio_get_pin(connector->encoder); dig->afmt->pin = radeon_audio_get_pin(connector->encoder);
radeon_audio_write_speaker_allocation(connector->encoder);
radeon_audio_write_sad_regs(connector->encoder);
if (connector->encoder->crtc)
radeon_audio_write_latency_fields(connector->encoder,
&connector->encoder->crtc->mode);
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);
...@@ -706,6 +701,9 @@ static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder, ...@@ -706,6 +701,9 @@ static void radeon_audio_hdmi_mode_set(struct drm_encoder *encoder,
radeon_audio_set_mute(encoder, true); radeon_audio_set_mute(encoder, true);
radeon_audio_write_speaker_allocation(encoder);
radeon_audio_write_sad_regs(encoder);
radeon_audio_write_latency_fields(encoder, mode);
radeon_audio_set_dto(encoder, mode->clock); radeon_audio_set_dto(encoder, mode->clock);
radeon_audio_set_vbi_packet(encoder); radeon_audio_set_vbi_packet(encoder);
radeon_hdmi_set_color_depth(encoder); radeon_hdmi_set_color_depth(encoder);
...@@ -730,6 +728,9 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder, ...@@ -730,6 +728,9 @@ static void radeon_audio_dp_mode_set(struct drm_encoder *encoder,
if (!dig || !dig->afmt) if (!dig || !dig->afmt)
return; return;
radeon_audio_write_speaker_allocation(encoder);
radeon_audio_write_sad_regs(encoder);
radeon_audio_write_latency_fields(encoder, mode);
radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10); radeon_audio_set_dto(encoder, rdev->clock.default_dispclk * 10);
radeon_audio_set_audio_packet(encoder); radeon_audio_set_audio_packet(encoder);
radeon_audio_select_pin(encoder); radeon_audio_select_pin(encoder);
......
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