Lines Matching +full:- +full:dig +full:- +full:div

38 	spin_lock_irqsave(&rdev->end_idx_lock, flags);  in dce6_endpoint_rreg()
41 spin_unlock_irqrestore(&rdev->end_idx_lock, flags); in dce6_endpoint_rreg()
51 spin_lock_irqsave(&rdev->end_idx_lock, flags); in dce6_endpoint_wreg()
58 spin_unlock_irqrestore(&rdev->end_idx_lock, flags); in dce6_endpoint_wreg()
66 for (i = 0; i < rdev->audio.num_pins; i++) { in dce6_afmt_get_connected_pins()
67 offset = rdev->audio.pin[i].offset; in dce6_afmt_get_connected_pins()
71 rdev->audio.pin[i].connected = false; in dce6_afmt_get_connected_pins()
73 rdev->audio.pin[i].connected = true; in dce6_afmt_get_connected_pins()
81 struct radeon_encoder_atom_dig *dig; in dce6_audio_get_pin() local
87 for (i = 0; i < rdev->audio.num_pins; i++) { in dce6_audio_get_pin()
88 if (rdev->audio.pin[i].connected) { in dce6_audio_get_pin()
89 pin = &rdev->audio.pin[i]; in dce6_audio_get_pin()
92 list_for_each_entry(encoder, &rdev->ddev->mode_config.encoder_list, head) { in dce6_audio_get_pin()
95 dig = radeon_encoder->enc_priv; in dce6_audio_get_pin()
96 if (dig->pin == pin) in dce6_audio_get_pin()
112 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_select_pin()
114 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_select_pin() local
116 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_select_pin()
119 WREG32(AFMT_AUDIO_SRC_CONTROL + dig->afmt->offset, in dce6_afmt_select_pin()
120 AFMT_AUDIO_SRC_SELECT(dig->pin->id)); in dce6_afmt_select_pin()
127 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_write_latency_fields()
129 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_write_latency_fields() local
132 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_write_latency_fields()
135 if (mode->flags & DRM_MODE_FLAG_INTERLACE) { in dce6_afmt_write_latency_fields()
136 if (connector->latency_present[1]) in dce6_afmt_write_latency_fields()
137 tmp = VIDEO_LIPSYNC(connector->video_latency[1]) | in dce6_afmt_write_latency_fields()
138 AUDIO_LIPSYNC(connector->audio_latency[1]); in dce6_afmt_write_latency_fields()
142 if (connector->latency_present[0]) in dce6_afmt_write_latency_fields()
143 tmp = VIDEO_LIPSYNC(connector->video_latency[0]) | in dce6_afmt_write_latency_fields()
144 AUDIO_LIPSYNC(connector->audio_latency[0]); in dce6_afmt_write_latency_fields()
148 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_write_latency_fields()
155 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_hdmi_write_speaker_allocation()
157 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_hdmi_write_speaker_allocation() local
160 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_hdmi_write_speaker_allocation()
164 tmp = RREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_hdmi_write_speaker_allocation()
173 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_hdmi_write_speaker_allocation()
180 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_dp_write_speaker_allocation()
182 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_dp_write_speaker_allocation() local
185 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_dp_write_speaker_allocation()
189 tmp = RREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_dp_write_speaker_allocation()
198 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_dp_write_speaker_allocation()
207 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_write_sad_regs() local
208 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_write_sad_regs()
224 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_write_sad_regs()
230 int max_channels = -1; in dce6_afmt_write_sad_regs()
236 if (sad->format == eld_reg_to_type[i][1]) { in dce6_afmt_write_sad_regs()
237 if (sad->channels > max_channels) { in dce6_afmt_write_sad_regs()
238 value = MAX_CHANNELS(sad->channels) | in dce6_afmt_write_sad_regs()
239 DESCRIPTOR_BYTE_2(sad->byte2) | in dce6_afmt_write_sad_regs()
240 SUPPORTED_FREQUENCIES(sad->freq); in dce6_afmt_write_sad_regs()
241 max_channels = sad->channels; in dce6_afmt_write_sad_regs()
244 if (sad->format == HDMI_AUDIO_CODING_TYPE_PCM) in dce6_afmt_write_sad_regs()
245 stereo_freqs |= sad->freq; in dce6_afmt_write_sad_regs()
253 WREG32_ENDPOINT(dig->pin->offset, eld_reg_to_type[i][0], value); in dce6_afmt_write_sad_regs()
264 WREG32_ENDPOINT(pin->offset, AZ_F0_CODEC_PIN_CONTROL_HOT_PLUG_CONTROL, in dce6_audio_enable()
275 value |= DCCG_AUDIO_DTO0_SOURCE_SEL(crtc->crtc_id); in dce6_hdmi_audio_set_dto()
295 value |= DCCG_AUDIO_DTO0_SOURCE_SEL(crtc->crtc_id); in dce6_dp_audio_set_dto()
304 unsigned int div = (RREG32(DENTIST_DISPCLK_CNTL) & in dce6_dp_audio_set_dto() local
307 div = radeon_audio_decode_dfs_div(div); in dce6_dp_audio_set_dto()
309 if (div) in dce6_dp_audio_set_dto()
310 clock = clock * 100 / div; in dce6_dp_audio_set_dto()