All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yassine Oudjana <yassine.oudjana@gmail.com>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Yassine Oudjana <y.oudjana@protonmail.com>,
	Yassine Oudjana <yassine.oudjana@gmail.com>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: [RFC PATCH 0/2] Make qcom-ngd-ctrl not wait indefinitely for already booted ADSP
Date: Tue, 10 May 2022 18:42:17 +0400	[thread overview]
Message-ID: <20220510144219.806391-1-y.oudjana@protonmail.com> (raw)

Commit a899d324863a3 ("slimbus: qcom-ngd-ctrl: add Sub System Restart support")
made qcom-ngd-ctrl wait for ADSP to become ready before starting to do its work.
Due to how the SSR notifications currently work though, if qcom-ngd-ctrl probes
after ADSP boots and becomes ready, it never receives a QCOM_SSR_AFTER_POWERUP
event notification and keeps waiting indefinitely, making SLIMbus never come up.

This series makes qcom_register_ssr_notifier call the notifier_call of the newly
registered notifier block with the last SSR event received from the remoteproc,
basically reporting the event that qcom-ngd-ctrl missed by registering late,
stopping it from waiting for an event that has already happened.

I'm not sure if this approach would have any unwanted consequences in other
drivers relying on SSR events however, hence I'm sending this as a RFC. This
can also be considered a bug report, so if anyone has a better fix then I'd
appreciate it getting applied instead of this one.

The second patch is a general fix that became necessary after the first patch,
and should likely be applied anyway.

Yassine Oudjana (2):
  remoteproc: qcom: Report last event on SSR notifier registration
  slimbus: qcom-ngd-ctrl: Initialize ngd_up_work before it can be
    scheduled

 drivers/remoteproc/qcom_common.c | 17 +++++++++++++----
 drivers/slimbus/qcom-ngd-ctrl.c  |  3 ++-
 2 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.36.0


WARNING: multiple messages have this Message-ID (diff)
From: Yassine Oudjana <yassine.oudjana@gmail.com>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: alsa-devel@alsa-project.org,
	Yassine Oudjana <y.oudjana@protonmail.com>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Yassine Oudjana <yassine.oudjana@gmail.com>
Subject: [RFC PATCH 0/2] Make qcom-ngd-ctrl not wait indefinitely for already booted ADSP
Date: Tue, 10 May 2022 18:42:17 +0400	[thread overview]
Message-ID: <20220510144219.806391-1-y.oudjana@protonmail.com> (raw)

Commit a899d324863a3 ("slimbus: qcom-ngd-ctrl: add Sub System Restart support")
made qcom-ngd-ctrl wait for ADSP to become ready before starting to do its work.
Due to how the SSR notifications currently work though, if qcom-ngd-ctrl probes
after ADSP boots and becomes ready, it never receives a QCOM_SSR_AFTER_POWERUP
event notification and keeps waiting indefinitely, making SLIMbus never come up.

This series makes qcom_register_ssr_notifier call the notifier_call of the newly
registered notifier block with the last SSR event received from the remoteproc,
basically reporting the event that qcom-ngd-ctrl missed by registering late,
stopping it from waiting for an event that has already happened.

I'm not sure if this approach would have any unwanted consequences in other
drivers relying on SSR events however, hence I'm sending this as a RFC. This
can also be considered a bug report, so if anyone has a better fix then I'd
appreciate it getting applied instead of this one.

The second patch is a general fix that became necessary after the first patch,
and should likely be applied anyway.

Yassine Oudjana (2):
  remoteproc: qcom: Report last event on SSR notifier registration
  slimbus: qcom-ngd-ctrl: Initialize ngd_up_work before it can be
    scheduled

 drivers/remoteproc/qcom_common.c | 17 +++++++++++++----
 drivers/slimbus/qcom-ngd-ctrl.c  |  3 ++-
 2 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.36.0


             reply	other threads:[~2022-05-10 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 14:42 Yassine Oudjana [this message]
2022-05-10 14:42 ` [RFC PATCH 0/2] Make qcom-ngd-ctrl not wait indefinitely for already booted ADSP Yassine Oudjana
2022-05-10 14:42 ` [RFC PATCH 1/2] remoteproc: qcom: Report last event on SSR notifier registration Yassine Oudjana
2022-05-10 14:42   ` Yassine Oudjana
2022-05-10 14:42 ` [RFC PATCH 2/2] slimbus: qcom-ngd-ctrl: Initialize ngd_up_work before it can be scheduled Yassine Oudjana
2022-05-10 14:42   ` Yassine Oudjana

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=20220510144219.806391-1-y.oudjana@protonmail.com \
    --to=yassine.oudjana@gmail.com \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=y.oudjana@protonmail.com \
    /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.