drm/msm/adreno: Assign revn to A635
Subsystems (4)
PATCH v2 1/1 drm/msm/adreno: Assign revn to A635
Recently, a WARN_ON() was introduced to ensure that revn is filled before adreno_is_aXYZ is called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.
---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/msm/adreno/adreno_device.c +1 -0
@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",
---
base-commit: 5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417
Best regards,
Signature · 1 line
Konrad Dybcio <[email protected]>
Quoted 8 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>
As the v1:
Quoted 29 lines
---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +1
-1@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin", ---base-commit:
5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>
Signature · 2 lines
With best wishes Dmitry
Quoted 22 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0
drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",
hmm, I realized a problem with this, it would change what MSM_PARAM_GPU_ID and more importantly MSM_PARAM_CHIP_ID return.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.
I think I'm leaning more towards reverting commit cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.
BR,
-R
Quoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>
Quoted 37 lines · Rob Clark
Quoted 22 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",hmm, I realized a problem with this, it would change what
MSM_PARAM_GPU_IDand more importantlyMSM_PARAM_CHIP_IDreturn.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.
Quoted 3 lines
I think I'm leaning more towards reverting commit
cc943f43ece7("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.
This is what I came up with as far as better way to solve this:
https://patchwork.freedesktop.org/series/120108/
BR,
-R
Quoted 12 lines
BR,
-RQuoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>
Quoted 28 lines · Rob Clark
Quoted 26 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = {
Quoted 8 lines
drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 3 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0[ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",hmm, I realized a problem with this, it would change what
MSM_PARAM_GPU_IDand more importantlyMSM_PARAM_CHIP_IDreturn.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.
I'd say MSM_PARAM_GPU_ID is broken for 635 anyway (won't it return 0 in this case)?
So the new value should be correct.
But more importantly, why are we exporting speedbin in MSM_PARAM_CHIP_ID only if there is no revn? And why are we exporting the speedbin at all as a part of CHIP_ID?
Quoted 17 lines
I think I'm leaning more towards reverting commit
cc943f43ece7("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.BR,
-RQuoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>
Signature · 2 lines
With best wishes Dmitry
Quoted 39 lines · Dmitry Baryshkov
Quoted 28 lines · Rob Clark
Quoted 26 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = {Quoted 8 lines
drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 3 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0[ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",hmm, I realized a problem with this, it would change what
MSM_PARAM_GPU_IDand more importantlyMSM_PARAM_CHIP_IDreturn.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.
Quoted 3 lines
I'd say
MSM_PARAM_GPU_IDis broken for 635 anyway (won't it return 0 in this case)?
So the new value should be correct.
no, it is very much intentional that GPU_ID returns 0 for newer GPUs, userspace should be matching on CHIP_ID. (Also, we should be moving away from trying to infer generation/etc from CHIP_ID.. userspace is farther ahead of the kernel on this.)
Quoted 3 lines
But more importantly, why are we exporting speedbin in
MSM_PARAM_CHIP_IDonly if there is no revn? And why are we exporting the speedbin at all as a part ofCHIP_ID?
Basically just being paranoid about not changing uabi. It probably would be ok to export the speedbin for all, but I'd have to double check mesa version history.
BR,
-R
Quoted 23 lines
Quoted 17 lines
I think I'm leaning more towards reverting commit
cc943f43ece7("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.BR,
-RQuoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>--
With best wishes
Dmitry
Quoted 41 lines · Rob Clark
Quoted 39 lines · Dmitry Baryshkov
Quoted 36 lines · Rob Clark
Quoted 22 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",hmm, I realized a problem with this, it would change what
MSM_PARAM_GPU_IDand more importantlyMSM_PARAM_CHIP_IDreturn.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.
Quoted 8 lines
Quoted 3 lines
I'd say
MSM_PARAM_GPU_IDis broken for 635 anyway (won't it return 0 in this case)?
So the new value should be correct.no, it is very much intentional that
GPU_IDreturns 0 for newer GPUs, userspace should be matching onCHIP_ID. (Also, we should be moving away from trying to infer generation/etc fromCHIP_ID.. userspace is farther ahead of the kernel on this.)
Thanks for the explanation. So in theory we can change this to always return 0? Or must we keep it to keep UABI / compatibility?
I'm trying to understand if we can drop revn at all.
Quoted 8 lines
Quoted 4 lines
But more importantly, why are we exporting speedbin in
MSM_PARAM_CHIP_IDonly if there is no revn? And why are we exporting the speedbin at all as a part ofCHIP_ID?Basically just being paranoid about not changing uabi. It probably would be ok to export the speedbin for all, but I'd have to double check mesa version history.
Thanks!
Quoted 27 lines
BR,
-RQuoted 23 lines
Quoted 17 lines
I think I'm leaning more towards reverting commit
cc943f43ece7("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.BR,
-RQuoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>--
With best wishes
Dmitry
Signature · 2 lines
With best wishes Dmitry
Quoted 52 lines · Dmitry Baryshkov
Quoted 41 lines · Rob Clark
Quoted 39 lines · Dmitry Baryshkov
Quoted 36 lines · Rob Clark
Quoted 22 lines · Konrad Dybcio
Recently, a
WARN_ON()was introduced to ensure that revn is filled beforeadreno_is_aXYZis called. This however doesn't work very well when revn is 0 by design (such as for A635). Fill it in as a stopgap solution for -fixes.Fixes cc943f43ece7 ("drm/msm/adreno: warn if chip revn is verified before being set")Signed-off-by Konrad Dybcio <[email protected]>---
Changes in v2:
- add fixes
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/msm/adreno/adreno_device.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/msm/adreno/adreno_device.c +0
-0drivers/gpu/drm/msm/adreno/adreno_device.c static const struct adreno_info gpulist[] = { · line 351
Quoted 7 lines
drivers/gpu/drm/msm/adreno/adreno_device.c +1
-0@@ -345,6 +345,7 @@ static const struct adreno_info gpulist[] = { .address_space_size = SZ_16G, }, { .rev = ADRENO_REV(6, 3, 5, ANY_ID), + .revn = 635, .fw = { [ADRENO_FW_SQE] = "a660_sqe.fw", [ADRENO_FW_GMU] = "a660_gmu.bin",hmm, I realized a problem with this, it would change what
MSM_PARAM_GPU_IDand more importantlyMSM_PARAM_CHIP_IDreturn.. The former should be "harmless", although it isn't a good idea for uabi changes to be a side effect of a fix. The latter is more problematic.Quoted 8 lines
Quoted 3 lines
I'd say
MSM_PARAM_GPU_IDis broken for 635 anyway (won't it return 0 in this case)?
So the new value should be correct.no, it is very much intentional that
GPU_IDreturns 0 for newer GPUs, userspace should be matching onCHIP_ID. (Also, we should be moving away from trying to infer generation/etc fromCHIP_ID.. userspace is farther ahead of the kernel on this.)
Quoted 4 lines
Thanks for the explanation. So in theory we can change this to always return 0? Or must we keep it to keep UABI / compatibility?
I'm trying to understand if we can drop revn at all.
I'm not sure how likely it is that someone would try a very old mesa with a new kernel, but that combo would break if we dropped revn completely and returned 0 for GPU_ID. But I would like to move away from using revn internally. (And probably move away from the patch-id wildcard matching, and instead just explicitly list all known patch-id values so we can start treating CHIP_ID as just an opaque identifier.)
BR,
-R
Quoted 44 lines
Quoted 9 lines
Quoted 5 lines
But more importantly, why are we exporting speedbin in
MSM_PARAM_CHIP_IDonly if there is no revn? And why are we exporting the speedbin at all as a part ofCHIP_ID?Basically just being paranoid about not changing uabi. It probably would be ok to export the speedbin for all, but I'd have to double check mesa version history.
Thanks!
Quoted 27 lines
BR,
-RQuoted 23 lines
Quoted 17 lines
I think I'm leaning more towards reverting commit
cc943f43ece7("drm/msm/adreno: warn if chip revn is verified before being set") for -fixes. I'm still thinking about options for a longer term fix.BR,
-RQuoted 8 lines
---
base-commit:5c875096d59010cee4e00da1f9c7bdb07a025dc2
change-id: 20230628-topic-a635-1b3c2c987417Best regards,
--
Konrad Dybcio <[email protected]>--
With best wishes
Dmitry--
With best wishes
Dmitry