linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm/dp: do not notify audio subsystem if sink doesn't support audio
@ 2020-11-03  1:10 Abhinav Kumar
  2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
  0 siblings, 1 reply; 2+ messages in thread
From: Abhinav Kumar @ 2020-11-03  1:10 UTC (permalink / raw)
  To: dri-devel
  Cc: Abhinav Kumar, linux-arm-msm, freedreno, robdclark, seanpaul,
	swboyd, nganji, aravindh, tanmay, khsieh, cychiang

For sinks that do not support audio, there is no need to notify
audio subsystem of the connection event.

This will make sure that audio routes only to the primary display
when connected to such sinks.

changes in v2:
  - Added fixes tag
  - Removed nested if condition and removed usage of global pointer

Fixes: d13e36d7d222 ("drm/msm/dp: add audio support for Display Port on MSM")
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 2f72817ca24f..3f59ba8fcde5 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -549,7 +549,14 @@ static int dp_connect_pending_timeout(struct dp_display_private *dp, u32 data)
 static void dp_display_handle_plugged_change(struct msm_dp *dp_display,
 		bool plugged)
 {
-	if (dp_display->plugged_cb && dp_display->codec_dev)
+	struct dp_display_private *dp;
+
+	dp = container_of(dp_display,
+			struct dp_display_private, dp_display);
+
+	/* notify audio subsystem only if sink supports audio */
+	if (dp_display->plugged_cb && dp_display->codec_dev &&
+			dp->audio_supported)
 		dp_display->plugged_cb(dp_display->codec_dev, plugged);
 }
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm/msm/dp: do not notify audio subsystem if sink doesn't support audio
  2020-11-03  1:10 [PATCH v2] drm/msm/dp: do not notify audio subsystem if sink doesn't support audio Abhinav Kumar
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
  To: Abhinav Kumar; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Mon,  2 Nov 2020 17:10:23 -0800 you wrote:
> For sinks that do not support audio, there is no need to notify
> audio subsystem of the connection event.
> 
> This will make sure that audio routes only to the primary display
> when connected to such sinks.
> 
> changes in v2:
>   - Added fixes tag
>   - Removed nested if condition and removed usage of global pointer
> 
> [...]

Here is the summary with links:
  - [v2] drm/msm/dp: do not notify audio subsystem if sink doesn't support audio
    https://git.kernel.org/qcom/c/e8c765811b10

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-29 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  1:10 [PATCH v2] drm/msm/dp: do not notify audio subsystem if sink doesn't support audio Abhinav Kumar
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).