drm/amdgpu: NO KIQ usage on nbio hdp flush routine
Subsystems (2)
PATCH 1/1 drm/amdgpu: NO KIQ usage on nbio hdp flush routine
nbio hdp flush routine are called within atomic context. Avoid use KIQ when write to the HDP_MEM_COHERENCY_FLUSH_CNTL register since this register has its own VF copy
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +1 -1
@@ -67,7 +67,7 @@ void nbio_v6_1_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v6_1_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 ); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32 nbio_v6_1_get_memsize (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +1 -1
@@ -65,7 +65,7 @@ void nbio_v7_0_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v7_0_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL,0 ); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32 nbio_v7_0_get_memsize (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/soc15_common.h +7 -0
@@ -77,6 +77,13 @@ struct nbio_pcie_index_data { (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_NO_KIQ (ip, inst, reg, value) \ + WREG32_NO_KIQ( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ + (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ + (2 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG2 + reg : \ + (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ + (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_OFFSET (ip, inst, reg, offset, value) \ WREG32( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \
Signature · 6 lines
1.9.1 _______________________________________________ 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): 1499193166-23187-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Shaoyun Liu
Sent: Tuesday, July 04, 2017 2:33 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routine
Quoted 7 lines
nbio hdp flush routine are called within atomic context. Avoid use KIQ when write to the
HDP_MEM_COHERENCY_FLUSH_CNTLregister
since this register has its own VF copyChange-Id Ia5e2d409f1ea47c67d9e56859b1902bed1b020c6Signed-off-by Shaoyun Liu <[email protected]>
Please split this patch in two, one to add the new macro, the next to convert the nbio code. With that fixed:
Quoted 69 lines
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +1
-1@@ -67,7 +67,7 @@ void nbio_v6_1_mc_access_enable(struct amdgpu_device *adev, bool enable) void nbio_v6_1_hdp_flush(struct amdgpu_device *adev) { - WREG32_SOC15(NBIO, 0, mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 );}
u32
nbio_v6_1_get_memsize(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +1
-1@@ -65,7 +65,7 @@ void nbio_v7_0_mc_access_enable(struct amdgpu_device *adev, bool enable) void nbio_v7_0_hdp_flush(struct amdgpu_device *adev) { - WREG32_SOC15(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0); + WREG32_SOC15_NO_KIQ(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0);}
u32
nbio_v7_0_get_memsize(struct amdgpu_device *adev)drivers/gpu/drm/amd/amdgpu/soc15_common.h +4
-0@@ -77,6 +77,13 @@ struct nbio_pcie_index_data { (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_NO_KIQ (ip, inst, reg, value) \ + WREG32_NO_KIQ( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ + (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ + (2 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG2 +reg : \
drivers/gpu/drm/amd/amdgpu/soc15_common.h +1
-0+ (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 +reg : \
drivers/gpu/drm/amd/amdgpu/soc15_common.h +3
-0+ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_OFFSET (ip, inst, reg, offset, value) \ WREG32( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 +reg : \
--
1.9.1
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): CY4PR12MB1653A95F18F717BF6C3C8107F7D40-rpdhrqHFk06apTa93KjAaQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Liu, Shaoyun
Reviewed-by Alex DeucherThanks .
Split the change as suggested and pushed .
Regards
Shaoyun.liu
-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, July 05, 2017 9:17 AM
To: Liu, Shaoyun; [email protected]
Cc: Liu, Shaoyun
Subject: RE: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routine
Quoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Shaoyun Liu
Sent: Tuesday, July 04, 2017 2:33 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routine
Quoted 6 lines
nbio hdp flush routine are called within atomic context. Avoid use KIQ when write to the
HDP_MEM_COHERENCY_FLUSH_CNTLregister since this register has its own VF copyChange-Id Ia5e2d409f1ea47c67d9e56859b1902bed1b020c6Signed-off-by Shaoyun Liu <[email protected]>
Please split this patch in two, one to add the new macro, the next to convert the nbio code. With that fixed:
Quoted 64 lines
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +1
-1@@ -67,7 +67,7 @@ void nbio_v6_1_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v6_1_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32
nbio_v6_1_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.cb/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c
index aa04632..11b70d6 100644drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +1
-1@@ -65,7 +65,7 @@ void nbio_v7_0_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v7_0_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32
nbio_v7_0_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/soc15_common.hb/drivers/gpu/drm/amd/amdgpu/soc15_common.h
index e2d330e..7a8e4e28 100644drivers/gpu/drm/amd/amdgpu/soc15_common.h +5
-0@@ -77,6 +77,13 @@ struct nbio_pcie_index_data { (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_NO_KIQ (ip, inst, reg, value) \ + WREG32_NO_KIQ( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ + (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ + (2 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG2 + reg : \ + (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 +reg : \
drivers/gpu/drm/amd/amdgpu/soc15_common.h +3
-1+ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_OFFSET (ip, inst, reg, offset, value) \ WREG32( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ --1.9.1
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): DM5PR12MB1179438AC5B0EA81D83224EDF4D40-2J9CzHegvk8p/[email protected]
Quoted 2 lines · Shaoyun
Thanks .
Split the change as suggested and pushed .
Doesn't look like the second patch landed yet. I don't see in queued in gerrit either.
Alex
Quoted 93 lines
Regards
Shaoyun.liu-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, July 05, 2017 9:17 AM
To: Liu, Shaoyun; [email protected]
Cc: Liu, Shaoyun
Subject: RE: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routineQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Shaoyun Liu
Sent: Tuesday, July 04, 2017 2:33 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routineQuoted 6 lines
nbio hdp flush routine are called within atomic context. Avoid use KIQ when write to the
HDP_MEM_COHERENCY_FLUSH_CNTLregister since this register has its own VF copyChange-Id Ia5e2d409f1ea47c67d9e56859b1902bed1b020c6Signed-off-by Shaoyun Liu <[email protected]>Please split this patch in two, one to add the new macro, the next to convert the nbio code. With that fixed:
Reviewed-by Alex Deucher <[email protected]>Quoted 64 lines
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +1
-1@@ -67,7 +67,7 @@ void nbio_v6_1_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v6_1_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32
nbio_v6_1_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.cb/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c
index aa04632..11b70d6 100644drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +1
-1@@ -65,7 +65,7 @@ void nbio_v7_0_mc_access_enable(struct amdgpu_device *adev, bool enable)void nbio_v7_0_hdp_flush (struct amdgpu_device *adev) { -WREG32_SOC15 (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmHDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32
nbio_v7_0_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/soc15_common.hb/drivers/gpu/drm/amd/amdgpu/soc15_common.h
index e2d330e..7a8e4e28 100644drivers/gpu/drm/amd/amdgpu/soc15_common.h +5
-0@@ -77,6 +77,13 @@ struct nbio_pcie_index_data { (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_NO_KIQ (ip, inst, reg, value) \ + WREG32_NO_KIQ( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ + (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ + (2 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG2 + reg : \ + (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 +reg : \
drivers/gpu/drm/amd/amdgpu/soc15_common.h +3
-1+ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_OFFSET (ip, inst, reg, offset, value) \ WREG32( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ --1.9.1
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
A message that is not in the archive (sent off-list or not yet received): CADnq5_PY3X3Z-YTSCN5uDV+v3Z6VxqnmUTBuJ_PiUyVPm=YUPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Let me try again.
Shaoyun.liu
-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: Wednesday, July 05, 2017 1:15 PM
To: Liu, Shaoyun
Cc: Deucher, Alexander; [email protected]
Subject: Re: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routine
Quoted 2 lines · Shaoyun
Thanks .
Split the change as suggested and pushed .
Doesn't look like the second patch landed yet. I don't see in queued in gerrit either.
Alex
Quoted 95 lines
Regards
Shaoyun.liu-----Original Message-----
From: Deucher, Alexander
Sent: Wednesday, July 05, 2017 9:17 AM
To: Liu, Shaoyun; [email protected]
Cc: Liu, Shaoyun
Subject: RE: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routineQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Shaoyun Liu
Sent: Tuesday, July 04, 2017 2:33 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: NO KIQ usage on nbio hdp flush routineQuoted 6 lines
nbio hdp flush routine are called within atomic context. Avoid use KIQ when write to the
HDP_MEM_COHERENCY_FLUSH_CNTLregister since this register has its own VF copyChange-Id Ia5e2d409f1ea47c67d9e56859b1902bed1b020c6Signed-off-by Shaoyun Liu <[email protected]>Please split this patch in two, one to add the new macro, the next to convert the nbio code. With that fixed:
Reviewed-by Alex Deucher <[email protected]>Quoted 65 lines
--- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +1
-1@@ -67,7 +67,7 @@ void nbio_v6_1_mc_access_enable(struct amdgpu_device *adev, bool enable) void nbio_v6_1_hdp_flush(struct amdgpu_device *adev) { - WREG32_SOC15(NBIO, 0, mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL, 0); +WREG32_SOC15_NO_KIQ (NBIO ,0 , mmBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL,0 ); }u32
nbio_v6_1_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.cb/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c
index aa04632..11b70d6 100644drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +1
-1@@ -65,7 +65,7 @@ void nbio_v7_0_mc_access_enable(struct amdgpu_device *adev, bool enable) void nbio_v7_0_hdp_flush(struct amdgpu_device *adev) { - WREG32_SOC15(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0); + WREG32_SOC15_NO_KIQ(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0); }u32
nbio_v7_0_get_memsize(struct amdgpu_device *adev)diff --gita/drivers/gpu/drm/amd/amdgpu/soc15_common.hb/drivers/gpu/drm/amd/amdgpu/soc15_common.h
index e2d330e..7a8e4e28 100644drivers/gpu/drm/amd/amdgpu/soc15_common.h +5
-0@@ -77,6 +77,13 @@ struct nbio_pcie_index_data { (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 + reg : \ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_NO_KIQ (ip, inst, reg, value) \ + WREG32_NO_KIQ( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ + (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 + reg : \ + (2 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG2 + reg : \ + (3 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG3 +reg : \
drivers/gpu/drm/amd/amdgpu/soc15_common.h +3
-0+ (ip##_BASE__INST##inst##_SEG4 + reg))))), value) +#define WREG32_SOC15_OFFSET (ip, inst, reg, offset, value) \ WREG32( (0 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG0 + reg : \ (1 == reg##_BASE_IDX ? ip##_BASE__INST##inst##_SEG1 +reg : \
--
1.9.1
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