From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7E20C624D2 for ; Tue, 1 Sep 2026 11:00:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D7C2610E63C; Tue, 1 Sep 2026 11:00:18 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="e/EG/qd3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 93CE110E3D0; Tue, 1 Sep 2026 11:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788260417; x=1819796417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7EqUDnvaroEUuuD3tdTPgSSRCAoNIWa+gTsMpb4rKFI=; b=e/EG/qd3RpwaLDC2Js9oPQ9xhjM3FjhYS4ORYtDGo5d9gcKTT/uUp2V9 24p+y3bkNRk6r1dSYJcZl+WX0e3t+y7LC+Iz7puAhur2yx4CEL3IO6wci mPWN/QV9THXAzZ+wsaMI24cOJmZXVmh8auzBXgkPO6lkhgBrPTWz69zBW 9K/vY/4vrZUDV6+HwmhbIQqix5Ob/hcI26vvwWmSydd5PxYpvjzHS0+30 +77HyUQHC8eHnag69eaMc9syXyFclCecgHch2nnrSObPBGlBbfapE/mfW iXQ4SHD6nWupe7+270xuZUh6lRaWB2he3vl1ZgYhyL4n0Mn7s2SBylEQ2 g==; X-CSE-ConnectionGUID: aZAQW+AGS0qUi4bDmUw8jQ== X-CSE-MsgGUID: 2RSGvPoHQGat+qvLtEF8ug== X-IronPort-AV: E=McAfee;i="6800,10657,11892"; a="88561563" X-IronPort-AV: E=Sophos;i="6.25,255,1779174000"; d="scan'208";a="88561563" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2026 04:00:17 -0700 X-CSE-ConnectionGUID: UGsT+GKmTfKsXYF1L+HKqg== X-CSE-MsgGUID: Ztuki9hCTpq6cZ9U4Q9AKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,255,1779174000"; d="scan'208";a="298955039" Received: from dut-2a59.iind.intel.com ([10.190.239.113]) by orviesa002.jf.intel.com with ESMTP; 01 Sep 2026 04:00:15 -0700 From: Chaitanya Kumar Borah To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Chaitanya Kumar Borah Subject: [v5 1/2] drm/i915/hdmi: Move audio compute config after format selection Date: Tue, 1 Sep 2026 16:06:38 +0530 Message-ID: <20260901103639.617757-2-chaitanya.kumar.borah@intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260901103639.617757-1-chaitanya.kumar.borah@intel.com> References: <20260901103639.617757-1-chaitanya.kumar.borah@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 --- 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; -- 2.50.1