]>
Commit | Line | Data |
---|---|---|
84b52de0 SL |
1 | From 9f068bad6f390749bde939fce64095b4cda7afbe Mon Sep 17 00:00:00 2001 |
2 | From: Sasha Levin <sashal@kernel.org> | |
3 | Date: Fri, 22 Mar 2024 16:45:25 +0000 | |
4 | Subject: drm/panfrost: fix power transition timeout warnings | |
5 | ||
6 | From: Christian Hewitt <christianshewitt@gmail.com> | |
7 | ||
8 | [ Upstream commit 2bd02f5a0bac4bb13e0da18652dc75ba0e4958ec ] | |
9 | ||
10 | Increase the timeout value to prevent system logs on Amlogic boards flooding | |
11 | with power transition warnings: | |
12 | ||
13 | [ 13.047638] panfrost ffe40000.gpu: shader power transition timeout | |
14 | [ 13.048674] panfrost ffe40000.gpu: l2 power transition timeout | |
15 | [ 13.937324] panfrost ffe40000.gpu: shader power transition timeout | |
16 | [ 13.938351] panfrost ffe40000.gpu: l2 power transition timeout | |
17 | ... | |
18 | [39829.506904] panfrost ffe40000.gpu: shader power transition timeout | |
19 | [39829.507938] panfrost ffe40000.gpu: l2 power transition timeout | |
20 | [39949.508369] panfrost ffe40000.gpu: shader power transition timeout | |
21 | [39949.509405] panfrost ffe40000.gpu: l2 power transition timeout | |
22 | ||
23 | The 2000 value has been found through trial and error testing with devices | |
24 | using G52 and G31 GPUs. | |
25 | ||
26 | Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()") | |
27 | Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> | |
28 | Reviewed-by: Steven Price <steven.price@arm.com> | |
29 | Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | |
30 | Signed-off-by: Steven Price <steven.price@arm.com> | |
31 | Link: https://patchwork.freedesktop.org/patch/msgid/20240322164525.2617508-1-christianshewitt@gmail.com | |
32 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
33 | --- | |
34 | drivers/gpu/drm/panfrost/panfrost_gpu.c | 6 +++--- | |
35 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
36 | ||
37 | diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c | |
38 | index 55d2430485168..40b6314459926 100644 | |
39 | --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c | |
40 | +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c | |
41 | @@ -379,19 +379,19 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev) | |
42 | ||
43 | gpu_write(pfdev, SHADER_PWROFF_LO, pfdev->features.shader_present); | |
44 | ret = readl_relaxed_poll_timeout(pfdev->iomem + SHADER_PWRTRANS_LO, | |
45 | - val, !val, 1, 1000); | |
46 | + val, !val, 1, 2000); | |
47 | if (ret) | |
48 | dev_err(pfdev->dev, "shader power transition timeout"); | |
49 | ||
50 | gpu_write(pfdev, TILER_PWROFF_LO, pfdev->features.tiler_present); | |
51 | ret = readl_relaxed_poll_timeout(pfdev->iomem + TILER_PWRTRANS_LO, | |
52 | - val, !val, 1, 1000); | |
53 | + val, !val, 1, 2000); | |
54 | if (ret) | |
55 | dev_err(pfdev->dev, "tiler power transition timeout"); | |
56 | ||
57 | gpu_write(pfdev, L2_PWROFF_LO, pfdev->features.l2_present); | |
58 | ret = readl_poll_timeout(pfdev->iomem + L2_PWRTRANS_LO, | |
59 | - val, !val, 0, 1000); | |
60 | + val, !val, 0, 2000); | |
61 | if (ret) | |
62 | dev_err(pfdev->dev, "l2 power transition timeout"); | |
63 | } | |
64 | -- | |
65 | 2.43.0 | |
66 |