From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Alexander Usyskin <alexander.usyskin@intel.com>,
dri-devel@lists.freedesktop.org, Vivi@kroah.com,
Rodrigo <rodrigo.vivi@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: Re: [Intel-gfx] [PATCH v7 1/6] mei: mei-me: resume device in prepare
Date: Fri, 27 Jan 2023 10:08:57 +0100 [thread overview]
Message-ID: <Y9OUqX07ndB0U1AP@kroah.com> (raw)
In-Reply-To: <20230125082637.118970-2-alan.previn.teres.alexis@intel.com>
On Wed, Jan 25, 2023 at 12:26:32AM -0800, Alan Previn wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
>
> Asynchronous runtime resume is not possible while the system
> is suspending.
> The power management subsystem resumes the device only in the
> suspend phase, not in the prepare phase.
> Force resume device in prepare to allow drivers on mei bus
> to communicate in their prepare callbacks.
>
> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> ---
> drivers/misc/mei/pci-me.c | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
> index 5bf0d50d55a0..676d566f38dd 100644
> --- a/drivers/misc/mei/pci-me.c
> +++ b/drivers/misc/mei/pci-me.c
> @@ -342,6 +342,12 @@ static void mei_me_remove(struct pci_dev *pdev)
> }
>
> #ifdef CONFIG_PM_SLEEP
> +static int mei_me_pci_prepare(struct device *device)
> +{
> + pm_runtime_resume(device);
> + return 0;
> +}
> +
> static int mei_me_pci_suspend(struct device *device)
> {
> struct pci_dev *pdev = to_pci_dev(device);
> @@ -398,7 +404,17 @@ static int mei_me_pci_resume(struct device *device)
>
> return 0;
> }
> -#endif /* CONFIG_PM_SLEEP */
> +
> +static void mei_me_pci_complete(struct device *device)
> +{
> + pm_runtime_suspend(device);
> +}
> +#else /* CONFIG_PM_SLEEP */
> +
> +#define mei_me_pci_prepare NULL
> +#define mei_me_pci_complete NULL
> +
> +#endif /* !CONFIG_PM_SLEEP */
>
> #ifdef CONFIG_PM
> static int mei_me_pm_runtime_idle(struct device *device)
> @@ -501,6 +517,8 @@ static inline void mei_me_unset_pm_domain(struct mei_device *dev)
> }
>
> static const struct dev_pm_ops mei_me_pm_ops = {
> + .prepare = mei_me_pci_prepare,
> + .complete = mei_me_pci_complete,
> SET_SYSTEM_SLEEP_PM_OPS(mei_me_pci_suspend,
> mei_me_pci_resume)
> SET_RUNTIME_PM_OPS(
> --
> 2.39.0
>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
next prev parent reply other threads:[~2023-01-27 9:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 8:26 [Intel-gfx] [PATCH v7 0/6] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown Alan Previn
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 1/6] mei: mei-me: resume device in prepare Alan Previn
2023-01-27 9:08 ` Greg Kroah-Hartman [this message]
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 2/6] drm/i915/pxp: add device link between i915 and mei_pxp Alan Previn
2023-01-25 15:53 ` Rodrigo Vivi
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 3/6] mei: clean pending read with vtag on bus Alan Previn
2023-01-25 17:28 ` Rodrigo Vivi
2023-01-25 18:01 ` Greg Kroah-Hartman
2023-01-27 9:09 ` Greg Kroah-Hartman
2023-01-27 19:07 ` Teres Alexis, Alan Previn
2023-01-27 20:26 ` Rodrigo Vivi
2023-01-27 9:08 ` Greg Kroah-Hartman
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 4/6] drm/i915/pxp: Invalidate all PXP fw sessions during teardown Alan Previn
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 5/6] drm/i915/pxp: Trigger the global teardown for before suspending Alan Previn
2023-01-25 8:26 ` [Intel-gfx] [PATCH v7 6/6] drm/i915/pxp: Pxp hw init should be in resume_complete Alan Previn
2023-01-25 9:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pxp: Add missing cleanup steps for PXP global-teardown Patchwork
2023-01-25 15:11 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=Y9OUqX07ndB0U1AP@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Vivi@kroah.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=tomas.winkler@intel.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