All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
@ 2021-01-28  2:17 ` Judy Hsiao
  0 siblings, 0 replies; 7+ messages in thread
From: Judy Hsiao @ 2021-01-28  2:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Taniya Das, Rohit kumar, Banajit Goswami,
	Patrick Lai, Andy Gross, Bjorn Andersson, Liam Girdwood,
	Rob Herring, Jaroslav Kysela, Takashi Iwai, Srini Kandagatla,
	Stephan Gerhold, dianders, dgreid, cychiang, tzungbi, swboyd,
	linux-arm-kernel, linux-arm-msm, devicetree, alsa-devel,
	Judy Hsiao, Judy Hsiao

1. Trigger the unplug event in msm_dp_display_disable() to shutdown
   audio properly.
2. Reset the completion before signal the disconnect event.

Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 3bc7ed21de286..81f6794a25100 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -651,8 +651,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
 	dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND);
 
 	/* signal the disconnect event early to ensure proper teardown */
-	dp_display_handle_plugged_change(g_dp_display, false);
 	reinit_completion(&dp->audio_comp);
+	dp_display_handle_plugged_change(g_dp_display, false);
 
 	dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
 					DP_DP_IRQ_HPD_INT_MASK, true);
@@ -890,6 +890,9 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
 
 	/* wait only if audio was enabled */
 	if (dp_display->audio_enabled) {
+		/* signal the disconnect event */
+		reinit_completion(&dp->audio_comp);
+		dp_display_handle_plugged_change(dp_display, false);
 		if (!wait_for_completion_timeout(&dp->audio_comp,
 				HZ * 5))
 			DRM_ERROR("audio comp timeout\n");
-- 
2.29.2


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

* [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
@ 2021-01-28  2:17 ` Judy Hsiao
  0 siblings, 0 replies; 7+ messages in thread
From: Judy Hsiao @ 2021-01-28  2:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Taniya Das, alsa-devel, Banajit Goswami, Liam Girdwood,
	Rohit kumar, Patrick Lai, Andy Gross, dgreid, devicetree,
	Judy Hsiao, tzungbi, Stephan Gerhold, linux-arm-msm, swboyd,
	Rob Herring, Bjorn Andersson, linux-arm-kernel, dianders,
	cychiang, Takashi Iwai, Mark Brown, Srini Kandagatla, Judy Hsiao

1. Trigger the unplug event in msm_dp_display_disable() to shutdown
   audio properly.
2. Reset the completion before signal the disconnect event.

Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 3bc7ed21de286..81f6794a25100 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -651,8 +651,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
 	dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND);
 
 	/* signal the disconnect event early to ensure proper teardown */
-	dp_display_handle_plugged_change(g_dp_display, false);
 	reinit_completion(&dp->audio_comp);
+	dp_display_handle_plugged_change(g_dp_display, false);
 
 	dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
 					DP_DP_IRQ_HPD_INT_MASK, true);
