Skip to contentSkip to conversation

drm/amdgpu: drop GB_GPU_ID from the golden settings

PATCH In review Christian König 2 participants 5 messages Mar 24, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: drop GB_GPU_ID from the golden settings

From: Christian König <[email protected]>

That register is marked deprecated, reading it results in a bus error.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -1
index ad82ab7..b196431 100644
@@ -88,7 +88,6 @@ static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
 static const u32 golden_settings_gc_9_0[] =
 {
 	SOC15_REG_OFFSET(GC, 0, mmDB_DEBUG2), 0xf00ffeff, 0x00000400,
-	SOC15_REG_OFFSET(GC, 0, mmGB_GPU_ID), 0x0000000f, 0x00000000,
 	SOC15_REG_OFFSET(GC, 0, mmPA_SC_BINNER_EVENT_CNTL_3), 0x00000003, 0x82400024,
 	SOC15_REG_OFFSET(GC, 0, mmPA_SC_ENHANCE), 0x3fffffff, 0x00000001,
 	SOC15_REG_OFFSET(GC, 0, mmPA_SC_LINE_STIPPLE_STATE), 0x0000ff0f, 0x00000000,
Signature · 6 lines
2.5.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1490368157-1951-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#2 lore raw

PATCH 2/2 drm/amdgpu: sanitize soc15_allowed_read_registers

From: Christian König <[email protected]>

Disallow mmCC_RB_BACKEND_DISABLE, reading it can cause GRBM problems and the same info is available cached as enabled_rb_pipes_mask.

Also remove duplicate mmCP_CPF_BUSY_STAT.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -2
index 7e54d9dc..be0d47f 100644
@@ -296,11 +296,9 @@ static struct amdgpu_allowed_register_entry soc15_allowed_read_registers[] = {
 	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
 	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STALLED_STAT1), false},
 	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STATUS), false},
-	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
 	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STALLED_STAT1), false},
 	{ SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STATUS), false},
 	{ SOC15_REG_OFFSET(GC, 0, mmGB_ADDR_CONFIG), false},
-	{ SOC15_REG_OFFSET(GC, 0, mmCC_RB_BACKEND_DISABLE), false, true},
 	{ SOC15_REG_OFFSET(GC, 0, mmGC_USER_RB_BACKEND_DISABLE), false, true},
 	{ SOC15_REG_OFFSET(GC, 0, mmGB_BACKEND_MAP), false, false},
 };
Signature · 6 lines
2.5.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1490368157-1951-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] drm/amdgpu: sanitize soc15_allowed_read_registers

Quoted 4 lines · Christian König

From: Christian König <[email protected]>

Disallow mmCC_RB_BACKEND_DISABLE, reading it can cause GRBM problems and the same info is available cached as enabled_rb_pipes_mask.

NACK. We need to implement the caching anyway for sr-iov. We can just port the cache changes over from VI. Have you started looking at that yet?

Alex

Quoted 27 lines

Also remove duplicate mmCP_CPF_BUSY_STAT.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -3
index 7e54d9dc..be0d47f 100644
@@ -296,11 +296,9 @@ static struct amdgpu_allowed_register_entry soc15_allowed_read_registers[] = {
        { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
        { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STALLED_STAT1), false},
        { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STATUS), false},
-       { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
        { SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STALLED_STAT1), false},
        { SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STATUS), false},
        { SOC15_REG_OFFSET(GC, 0, mmGB_ADDR_CONFIG), false},
-       { SOC15_REG_OFFSET(GC, 0, mmCC_RB_BACKEND_DISABLE), false, true},
        { SOC15_REG_OFFSET(GC, 0, mmGC_USER_RB_BACKEND_DISABLE), false, true},
        { SOC15_REG_OFFSET(GC, 0, mmGB_BACKEND_MAP), false, false},
 };
--

2.5.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_N9Tm9Cf-Bzbmyy3A8koPwtLpM7r+x89jsxKUDiuxifig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Re: [PATCH 2/2] drm/amdgpu: sanitize soc15_allowed_read_registers

Am 24.03.2017 um 19:38 schrieb Alex Deucher:

Quoted 9 lines
Quoted 4 lines · Christian König

From: Christian König <[email protected]>

Disallow mmCC_RB_BACKEND_DISABLE, reading it can cause GRBM problems and the same info is available cached as enabled_rb_pipes_mask.

NACK. We need to implement the caching anyway for sr-iov. We can just port the cache changes over from VI. Have you started looking at that yet?

Yeah, had that halve way implemented and then realized that the registers aren't used by userspace any more.

The only user was addrlib and even there it actually looks incorrect to me.

Ken already had that mostly fixed in libdrm, but somehow missed that one. Going to send out libdrm changes to not read from it as well.

Additional to that it is completely pointless to read the register again when the info query already has everything from it anyway.

Christian.

Quoted 29 lines

Alex

Quoted 26 lines

Also remove duplicate mmCP_CPF_BUSY_STAT.

---
  drivers/gpu/drm/amd/amdgpu/soc15.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -3
index 7e54d9dc..be0d47f 100644
@@ -296,11 +296,9 @@ static struct amdgpu_allowed_register_entry soc15_allowed_read_registers[] = {
         { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
         { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STALLED_STAT1), false},
         { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_STATUS), false},
-       { SOC15_REG_OFFSET(GC, 0, mmCP_CPF_BUSY_STAT), false},
         { SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STALLED_STAT1), false},
         { SOC15_REG_OFFSET(GC, 0, mmCP_CPC_STATUS), false},
         { SOC15_REG_OFFSET(GC, 0, mmGB_ADDR_CONFIG), false},
-       { SOC15_REG_OFFSET(GC, 0, mmCC_RB_BACKEND_DISABLE), false, true},
         { SOC15_REG_OFFSET(GC, 0, mmGC_USER_RB_BACKEND_DISABLE), false, true},
         { SOC15_REG_OFFSET(GC, 0, mmGB_BACKEND_MAP), false, false},
  };
--

2.5.0

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#7 lore raw
In reply to a message not in the archive
Quoted 5 lines · Christian König

From: Christian König <[email protected]>

That register is marked deprecated, reading it results in a bus error.

Might want to compare with the latest golden register list in CAIL to see if it's already removed and pick up any additional changes if there are any. Otherwise:

Alex

Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -2
index ad82ab7..b196431 100644
@@ -88,7 +88,6 @@ static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
 static const u32 golden_settings_gc_9_0[] =
 {
        SOC15_REG_OFFSET(GC, 0, mmDB_DEBUG2), 0xf00ffeff, 0x00000400,
-       SOC15_REG_OFFSET(GC, 0, mmGB_GPU_ID), 0x0000000f, 0x00000000,
        SOC15_REG_OFFSET(GC, 0, mmPA_SC_BINNER_EVENT_CNTL_3), 0x00000003, 0x82400024,
        SOC15_REG_OFFSET(GC, 0, mmPA_SC_ENHANCE), 0x3fffffff, 0x00000001,
        SOC15_REG_OFFSET(GC, 0, mmPA_SC_LINE_STIPPLE_STATE), 0x0000ff0f, 0x00000000,
--

2.5.0

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx