From 118ddfa814ba00eba3643058edc08e329472f950 Mon Sep 17 00:00:00 2001 From: Chaitanya Kumar Borah Date: Tue, 1 Sep 2026 16:06:38 +0530 Subject: [PATCH] drm/i915/hdmi: Move audio compute config after format selection As we plan to add audio BW calculation in i915, intel_audio_compute_config() would need the final output_format and pipe_bpp to correctly determine audio bandwidth constraints. Move the intel_audio_compute_config() call to after intel_hdmi_compute_formats() returns, ensuring the audio configuration is computed with the final parameters. Signed-off-by: Chaitanya Kumar Borah Reviewed-by: Ankit Nautiyal Link: https://patch.msgid.link/20260901103639.617757-2-chaitanya.kumar.borah@intel.com --- drivers/gpu/drm/i915/display/intel_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index 9b637e38a1a5..b6fa1a1558b8 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -2399,10 +2399,6 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder, if (!intel_link_bw_compute_pipe_bpp(pipe_config)) return -EINVAL; - pipe_config->has_audio = - intel_hdmi_has_audio(encoder, pipe_config, conn_state) && - intel_audio_compute_config(encoder, pipe_config, conn_state); - /* * Try to respect downstream TMDS clock limits first, if * that fails assume the user might know something we don't. @@ -2417,6 +2413,10 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder, return ret; } + pipe_config->has_audio = + intel_hdmi_has_audio(encoder, pipe_config, conn_state) && + intel_audio_compute_config(encoder, pipe_config, conn_state); + ret = intel_pfit_compute_config(pipe_config, conn_state); if (ret) return ret;