From: Dave Airlie <airl...@redhat.com>

This isn't safe if we have multiple GPUs plugged in, since
there is only one copy of this struct in the bss, just allocate
on stack, it's 108 bytes which should be safe.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index dfc10b1..57ac558 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -7105,7 +7105,7 @@ static void gfx_v8_0_ring_emit_de_meta(struct amdgpu_ring 
*ring)
 {
        uint64_t de_payload_addr, gds_addr, csa_addr;
        int cnt_de;
-       static union {
+       union {
                struct vi_de_ib_state regular;
                struct vi_de_ib_state_chained_ib chained;
        } de_payload = {};
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index deeaee14..6373e00 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3825,7 +3825,7 @@ static void gfx_v9_0_ring_emit_ce_meta(struct amdgpu_ring 
*ring)
 
 static void gfx_v9_0_ring_emit_de_meta(struct amdgpu_ring *ring)
 {
-       static struct v9_de_ib_state de_payload = {0};
+       struct v9_de_ib_state de_payload = {0};
        uint64_t csa_addr, gds_addr;
        int cnt;
 
-- 
2.9.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to