Lines Matching refs:crtc_state
69 const struct intel_crtc_state *crtc_state,
75 struct intel_crtc_state *crtc_state);
139 audio_config_dp_get_n_m(const struct intel_crtc_state *crtc_state, int rate) in audio_config_dp_get_n_m() argument
145 crtc_state->port_clock == dp_aud_n_m[i].clock) in audio_config_dp_get_n_m()
253 static u32 audio_config_hdmi_pixel_clock(const struct intel_crtc_state *crtc_state) in audio_config_hdmi_pixel_clock() argument
255 struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev); in audio_config_hdmi_pixel_clock()
257 &crtc_state->hw.adjusted_mode; in audio_config_hdmi_pixel_clock()
283 static int audio_config_hdmi_get_n(const struct intel_crtc_state *crtc_state, in audio_config_hdmi_get_n() argument
289 if (crtc_state->pipe_bpp == 36) { in audio_config_hdmi_get_n()
292 } else if (crtc_state->pipe_bpp == 30) { in audio_config_hdmi_get_n()
302 crtc_state->port_clock == hdmi_ncts_table[i].clock) { in audio_config_hdmi_get_n()
320 struct intel_crtc_state *crtc_state) in g4x_audio_codec_get_config() argument
323 u32 *eld = (u32 *)crtc_state->eld; in g4x_audio_codec_get_config()
334 len = min_t(int, sizeof(crtc_state->eld) / 4, eld_buffer_size); in g4x_audio_codec_get_config()
356 const struct intel_crtc_state *crtc_state, in g4x_audio_codec_enable() argument
360 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in g4x_audio_codec_enable()
361 const u32 *eld = (const u32 *)crtc_state->eld; in g4x_audio_codec_enable()
370 len = min(drm_eld_size(crtc_state->eld) / 4, eld_buffer_size); in g4x_audio_codec_enable()
386 const struct intel_crtc_state *crtc_state) in hsw_dp_audio_config_update() argument
390 enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; in hsw_dp_audio_config_update()
397 nm = audio_config_dp_get_n_m(crtc_state, rate); in hsw_dp_audio_config_update()
434 const struct intel_crtc_state *crtc_state) in hsw_hdmi_audio_config_update() argument
438 enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; in hsw_hdmi_audio_config_update()
449 tmp |= audio_config_hdmi_pixel_clock(crtc_state); in hsw_hdmi_audio_config_update()
451 n = audio_config_hdmi_get_n(crtc_state, rate); in hsw_hdmi_audio_config_update()
476 const struct intel_crtc_state *crtc_state) in hsw_audio_config_update() argument
478 if (intel_crtc_has_dp_encoder(crtc_state)) in hsw_audio_config_update()
479 hsw_dp_audio_config_update(encoder, crtc_state); in hsw_audio_config_update()
481 hsw_hdmi_audio_config_update(encoder, crtc_state); in hsw_audio_config_update()
518 const struct intel_crtc_state *crtc_state) in calc_hblank_early_prog() argument
528 h_active = crtc_state->hw.adjusted_mode.crtc_hdisplay; in calc_hblank_early_prog()
529 h_total = crtc_state->hw.adjusted_mode.crtc_htotal; in calc_hblank_early_prog()
530 pixel_clk = crtc_state->hw.adjusted_mode.crtc_clock; in calc_hblank_early_prog()
531 vdsc_bpp = crtc_state->dsc.compressed_bpp; in calc_hblank_early_prog()
535 link_clk = crtc_state->port_clock; in calc_hblank_early_prog()
536 lanes = crtc_state->lane_count; in calc_hblank_early_prog()
565 static unsigned int calc_samples_room(const struct intel_crtc_state *crtc_state) in calc_samples_room() argument
570 h_active = crtc_state->hw.adjusted_mode.hdisplay; in calc_samples_room()
571 h_total = crtc_state->hw.adjusted_mode.htotal; in calc_samples_room()
572 pixel_clk = crtc_state->hw.adjusted_mode.clock; in calc_samples_room()
573 link_clk = crtc_state->port_clock; in calc_samples_room()
574 lanes = crtc_state->lane_count; in calc_samples_room()
581 const struct intel_crtc_state *crtc_state) in enable_audio_dsc_wa() argument
584 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in enable_audio_dsc_wa()
599 if (crtc_state->dsc.compression_enable && in enable_audio_dsc_wa()
600 crtc_state->hw.adjusted_mode.hdisplay >= 3840 && in enable_audio_dsc_wa()
601 crtc_state->hw.adjusted_mode.vdisplay >= 2160) { in enable_audio_dsc_wa()
604 hblank_early_prog = calc_hblank_early_prog(encoder, crtc_state); in enable_audio_dsc_wa()
616 samples_room = calc_samples_room(crtc_state); in enable_audio_dsc_wa()
627 const struct intel_crtc_state *crtc_state, in hsw_audio_codec_enable() argument
631 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in hsw_audio_codec_enable()
632 enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; in hsw_audio_codec_enable()
637 if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP)) in hsw_audio_codec_enable()
638 enable_audio_dsc_wa(encoder, crtc_state); in hsw_audio_codec_enable()
656 hsw_audio_config_update(encoder, crtc_state); in hsw_audio_codec_enable()
724 const struct intel_crtc_state *crtc_state, in ibx_audio_codec_enable() argument
728 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in ibx_audio_codec_enable()
756 (intel_crtc_has_dp_encoder(crtc_state) ? in ibx_audio_codec_enable()
758 audio_config_hdmi_pixel_clock(crtc_state))); in ibx_audio_codec_enable()
764 const struct intel_crtc_state *crtc_state) in intel_audio_sdp_split_update() argument
767 enum transcoder trans = crtc_state->cpu_transcoder; in intel_audio_sdp_split_update()
771 crtc_state->sdp_split_enable ? AUD_ENABLE_SDP_SPLIT : 0); in intel_audio_sdp_split_update()
775 struct intel_crtc_state *crtc_state, in intel_audio_compute_config() argument
781 &crtc_state->hw.adjusted_mode; in intel_audio_compute_config()
790 BUILD_BUG_ON(sizeof(crtc_state->eld) != sizeof(connector->eld)); in intel_audio_compute_config()
791 memcpy(crtc_state->eld, connector->eld, sizeof(crtc_state->eld)); in intel_audio_compute_config()
793 crtc_state->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2; in intel_audio_compute_config()
808 const struct intel_crtc_state *crtc_state, in intel_audio_codec_enable() argument
813 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_audio_codec_enable()
819 if (!crtc_state->has_audio) in intel_audio_codec_enable()
826 drm_eld_size(crtc_state->eld)); in intel_audio_codec_enable()
830 crtc_state, in intel_audio_codec_enable()
838 BUILD_BUG_ON(sizeof(audio_state->eld) != sizeof(crtc_state->eld)); in intel_audio_codec_enable()
839 memcpy(audio_state->eld, crtc_state->eld, sizeof(audio_state->eld)); in intel_audio_codec_enable()
846 if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) in intel_audio_codec_enable()
852 intel_lpe_audio_notify(i915, pipe, port, crtc_state->eld, in intel_audio_codec_enable()
853 crtc_state->port_clock, in intel_audio_codec_enable()
854 intel_crtc_has_dp_encoder(crtc_state)); in intel_audio_codec_enable()
913 struct intel_crtc_state *crtc_state) in intel_acomp_get_config() argument
916 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); in intel_acomp_get_config()
925 memcpy(crtc_state->eld, audio_state->eld, sizeof(audio_state->eld)); in intel_acomp_get_config()
931 struct intel_crtc_state *crtc_state) in intel_audio_codec_get_config() argument
935 if (!crtc_state->has_audio) in intel_audio_codec_get_config()
939 i915->display.funcs.audio->audio_codec_get_config(encoder, crtc_state); in intel_audio_codec_get_config()