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

39 	spin_lock_irqsave(&rdev->end_idx_lock, flags);  in dce6_endpoint_rreg()
42 spin_unlock_irqrestore(&rdev->end_idx_lock, flags); in dce6_endpoint_rreg()
52 spin_lock_irqsave(&rdev->end_idx_lock, flags); in dce6_endpoint_wreg()
59 spin_unlock_irqrestore(&rdev->end_idx_lock, flags); in dce6_endpoint_wreg()
67 for (i = 0; i < rdev->audio.num_pins; i++) { in dce6_afmt_get_connected_pins()
68 offset = rdev->audio.pin[i].offset; in dce6_afmt_get_connected_pins()
72 rdev->audio.pin[i].connected = false; in dce6_afmt_get_connected_pins()
74 rdev->audio.pin[i].connected = true; in dce6_afmt_get_connected_pins()
82 struct radeon_encoder_atom_dig *dig; in dce6_audio_get_pin() local
88 for (i = 0; i < rdev->audio.num_pins; i++) { in dce6_audio_get_pin()
89 if (rdev->audio.pin[i].connected) { in dce6_audio_get_pin()
90 pin = &rdev->audio.pin[i]; in dce6_audio_get_pin()
93 list_for_each_entry(encoder, &rdev->ddev->mode_config.encoder_list, head) { in dce6_audio_get_pin()
96 dig = radeon_encoder->enc_priv; in dce6_audio_get_pin()
97 if (dig->pin == pin) in dce6_audio_get_pin()
113 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_select_pin()
115 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_select_pin() local
117 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_select_pin()
120 WREG32(AFMT_AUDIO_SRC_CONTROL + dig->afmt->offset, in dce6_afmt_select_pin()
121 AFMT_AUDIO_SRC_SELECT(dig->pin->id)); in dce6_afmt_select_pin()
128 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_write_latency_fields()
130 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_write_latency_fields() local
133 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_write_latency_fields()
136 if (mode->flags & DRM_MODE_FLAG_INTERLACE) { in dce6_afmt_write_latency_fields()
137 if (connector->latency_present[1]) in dce6_afmt_write_latency_fields()
138 tmp = VIDEO_LIPSYNC(connector->video_latency[1]) | in dce6_afmt_write_latency_fields()
139 AUDIO_LIPSYNC(connector->audio_latency[1]); in dce6_afmt_write_latency_fields()
143 if (connector->latency_present[0]) in dce6_afmt_write_latency_fields()
144 tmp = VIDEO_LIPSYNC(connector->video_latency[0]) | in dce6_afmt_write_latency_fields()
145 AUDIO_LIPSYNC(connector->audio_latency[0]); in dce6_afmt_write_latency_fields()
149 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_write_latency_fields()
156 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_hdmi_write_speaker_allocation()
158 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_hdmi_write_speaker_allocation() local
161 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_hdmi_write_speaker_allocation()
165 tmp = RREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_hdmi_write_speaker_allocation()
174 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_hdmi_write_speaker_allocation()
181 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_dp_write_speaker_allocation()
183 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_dp_write_speaker_allocation() local
186 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_dp_write_speaker_allocation()
190 tmp = RREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_dp_write_speaker_allocation()
199 WREG32_ENDPOINT(dig->pin->offset, in dce6_afmt_dp_write_speaker_allocation()
208 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; in dce6_afmt_write_sad_regs() local
209 struct radeon_device *rdev = encoder->dev->dev_private; in dce6_afmt_write_sad_regs()
225 if (!dig || !dig->afmt || !dig->pin) in dce6_afmt_write_sad_regs()
231 int max_channels = -1; in dce6_afmt_write_sad_regs()
237 if (sad->format == eld_reg_to_type[i][1]) { in dce6_afmt_write_sad_regs()
238 if (sad->channels > max_channels) { in dce6_afmt_write_sad_regs()
239 value = MAX_CHANNELS(sad->channels) | in dce6_afmt_write_sad_regs()
240 DESCRIPTOR_BYTE_2(sad->byte2) | in dce6_afmt_write_sad_regs()
241 SUPPORTED_FREQUENCIES(sad->freq); in dce6_afmt_write_sad_regs()
242 max_channels = sad->channels; in dce6_afmt_write_sad_regs()
245 if (sad->format == HDMI_AUDIO_CODING_TYPE_PCM) in dce6_afmt_write_sad_regs()
246 stereo_freqs |= sad->freq; in dce6_afmt_write_sad_regs()
254 WREG32_ENDPOINT(dig->pin->offset, eld_reg_to_type[i][0], value); in dce6_afmt_write_sad_regs()
265 WREG32_ENDPOINT(pin->offset, AZ_F0_CODEC_PIN_CONTROL_HOT_PLUG_CONTROL, in dce6_audio_enable()
276 value |= DCCG_AUDIO_DTO0_SOURCE_SEL(crtc->crtc_id); in dce6_hdmi_audio_set_dto()
296 value |= DCCG_AUDIO_DTO0_SOURCE_SEL(crtc->crtc_id); in dce6_dp_audio_set_dto()
305 unsigned int div = (RREG32(DENTIST_DISPCLK_CNTL) & in dce6_dp_audio_set_dto() local
308 div = radeon_audio_decode_dfs_div(div); in dce6_dp_audio_set_dto()
310 if (div) in dce6_dp_audio_set_dto()
311 clock = clock * 100 / div; in dce6_dp_audio_set_dto()