From: Steven Price <steven.price@arm.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
boris.brezillon@collabora.com
Cc: robh@kernel.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, wenst@chromium.org,
kernel@collabora.com
Subject: Re: [PATCH v2 2/6] drm/panfrost: Tighten polling for soft reset and power on
Date: Wed, 8 Nov 2023 15:44:44 +0000 [thread overview]
Message-ID: <00029aa9-6a28-4f7f-bc96-cdf8c6820ea0@arm.com> (raw)
In-Reply-To: <20231102142643.75288-3-angelogioacchino.delregno@collabora.com>
On 02/11/2023 14:26, AngeloGioacchino Del Regno wrote:
> In many cases, soft reset takes more than 1 microsecond, but definitely
> less than 10; moreover in the poweron flow, tilers, shaders and l2 will
> become ready (each) in less than 10 microseconds as well.
>
> Even in the cases (at least on my platforms, rarely) in which those take
> more than 10 microseconds, it's very unlikely to see both soft reset and
> poweron to take more than 70 microseconds.
>
> Shorten the polling delay to 10 microseconds to consistently reduce the
> runtime resume time of the GPU.
>
> As an indicative example, measurements taken on a MediaTek MT8195 SoC
>
> Average runtime resume time in nanoseconds before this commit:
> GDM, user selection up/down: 88435ns
> GDM, Text Entry (typing user/password): 91489ns
> GNOME Desktop, idling, GKRELLM running: 73200ns
>
> After this commit:
>
> GDM: user selection up/down: 26690ns
> GDM: Text Entry (typing user/password): 27917ns
> GNOME Desktop, idling, GKRELLM running: 25304ns
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_gpu.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> index 7e9e2cf26e4d..e264e8c2252d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
> @@ -63,7 +63,7 @@ int panfrost_gpu_soft_reset(struct panfrost_device *pfdev)
>
> gpu_write(pfdev, GPU_CMD, GPU_CMD_SOFT_RESET);
> ret = readl_relaxed_poll_timeout(pfdev->iomem + GPU_INT_RAWSTAT,
> - val, val & GPU_IRQ_RESET_COMPLETED, 100, 10000);
> + val, val & GPU_IRQ_RESET_COMPLETED, 10, 10000);
> if (ret) {
> dev_err(pfdev->dev, "gpu soft reset timed out, attempting hard reset\n");
>
> @@ -403,7 +403,7 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
> gpu_write(pfdev, L2_PWRON_LO, pfdev->features.l2_present & core_mask);
> ret = readl_relaxed_poll_timeout(pfdev->iomem + L2_READY_LO,
> val, val == (pfdev->features.l2_present & core_mask),
> - 100, 20000);
> + 10, 20000);
> if (ret)
> dev_err(pfdev->dev, "error powering up gpu L2");
>
> @@ -411,13 +411,13 @@ void panfrost_gpu_power_on(struct panfrost_device *pfdev)
> pfdev->features.shader_present & core_mask);
> ret = readl_relaxed_poll_timeout(pfdev->iomem + SHADER_READY_LO,
> val, val == (pfdev->features.shader_present & core_mask),
> - 100, 20000);
> + 10, 20000);
> if (ret)
> dev_err(pfdev->dev, "error powering up gpu shader");
>
> gpu_write(pfdev, TILER_PWRON_LO, pfdev->features.tiler_present);
> ret = readl_relaxed_poll_timeout(pfdev->iomem + TILER_READY_LO,
> - val, val == pfdev->features.tiler_present, 100, 1000);
> + val, val == pfdev->features.tiler_present, 10, 1000);
> if (ret)
> dev_err(pfdev->dev, "error powering up gpu tiler");
> }
next prev parent reply other threads:[~2023-11-08 15:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 14:26 [PATCH v2 0/6] drm/panfrost: Turn off clocks and regulators in PM AngeloGioacchino Del Regno
2023-11-02 14:26 ` [PATCH v2 1/6] drm/panfrost: Perform hard reset to recover GPU if soft reset fails AngeloGioacchino Del Regno
2023-11-08 15:44 ` Steven Price
2023-11-02 14:26 ` [PATCH v2 2/6] drm/panfrost: Tighten polling for soft reset and power on AngeloGioacchino Del Regno
2023-11-08 15:44 ` Steven Price [this message]
2023-11-02 14:26 ` [PATCH v2 3/6] drm/panfrost: Implement ability to turn on/off GPU clocks in suspend AngeloGioacchino Del Regno
2023-11-03 5:12 ` Chen-Yu Tsai
2023-11-03 8:54 ` AngeloGioacchino Del Regno
2023-11-03 8:58 ` Chen-Yu Tsai
2023-11-08 15:44 ` Steven Price
2023-11-09 9:53 ` AngeloGioacchino Del Regno
2023-11-02 14:26 ` [PATCH v2 4/6] drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs AngeloGioacchino Del Regno
2023-11-08 15:44 ` Steven Price
2023-11-02 14:26 ` [PATCH v2 5/6] drm/panfrost: Implement ability to turn on/off regulators in suspend AngeloGioacchino Del Regno
2023-11-08 15:44 ` Steven Price
2023-11-02 14:26 ` [PATCH v2 6/6] drm/panfrost: Set regulators on/off during system sleep on MediaTek SoCs AngeloGioacchino Del Regno
2023-11-08 15:45 ` 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=00029aa9-6a28-4f7f-bc96-cdf8c6820ea0@arm.com \
--to=steven.price@arm.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=tzimmermann@suse.de \
--cc=wenst@chromium.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 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®