From: khsieh@codeaurora.org
To: Stephen Boyd <swboyd@chromium.org>
Cc: robdclark@gmail.com, sean@poorly.run, tanmay@codeaurora.org,
abhinavk@codeaurora.org, aravindh@codeaurora.org,
airlied@linux.ie, daniel@ffwll.ch, linux-arm-msm@vger.kernel.org,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] drm/msm/dp: initialize audio_comp when audio starts
Date: Thu, 15 Apr 2021 10:40:44 -0700 [thread overview]
Message-ID: <645818ed642db192a252343199ecbcc5@codeaurora.org> (raw)
In-Reply-To: <161843536949.46595.14917924989191979850@swboyd.mtv.corp.google.com>
On 2021-04-14 14:22, Stephen Boyd wrote:
> Quoting Kuogee Hsieh (2021-04-14 14:02:50)
>> Initialize audio_comp when audio starts and wait for audio_comp at
>> dp_display_disable(). This will take care of both dongle unplugged
>> and display off (suspend) cases.
>>
>> Changes in v2:
>> -- add dp_display_start_audio()
>>
>> Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
>
> Looking better. Thanks!
>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c
>> b/drivers/gpu/drm/msm/dp/dp_display.c
>> index 0ba71c7..8a69bcd 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -177,6 +177,14 @@ static int dp_del_event(struct dp_display_private
>> *dp_priv, u32 event)
>>
>> return 0;
>> }
>> +void dp_display_start_audio(struct msm_dp *dp_display)
>
> Please unstick this from previous function by adding a newline above.
>
>> +{
>> + struct dp_display_private *dp;
>> +
>> + dp = container_of(dp_display, struct dp_display_private,
>> dp_display);
>> +
>> + reinit_completion(&dp->audio_comp);
>> +}
>>
>> void dp_display_signal_audio_complete(struct msm_dp *dp_display)
>> {
>> @@ -648,10 +656,6 @@ static int dp_hpd_unplug_handle(struct
>> dp_display_private *dp, u32 data)
>> /* start sentinel checking in case of missing uevent */
>> dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0,
>> DP_TIMEOUT_5_SECOND);
>>
>> - /* signal the disconnect event early to ensure proper teardown
>> */
>
> This doesn't need to be done early anymore? Please mention why in the
> commit text.
>
This is my mistake, it still need signal audio here, will fix it
>> - 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);
>>
>> @@ -894,7 +898,6 @@ 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))
WARNING: multiple messages have this Message-ID (diff)
From: khsieh@codeaurora.org
To: Stephen Boyd <swboyd@chromium.org>
Cc: freedreno@lists.freedesktop.org, airlied@linux.ie,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, abhinavk@codeaurora.org,
tanmay@codeaurora.org, aravindh@codeaurora.org, sean@poorly.run
Subject: Re: [PATCH v2 2/3] drm/msm/dp: initialize audio_comp when audio starts
Date: Thu, 15 Apr 2021 10:40:44 -0700 [thread overview]
Message-ID: <645818ed642db192a252343199ecbcc5@codeaurora.org> (raw)
In-Reply-To: <161843536949.46595.14917924989191979850@swboyd.mtv.corp.google.com>
On 2021-04-14 14:22, Stephen Boyd wrote:
> Quoting Kuogee Hsieh (2021-04-14 14:02:50)
>> Initialize audio_comp when audio starts and wait for audio_comp at
>> dp_display_disable(). This will take care of both dongle unplugged
>> and display off (suspend) cases.
>>
>> Changes in v2:
>> -- add dp_display_start_audio()
>>
>> Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
>
> Looking better. Thanks!
>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c
>> b/drivers/gpu/drm/msm/dp/dp_display.c
>> index 0ba71c7..8a69bcd 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -177,6 +177,14 @@ static int dp_del_event(struct dp_display_private
>> *dp_priv, u32 event)
>>
>> return 0;
>> }
>> +void dp_display_start_audio(struct msm_dp *dp_display)
>
> Please unstick this from previous function by adding a newline above.
>
>> +{
>> + struct dp_display_private *dp;
>> +
>> + dp = container_of(dp_display, struct dp_display_private,
>> dp_display);
>> +
>> + reinit_completion(&dp->audio_comp);
>> +}
>>
>> void dp_display_signal_audio_complete(struct msm_dp *dp_display)
>> {
>> @@ -648,10 +656,6 @@ static int dp_hpd_unplug_handle(struct
>> dp_display_private *dp, u32 data)
>> /* start sentinel checking in case of missing uevent */
>> dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0,
>> DP_TIMEOUT_5_SECOND);
>>
>> - /* signal the disconnect event early to ensure proper teardown
>> */
>
> This doesn't need to be done early anymore? Please mention why in the
> commit text.
>
This is my mistake, it still need signal audio here, will fix it
>> - 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);
>>
>> @@ -894,7 +898,6 @@ 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))
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-04-15 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 21:02 [PATCH v2 2/3] drm/msm/dp: initialize audio_comp when audio starts Kuogee Hsieh
2021-04-14 21:02 ` Kuogee Hsieh
2021-04-14 21:22 ` Stephen Boyd
2021-04-14 21:22 ` Stephen Boyd
2021-04-15 17:40 ` khsieh [this message]
2021-04-15 17:40 ` khsieh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=645818ed642db192a252343199ecbcc5@codeaurora.org \
--to=khsieh@codeaurora.org \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=aravindh@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=tanmay@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.