All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Price <steven.price@arm.com>
To: Rob Herring <robh@kernel.org>, dri-devel@lists.freedesktop.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Robin Murphy <robin.murphy@arm.com>,
	David Airlie <airlied@linux.ie>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>,
	Sean Paul <sean@poorly.run>
Subject: Re: [PATCH v2 1/8] drm/panfrost: Fix possible suspend in panfrost_remove
Date: Fri, 23 Aug 2019 15:50:51 +0100	[thread overview]
Message-ID: <b1600c03-56f9-0291-24ee-a70f86b66d91@arm.com> (raw)
In-Reply-To: <20190823021216.5862-2-robh@kernel.org>

On 23/08/2019 03:12, Rob Herring wrote:
> Calls to panfrost_device_fini() access the h/w, but we already done a
> pm_runtime_put_sync_autosuspend() beforehand. This only works if the
> autosuspend delay is long enough. A 0ms delay will hang the system when
> removing the device. Fix this by moving the pm_runtime_put_sync_suspend()
> after the panfrost_device_fini() call.
> 
> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Cc: Steven Price <steven.price@arm.com>
> Cc: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Rob Herring <robh@kernel.org>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
> v2: new patch
> 
>   drivers/gpu/drm/panfrost/panfrost_drv.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 44a558c6e17e..d74442d71048 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -570,11 +570,13 @@ static int panfrost_remove(struct platform_device *pdev)
>   
>   	drm_dev_unregister(ddev);
>   	panfrost_gem_shrinker_cleanup(ddev);
> +
>   	pm_runtime_get_sync(pfdev->dev);
> -	pm_runtime_put_sync_autosuspend(pfdev->dev);
> -	pm_runtime_disable(pfdev->dev);
>   	panfrost_devfreq_fini(pfdev);
>   	panfrost_device_fini(pfdev);
> +	pm_runtime_put_sync_suspend(pfdev->dev);
> +	pm_runtime_disable(pfdev->dev);
> +
>   	drm_dev_put(ddev);
>   	return 0;
>   }
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-08-23 14:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23  2:12 (unknown) Rob Herring
2019-08-23  2:12 ` [PATCH v2 1/8] drm/panfrost: Fix possible suspend in panfrost_remove Rob Herring
2019-08-23 14:50   ` Steven Price [this message]
2019-08-23  2:12 ` [PATCH v2 2/8] drm/panfrost: Rework runtime PM initialization Rob Herring
2019-08-23 10:54   ` Robin Murphy
2019-08-23 12:16     ` Rob Herring
2019-08-23  2:12 ` [PATCH v2 3/8] drm/panfrost: Hold runtime PM reference until jobs complete Rob Herring
2019-08-23 14:50   ` Steven Price
2019-08-23 15:13     ` Rob Herring
2019-08-23  2:12 ` [PATCH v2 4/8] drm/shmem: Do dma_unmap_sg before purging pages Rob Herring
2019-08-23  2:12 ` [PATCH v2 5/8] drm/shmem: Use mutex_trylock in drm_gem_shmem_purge Rob Herring
2019-08-23 14:53   ` Steven Price
2019-08-23  2:12 ` [PATCH v2 6/8] drm/panfrost: Use mutex_trylock in panfrost_gem_purge Rob Herring
2019-08-23 14:55   ` Steven Price
2019-08-23  2:12 ` [PATCH v2 7/8] drm/panfrost: Rework page table flushing and runtime PM interaction Rob Herring
2019-08-23 11:11   ` Robin Murphy
2019-08-23 15:05     ` Steven Price
2019-08-23 15:44       ` Robin Murphy
2019-08-23 15:57         ` Rob Herring
2019-08-23 16:16           ` Robin Murphy
2019-08-23 16:45             ` Rob Herring
2019-08-23 15:09   ` Steven Price
2019-08-23 15:49     ` Rob Herring
2019-08-23  2:12 ` [PATCH v2 8/8] drm/panfrost: Remove unnecessary flushing from tlb_inv_context Rob Herring
2019-08-23 12:56   ` Robin Murphy
2019-08-23 13:18     ` Rob Herring
2019-08-23 14:05       ` Robin Murphy
2019-08-23 14:26         ` Rob Herring
2019-08-23 14:56           ` Robin Murphy
2019-08-23 15:12   ` Steven Price

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=b1600c03-56f9-0291-24ee-a70f86b66d91@arm.com \
    --to=steven.price@arm.com \
    --cc=airlied@linux.ie \
    --cc=alyssa.rosenzweig@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sean@poorly.run \
    --cc=tomeu.vizoso@collabora.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.