@@ -890,6 +890,9 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
 
 	/* wait only if audio was enabled */
 	if (dp_display->audio_enabled) {
+		/* signal the disconnect event */
+		reinit_completion(&dp->audio_comp);
+		dp_display_handle_plugged_change(dp_display, false);
 		if (!wait_for_completion_timeout(&dp->audio_comp,
 				HZ * 5))
 			DRM_ERROR("audio comp timeout\n");
-- 
2.29.2


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

* [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
@ 2021-01-28  2:17 ` Judy Hsiao
  0 siblings, 0 replies; 7+ messages in thread
From: Judy Hsiao @ 2021-01-28  2:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Taniya Das, alsa-devel, Banajit Goswami, Liam Girdwood,
	Rohit kumar, Patrick Lai, Andy Gross, dgreid, devicetree,
	Judy Hsiao, tzungbi, Stephan Gerhold, linux-arm-msm, swboyd,
	Rob Herring, Jaroslav Kysela, Bjorn Andersson, linux-arm-kernel,
	dianders, cychiang, Takashi Iwai, Mark Brown, Srini Kandagatla,
	Judy Hsiao

1. Trigger the unplug event in msm_dp_display_disable() to shutdown
   audio properly.
2. Reset the completion before signal the disconnect event.

Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 3bc7ed21de286..81f6794a25100 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -651,8 +651,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
 	dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND);
 
 	/* signal the disconnect event early to ensure proper teardown */
-	dp_display_handle_plugged_change(g_dp_display, false);
 	reinit_completion(&dp->audio_comp);
+	dp_display_handle_plugged_change(g_dp_display, false);
 
 	dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
 					DP_DP_IRQ_HPD_INT_MASK, true);
@@ -890,6 +890,9 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
 
 	/* wait only if audio was enabled */
 	if (dp_display->audio_enabled) {
+		/* signal the disconnect event */
+		reinit_completion(&dp->audio_comp);
+		dp_display_handle_plugged_change(dp_display, false);
 		if (!wait_for_completion_timeout(&dp->audio_comp,
 				HZ * 5))
 			DRM_ERROR("audio comp timeout\n");
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
  2021-01-28  2:17 ` Judy Hsiao
  (?)
@ 2021-01-28  8:30   ` Stephen Boyd
  -1 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2021-01-28  8:30 UTC (permalink / raw)
  To: Judy Hsiao, linux-kernel
  Cc: Mark Brown, Taniya Das, Rohit kumar, Banajit Goswami,
	Patrick Lai, Andy Gross, Bjorn Andersson, Liam Girdwood,
	Rob Herring, Jaroslav Kysela, Takashi Iwai, Srini Kandagatla,
	Stephan Gerhold, dianders, dgreid, cychiang, tzungbi,
	linux-arm-kernel, linux-arm-msm, devicetree, alsa-devel,
	Judy Hsiao, Judy Hsiao

Quoting Judy Hsiao (2021-01-27 18:17:53)
> 1. Trigger the unplug event in msm_dp_display_disable() to shutdown
>    audio properly.
> 2. Reset the completion before signal the disconnect event.
> 
> Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
> ---

Fixes: 158b9aa74479 ("drm/msm/dp: wait for audio notification before disabling clocks")

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>

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

* Re: [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
@ 2021-01-28  8:30   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2021-01-28  8:30 UTC (permalink / raw)
  To: Judy Hsiao, linux-kernel
  Cc: Taniya Das, alsa-devel, Banajit Goswami, Liam Girdwood,
	Rohit kumar, Patrick Lai, Andy Gross, dgreid, devicetree,
	Judy Hsiao, tzungbi, Stephan Gerhold, linux-arm-msm, Rob Herring,
	Bjorn Andersson, linux-arm-kernel, dianders, cychiang,
	Takashi Iwai, Mark Brown, Srini Kandagatla, Judy Hsiao

Quoting Judy Hsiao (2021-01-27 18:17:53)
> 1. Trigger the unplug event in msm_dp_display_disable() to shutdown
>    audio properly.
> 2. Reset the completion before signal the disconnect event.
> 
> Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
> ---

Fixes: 158b9aa74479 ("drm/msm/dp: wait for audio notification before disabling clocks")

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>

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

* Re: [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
@ 2021-01-28  8:30   ` Stephen Boyd
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2021-01-28  8:30 UTC (permalink / raw)
  To: Judy Hsiao, linux-kernel
  Cc: Taniya Das, alsa-devel, Banajit Goswami, Liam Girdwood,
	Rohit kumar, Patrick Lai, Andy Gross, dgreid, devicetree,
	Judy Hsiao, tzungbi, Stephan Gerhold, linux-arm-msm, Rob Herring,
	Jaroslav Kysela, Bjorn Andersson, linux-arm-kernel, dianders,
	cychiang, Takashi Iwai, Mark Brown, Srini Kandagatla, Judy Hsiao

Quoting Judy Hsiao (2021-01-27 18:17:53)
> 1. Trigger the unplug event in msm_dp_display_disable() to shutdown
>    audio properly.
> 2. Reset the completion before signal the disconnect event.
> 
> Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
> ---

Fixes: 158b9aa74479 ("drm/msm/dp: wait for audio notification before disabling clocks")

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable
  2021-01-28  2:17 ` Judy Hsiao
                   ` (2 preceding siblings ...)
  (?)
@ 2021-03-01 19:59 ` patchwork-bot+linux-arm-msm
  -1 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-01 19:59 UTC (permalink / raw)
  To: Judy Hsiao; +Cc: linux-arm-msm

Hello:

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

On Thu, 28 Jan 2021 10:17:53 +0800 you wrote:
> 1. Trigger the unplug event in msm_dp_display_disable() to shutdown
>    audio properly.
> 2. Reset the completion before signal the disconnect event.
> 
> Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
> ---
>  drivers/gpu/drm/msm/dp/dp_display.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Here is the summary with links:
  - drm/msm/dp: trigger unplug event in msm_dp_display_disable
    https://git.kernel.org/qcom/c/c703d5789590

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] 7+ messages in thread

end of thread, other threads:[~2021-03-01 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  2:17 [PATCH] drm/msm/dp: trigger unplug event in msm_dp_display_disable Judy Hsiao
2021-01-28  2:17 ` Judy Hsiao
2021-01-28  2:17 ` Judy Hsiao
2021-01-28  8:30 ` Stephen Boyd
2021-01-28  8:30   ` Stephen Boyd
2021-01-28  8:30   ` Stephen Boyd
2021-03-01 19:59 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.