mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Praveen Talari <praveen.talari@oss.qualcomm.com>,
	david@ixit.cz, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Abel Vesa <abel.vesa@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: qcom-geni: power the console back up on system resume
Date: Thu, 15 Oct 2026 11:35:58 +0200	[thread overview]
Message-ID: <76801e13-ea0e-494f-afbf-8ea02842180e@oss.qualcomm.com> (raw)
In-Reply-To: <54d820a2-5fe8-49e0-bcfd-e2a7bf4df7c1@oss.qualcomm.com>

On 9/18/26 3:28 PM, Praveen Talari wrote:
> Hi David,
> 
> On 18-09-2026 03:44, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>

[...]

> Specifically, is pm_runtime_force_resume() leaving the device in a
> runtime-suspended state despite restoring it from system suspend, or
> is there some interaction with the console's runtime PM reference count
> that prevents the port from being resumed before uart_resume_port() accesses
> the registers?
> 
> A bit more detail on why pm_runtime_force_resume() alone is insufficient
> 
> would help understand the root cause.

GPT came up with the following explanation:

1. qcom_geni_console_setup() takes a runtime-PM reference with
   pm_runtime_resume_and_get(). If the console is registered but no TTY
   is open, that leaves the port with a usage count of 1.

2. With console_suspend_enabled, qcom_geni_serial_suspend() calls
   pm_runtime_force_suspend() after serial-core suspends the port.

3. pm_runtime_force_suspend() considers a device with usage count <= 1
   and no children eligible to remain suspended after system resume. It
   sets the runtime status to suspended without setting
   needs_force_resume.

4. Accordingly, pm_runtime_force_resume() skips the runtime-resume
   callback. It re-enables runtime PM, but does not power the GENI port
   back up.

5. uart_resume_port() restores console termios before its conditional
   TTY startup. If the TTY was never opened, that startup—and its
   runtime-PM get—doesn't happen. The console remains powered down. If a
   TTY was open, startup eventually wakes it, but only after the earlier
   register accesses.

Konrad

      reply	other threads:[~2026-10-15  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 22:14 David Heidelberg via B4 Relay
2026-09-18 13:28 ` Praveen Talari
2026-10-15  9:35   ` Konrad Dybcio [this message]

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=76801e13-ea0e-494f-afbf-8ea02842180e@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=david@ixit.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=praveen.talari@oss.qualcomm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®