drm/msm/a8xx: Add missing preempt_record_size
Subsystems (4)
Rob Clark
maintainerPATCH v2 1/1 drm/msm/a8xx: Add missing preempt_record_size
Somehow this got overlooked, and Glymur/Mahua were falling back to the default 4MB. Which is way too small for the amount of GMEM on these devices, causing faults in cases where preemption needs to save GMEM contents.
---
v2: Fix typo in commit msg
drivers/gpu/drm/msm/adreno/a8xx_catalog.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/msm/adreno/a8xx_catalog.c +2 -0
@@ -1337,6 +1337,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 23088 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },
@@ -1469,6 +1470,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 17712 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },
Signature · 1 line
2.56.1
Quoted 9 lines · Rob Clark
Somehow this got overlooked, and Glymur/Mahua were falling back to the default 4MB. Which is way too small for the amount of GMEM on these devices, causing faults in cases where preemption needs to save GMEM contents.
Reported-by Connor Abbott <[email protected]>Fixes 7fad33097e67 ("drm/msm/a6xx: Enable Preemption on X2-85")Signed-off-by Rob Clark <[email protected]>Reviewed-by Konrad Dybcio <[email protected]>
I think it is a good idea to add a WARN_ONCE when the default size is used.
-Akhil.
Quoted 26 lines
---
v2: Fix typo in commit msgdrivers/gpu/drm/msm/adreno/a8xx_catalog.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/msm/adreno/a8xx_catalog.c +2
-0@@ -1337,6 +1337,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 23088 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },@@ -1469,6 +1470,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 17712 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },
Quoted 9 lines · Akhil P Oommen
Quoted 5 lines · Rob Clark
Somehow this got overlooked, and Glymur/Mahua were falling back to the default 4MB. Which is way too small for the amount of GMEM on these devices, causing faults in cases where preemption needs to save GMEM contents.
Quoted 8 lines
Quoted 4 lines
Reported-by Connor Abbott <[email protected]>Fixes 7fad33097e67 ("drm/msm/a6xx: Enable Preemption on X2-85")Signed-off-by Rob Clark <[email protected]>Reviewed-by Konrad Dybcio <[email protected]>Reviewed-by Akhil P Oommen <[email protected]>I think it is a good idea to add a
WARN_ONCEwhen the default size is used.
More generally, we should probably just warn if the preemption record size is less than gmem size.. (we could probably also make the preemption record size smaller on ring0, I think?)
BR,
-R
Quoted 29 lines
-Akhil.
Quoted 26 lines
---
v2: Fix typo in commit msgdrivers/gpu/drm/msm/adreno/a8xx_catalog.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/msm/adreno/a8xx_catalog.c +2
-0@@ -1337,6 +1337,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 23088 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },@@ -1469,6 +1470,7 @@ static const struct adreno_info a8xx_gpus[] = { { /* sentinel */ }, }, }, + .preempt_record_size = 17712 * SZ_1K, .speedbins = ADRENO_SPEEDBINS( { 0, 0 }, { 388, 1 },