From patchwork Wed Aug 16 09:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Govindapillai X-Patchwork-Id: 13354816 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 E7B4DC001E0 for ; Wed, 16 Aug 2023 09:50:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69C3210E318; Wed, 16 Aug 2023 09:50:15 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id F009710E317 for ; Wed, 16 Aug 2023 09:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692179413; x=1723715413; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qPOVwiwVFRQATXIbY3kDAE4RQYrkE0zBjjg9b7nyvfA=; b=M6vDmmHwkGSNsgbkM6ENFP91wANL61U3U3rolJCfgUadVQtsl2go20NU RG8/8MHT4YeBhhHRVtrgCiZWuBO3NPkiW8vmY6GuCrNPqQqDqaDiECIcH 4aEMNwDhFusu718JI/1mwjfCuWUjtT4JgPazG/IVWzh+m7WUN+XFY+coc 78/yY/hZiktLyBqQUrVvj6Z/O+tAYdD63yWIfihJZeqlt97mPRZIAal7+ nQmbVfzodUjeZKiHihj+lnHJMzDbJwGv+9pwMxRB5HrrbZJMc9FzW1IK3 9BxjBRvJJ+YCnErhnlHX+rBjTUrUK6kue8evouo7yfuXUSBVpc2neAuYy g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357464208" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="357464208" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="737234445" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="737234445" Received: from mpietras-mobl1.ger.corp.intel.com (HELO vgovind2-mobl3.intel.com) ([10.252.43.172]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:11 -0700 From: Vinod Govindapillai To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Aug 2023 12:49:53 +0300 Message-Id: <20230816094956.487498-2-vinod.govindapillai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816094956.487498-1-vinod.govindapillai@intel.com> References: <20230816094956.487498-1-vinod.govindapillai@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v3 1/4] drm/i915/display: remove redundant parameter from sdp split update 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The needed functionality can be performed using crtc_state here. Signed-off-by: Vinod Govindapillai Reviewed-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_audio.c | 6 +++--- drivers/gpu/drm/i915/display/intel_audio.h | 3 +-- drivers/gpu/drm/i915/display/intel_ddi.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index 3d9c9b4f27f8..19605264a35c 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.c +++ b/drivers/gpu/drm/i915/display/intel_audio.c @@ -759,10 +759,10 @@ static void ibx_audio_codec_enable(struct intel_encoder *encoder, mutex_unlock(&i915->display.audio.mutex); } -void intel_audio_sdp_split_update(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state) +void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state) { - struct drm_i915_private *i915 = to_i915(encoder->base.dev); + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); + struct drm_i915_private *i915 = to_i915(crtc->base.dev); enum transcoder trans = crtc_state->cpu_transcoder; if (HAS_DP20(i915)) diff --git a/drivers/gpu/drm/i915/display/intel_audio.h b/drivers/gpu/drm/i915/display/intel_audio.h index 07d034a981e9..9327954b801e 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.h +++ b/drivers/gpu/drm/i915/display/intel_audio.h @@ -29,7 +29,6 @@ void intel_audio_cdclk_change_pre(struct drm_i915_private *dev_priv); void intel_audio_cdclk_change_post(struct drm_i915_private *dev_priv); void intel_audio_init(struct drm_i915_private *dev_priv); void intel_audio_deinit(struct drm_i915_private *dev_priv); -void intel_audio_sdp_split_update(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state); +void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state); #endif /* __INTEL_AUDIO_H__ */ diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 84bbf854337a..b7f4281b8658 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -3248,7 +3248,7 @@ static void intel_enable_ddi(struct intel_atomic_state *state, intel_ddi_enable_transcoder_func(encoder, crtc_state); /* Enable/Disable DP2.0 SDP split config before transcoder */ - intel_audio_sdp_split_update(encoder, crtc_state); + intel_audio_sdp_split_update(crtc_state); intel_enable_transcoder(crtc_state); From patchwork Wed Aug 16 09:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Govindapillai X-Patchwork-Id: 13354817 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 63DCAC04A94 for ; Wed, 16 Aug 2023 09:50:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D870910E319; Wed, 16 Aug 2023 09:50:17 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 42ADB10E317 for ; Wed, 16 Aug 2023 09:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692179415; x=1723715415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YeF8SUG+pMfMGsc8TlQWIJUVG1fRFw4WIYlqVK/whhs=; b=VngbATYtltM6Suzcv4gFISkgsul5GMt1c59q4n8TXcq0qt8fnaYD/Dni cy+w8l192DacK7VLLUW52RxrP71MaeujVNPD2uG8ecbG5iJHpSbLZEjpM 3M5bTOXSAcQl76C+lMdT+WFeU4Sr9tmo/xjTAfzhg6ZnBY8b6Zl9Mq1Mw tOXkuxbnVFG7wM7xi0u0TOCDt1XAZH64jYsbtdEujpKMeNTXo7tJ3ge/o eoioROt+KOQw/8hvaq2jVwU90SlwYS+LbpQaUW4cNq0hEJHqPTdD0ZHls hCy38B9YmC/7A0pkisYfM1J4e4mp1HMTCSrDmljAmLxe0dWO/8y9SAdhG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357464212" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="357464212" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="737234472" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="737234472" Received: from mpietras-mobl1.ger.corp.intel.com (HELO vgovind2-mobl3.intel.com) ([10.252.43.172]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:13 -0700 From: Vinod Govindapillai To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Aug 2023 12:49:54 +0300 Message-Id: <20230816094956.487498-3-vinod.govindapillai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816094956.487498-1-vinod.govindapillai@intel.com> References: <20230816094956.487498-1-vinod.govindapillai@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v3 2/4] drm/i915/display: combine DP audio compute config steps 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Combine all DP audio configs into a single function Signed-off-by: Vinod Govindapillai --- drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 964bf0551bdc..67c06bbc1760 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2240,9 +2240,12 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder, struct drm_i915_private *i915 = to_i915(encoder->base.dev); struct drm_connector *connector = conn_state->connector; - pipe_config->sdp_split_enable = + pipe_config->has_audio = intel_dp_has_audio(encoder, conn_state) && - intel_dp_is_uhbr(pipe_config); + intel_audio_compute_config(encoder, pipe_config, conn_state); + + pipe_config->sdp_split_enable = pipe_config->has_audio && + intel_dp_is_uhbr(pipe_config); drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n", connector->base.id, connector->name, @@ -2264,10 +2267,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A) pipe_config->has_pch_encoder = true; - pipe_config->has_audio = - intel_dp_has_audio(encoder, conn_state) && - intel_audio_compute_config(encoder, pipe_config, conn_state); - fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode); if (intel_dp_is_edp(intel_dp) && fixed_mode) { ret = intel_panel_compute_config(connector, adjusted_mode); From patchwork Wed Aug 16 09:49:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Govindapillai X-Patchwork-Id: 13354818 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 2F0D8C001E0 for ; Wed, 16 Aug 2023 09:50:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6817C10E317; Wed, 16 Aug 2023 09:50:19 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D56110E317 for ; Wed, 16 Aug 2023 09:50: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=1692179417; x=1723715417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ysamd/PGa3vrkTbLcAehbxWEyLnYXetb6lNyPt+xtU8=; b=RSclPRY/qQ/k2taOHfRrILL/sH4mIJzxOR3UXlJ2yqPI62Ok9v2b10nd Evsww7CPLgx8GzQj4QBaNq99bH+ueRA3vAiGY9fh3x9rlkF4cylfKhjif Y4/VCP7GTlMqq+AznXo0lNSohYGHzaiUSSyGKXDnGEbas77XOEnjWQgWj i1D4i5Rj9VfQqp/LpHG2loqKDBytTKU19QcN8m8rUVCyWjhycnnP5b0Is WiPHXUxwW7ce1ccTS6nxgUanq0qfA/69RlKKnEgHVhZEJlRtEE++UggQS Skq8oN/9nSNg9MwzJoCkwZTt2cUMTfyiNH+3quvSGM3ZZK8dIb458HclG g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357464218" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="357464218" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="737234503" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="737234503" Received: from mpietras-mobl1.ger.corp.intel.com (HELO vgovind2-mobl3.intel.com) ([10.252.43.172]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:15 -0700 From: Vinod Govindapillai To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Aug 2023 12:49:55 +0300 Message-Id: <20230816094956.487498-4-vinod.govindapillai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816094956.487498-1-vinod.govindapillai@intel.com> References: <20230816094956.487498-1-vinod.govindapillai@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v3 3/4] drm/i915/display: update intel_dp_has_audio to support MST 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Modify intel_dp_has_audio to handle DP-MST as well. Signed-off-by: Vinod Govindapillai --- drivers/gpu/drm/i915/display/intel_dp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 67c06bbc1760..0ee9b9e05c26 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2171,15 +2171,17 @@ intel_dp_drrs_compute_config(struct intel_connector *connector, } static bool intel_dp_has_audio(struct intel_encoder *encoder, + struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { struct drm_i915_private *i915 = to_i915(encoder->base.dev); - struct intel_dp *intel_dp = enc_to_intel_dp(encoder); - struct intel_connector *connector = intel_dp->attached_connector; const struct intel_digital_connector_state *intel_conn_state = to_intel_digital_connector_state(conn_state); + struct intel_connector *connector = + to_intel_connector(conn_state->connector); - if (!intel_dp_port_has_audio(i915, encoder->port)) + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && + !intel_dp_port_has_audio(i915, encoder->port)) return false; if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO) @@ -2241,7 +2243,7 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder, struct drm_connector *connector = conn_state->connector; pipe_config->has_audio = - intel_dp_has_audio(encoder, conn_state) && + intel_dp_has_audio(encoder, pipe_config, conn_state) && intel_audio_compute_config(encoder, pipe_config, conn_state); pipe_config->sdp_split_enable = pipe_config->has_audio && From patchwork Wed Aug 16 09:49:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Govindapillai X-Patchwork-Id: 13354819 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 12D01C001E0 for ; Wed, 16 Aug 2023 09:50:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 754D710E31A; Wed, 16 Aug 2023 09:50:22 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 266C710E31A for ; Wed, 16 Aug 2023 09:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692179420; x=1723715420; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ut5FgfxJe3MP5Syh46sOH49fzyIEKMkqr/NcoUdBTag=; b=axvF6gJDvR7xFgK+XDWyKvAG1vhGHhWAd81zexHZSG/LzvuAuRDcG+X+ QUnZnCHqR3tYPgi1uzC4pMoi8do/dTyYDTIW0JXDvLuq6Zk5X9hjtvCgh 8vEVwvba3zPp8aFDwDFD/UpTc1jd+Hogjens4stdAQC/clHGHO+5gVSPr 5x1lvqKgkuHO5+iZQ2E7hH+dcNlrzJ4RXbLw7kAMgHPQ8lsfQt44+ikOL d7/xLMrWAxhVS8Pfs5Cmtfn3OoF8zCrQE0o4gz1v/GYrgH8tJ3zkIDcWK Rkkz6GEYCJFJ6rjl4pfsPK2za3e+iceNxj2qFvH4HvI0o1hyQyCJ4zjQj g==; X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="357464227" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="357464227" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10803"; a="737234522" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="737234522" Received: from mpietras-mobl1.ger.corp.intel.com (HELO vgovind2-mobl3.intel.com) ([10.252.43.172]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2023 02:50:18 -0700 From: Vinod Govindapillai To: intel-gfx@lists.freedesktop.org Date: Wed, 16 Aug 2023 12:49:56 +0300 Message-Id: <20230816094956.487498-5-vinod.govindapillai@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816094956.487498-1-vinod.govindapillai@intel.com> References: <20230816094956.487498-1-vinod.govindapillai@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v3 4/4] drm/i915/display: configure SDP split for DP-MST 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Extend the SDP split audio config for DP-MST Signed-off-by: Vinod Govindapillai --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/display/intel_dp.h | 3 +++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 19 ++----------------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 0ee9b9e05c26..c1364b164df7 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2234,7 +2234,7 @@ intel_dp_compute_output_format(struct intel_encoder *encoder, return ret; } -static void +void intel_dp_audio_compute_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state) diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h index 22099de3ca45..62aacc89c45d 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.h +++ b/drivers/gpu/drm/i915/display/intel_dp.h @@ -65,6 +65,9 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, struct link_config_limits *limits, int timeslots, bool recompute_pipe_bpp); +void intel_dp_audio_compute_config(struct intel_encoder *encoder, + struct intel_crtc_state *pipe_config, + struct drm_connector_state *conn_state); bool intel_dp_has_hdmi_sink(struct intel_dp *intel_dp); bool intel_dp_is_edp(struct intel_dp *intel_dp); bool intel_dp_is_uhbr(const struct intel_crtc_state *crtc_state); diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index e3f176a093d2..8fc7802d796b 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -290,19 +290,6 @@ static int intel_dp_mst_update_slots(struct intel_encoder *encoder, return 0; } -static bool intel_dp_mst_has_audio(const struct drm_connector_state *conn_state) -{ - const struct intel_digital_connector_state *intel_conn_state = - to_intel_digital_connector_state(conn_state); - struct intel_connector *connector = - to_intel_connector(conn_state->connector); - - if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO) - return connector->base.display_info.has_audio; - else - return intel_conn_state->force_audio == HDMI_AUDIO_ON; -} - static int intel_dp_mst_compute_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config, struct drm_connector_state *conn_state) @@ -322,10 +309,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder, pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; pipe_config->has_pch_encoder = false; - pipe_config->has_audio = - intel_dp_mst_has_audio(conn_state) && - intel_audio_compute_config(encoder, pipe_config, conn_state); - /* * for MST we always configure max link bw - the spec doesn't * seem to suggest we should do otherwise. @@ -388,6 +371,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder, pipe_config->lane_lat_optim_mask = bxt_ddi_phy_calc_lane_lat_optim_mask(pipe_config->lane_count); + intel_dp_audio_compute_config(encoder, pipe_config, conn_state); + intel_ddi_compute_min_voltage_level(dev_priv, pipe_config); return 0;