* [PATCH 0/8] The vega10 sriov still need those patches
@ 2018-04-03 9:07 Emily Deng
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
For vega10 sriov, still need to use one package for invalidate tlb
flush
Emily Deng (8):
Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring
callback""
Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring
callback""
Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring
callback""
Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring
callback""
Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring
callback""
Revert "Revert "drm/amdgpu/gmc9: use
amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""
Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""
drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 20 ++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7 +++++++
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++++++++
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++-----
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 +
9 files changed, 50 insertions(+), 5 deletions(-)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-03 9:07 ` Emily Deng
2018-04-03 9:07 ` [PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: " Emily Deng
` (7 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit cd1f3f010b9ab5f06612cf775b32bdba599f59d7.
The vega10 sriov still need these patches
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 20 ++++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 7 +++++++
3 files changed, 28 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index ed5c22b..3557bed 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1805,6 +1805,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
#define amdgpu_ring_emit_rreg(r, d) (r)->funcs->emit_rreg((r), (d))
#define amdgpu_ring_emit_wreg(r, d, v) (r)->funcs->emit_wreg((r), (d), (v))
#define amdgpu_ring_emit_reg_wait(r, d, v, m) (r)->funcs->emit_reg_wait((r), (d), (v), (m))
+#define amdgpu_ring_emit_reg_write_reg_wait(r, d0, d1, v, m) (r)->funcs->emit_reg_write_reg_wait((r), (d0), (d1), (v), (m))
#define amdgpu_ring_emit_tmz(r, b) (r)->funcs->emit_tmz((r), (b))
#define amdgpu_ring_pad_ib(r, ib) ((r)->funcs->pad_ib((r), (ib)))
#define amdgpu_ring_init_cond_exec(r) (r)->funcs->init_cond_exec((r))
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index d5f526f..49cad08 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -459,6 +459,26 @@ void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring)
spin_unlock(&adev->ring_lru_list_lock);
}
+/**
+ * amdgpu_ring_emit_reg_write_reg_wait_helper - ring helper
+ *
+ * @adev: amdgpu_device pointer
+ * @reg0: register to write
+ * @reg1: register to wait on
+ * @ref: reference value to write/wait on
+ * @mask: mask to wait on
+ *
+ * Helper for rings that don't support write and wait in a
+ * single oneshot packet.
+ */
+void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
+ uint32_t reg0, uint32_t reg1,
+ uint32_t ref, uint32_t mask)
+{
+ amdgpu_ring_emit_wreg(ring, reg0, ref);
+ amdgpu_ring_emit_reg_wait(ring, reg1, mask, mask);
+}
+
/*
* Debugfs info
*/
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 1d0d250..0b08d87 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -152,6 +152,9 @@ struct amdgpu_ring_funcs {
void (*emit_wreg)(struct amdgpu_ring *ring, uint32_t reg, uint32_t val);
void (*emit_reg_wait)(struct amdgpu_ring *ring, uint32_t reg,
uint32_t val, uint32_t mask);
+ void (*emit_reg_write_reg_wait)(struct amdgpu_ring *ring,
+ uint32_t reg0, uint32_t reg1,
+ uint32_t ref, uint32_t mask);
void (*emit_tmz)(struct amdgpu_ring *ring, bool start);
/* priority functions */
void (*set_priority) (struct amdgpu_ring *ring,
@@ -226,6 +229,10 @@ int amdgpu_ring_lru_get(struct amdgpu_device *adev, int type,
int *blacklist, int num_blacklist,
bool lru_pipe_order, struct amdgpu_ring **ring);
void amdgpu_ring_lru_touch(struct amdgpu_device *adev, struct amdgpu_ring *ring);
+void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
+ uint32_t reg0, uint32_t val0,
+ uint32_t reg1, uint32_t val1);
+
static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring)
{
int i = 0;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring callback""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 9:07 ` [PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback"" Emily Deng
@ 2018-04-03 9:07 ` Emily Deng
2018-04-03 9:07 ` [PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: " Emily Deng
` (6 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit eede70ab868f9a3803ad304a5ab61adfa76e669b.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 2c618a1..dd98d2e 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1171,6 +1171,13 @@ static void sdma_v4_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
sdma_v4_0_wait_reg_mem(ring, 0, 0, reg, 0, val, mask, 10);
}
+static void sdma_v4_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
+ uint32_t reg0, uint32_t reg1,
+ uint32_t ref, uint32_t mask)
+{
+ sdma_v4_0_wait_reg_mem(ring, 0, 1, reg0, reg1, ref, mask, 10);
+}
+
static int sdma_v4_0_early_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1611,6 +1618,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = {
.pad_ib = sdma_v4_0_ring_pad_ib,
.emit_wreg = sdma_v4_0_ring_emit_wreg,
.emit_reg_wait = sdma_v4_0_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = sdma_v4_0_ring_emit_reg_write_reg_wait,
};
static void sdma_v4_0_set_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring callback""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 9:07 ` [PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback"" Emily Deng
2018-04-03 9:07 ` [PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: " Emily Deng
@ 2018-04-03 9:07 ` Emily Deng
2018-04-03 9:07 ` [PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: " Emily Deng
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit 162499bed04e4c51dd0fcbfa1515f9b044f8925e.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
index eddc57f..280c082 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
@@ -1702,6 +1702,7 @@ static const struct amdgpu_ring_funcs uvd_v7_0_enc_ring_vm_funcs = {
.end_use = amdgpu_uvd_ring_end_use,
.emit_wreg = uvd_v7_0_enc_ring_emit_wreg,
.emit_reg_wait = uvd_v7_0_enc_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
};
static void uvd_v7_0_set_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring callback""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (2 preceding siblings ...)
2018-04-03 9:07 ` [PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: " Emily Deng
@ 2018-04-03 9:07 ` Emily Deng
2018-04-03 9:07 ` [PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: " Emily Deng
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit afb1f304302f797ff686b6250e34b2244c4a17a4.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 73fd48d..8fd1b74 100755
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -1081,6 +1081,7 @@ static const struct amdgpu_ring_funcs vce_v4_0_ring_vm_funcs = {
.end_use = amdgpu_vce_ring_end_use,
.emit_wreg = vce_v4_0_emit_wreg,
.emit_reg_wait = vce_v4_0_emit_reg_wait,
+ .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
};
static void vce_v4_0_set_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring callback""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (3 preceding siblings ...)
2018-04-03 9:07 ` [PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: " Emily Deng
@ 2018-04-03 9:07 ` Emily Deng
2018-04-03 9:08 ` [PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush"" Emily Deng
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:07 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit bb85e01404ab39c01786d64312a602d5540a9944.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index 8c13267..d9a1533 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -1139,6 +1139,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = {
.end_use = amdgpu_vcn_ring_end_use,
.emit_wreg = vcn_v1_0_enc_ring_emit_wreg,
.emit_reg_wait = vcn_v1_0_enc_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
};
static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (4 preceding siblings ...)
2018-04-03 9:07 ` [PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: " Emily Deng
@ 2018-04-03 9:08 ` Emily Deng
2018-04-03 9:08 ` [PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang"" Emily Deng
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:08 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit c41ed7ebba8eb6df266783f54a4d3d643252ea75.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 070946e..aeaed7f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -385,11 +385,9 @@ static uint64_t gmc_v9_0_emit_flush_gpu_tlb(struct amdgpu_ring *ring,
amdgpu_ring_emit_wreg(ring, hub->ctx0_ptb_addr_hi32 + (2 * vmid),
upper_32_bits(pd_addr));
- amdgpu_ring_emit_wreg(ring, hub->vm_inv_eng0_req + eng, req);
-
- /* wait for the invalidate to complete */
- amdgpu_ring_emit_reg_wait(ring, hub->vm_inv_eng0_ack + eng,
- 1 << vmid, 1 << vmid);
+ amdgpu_ring_emit_reg_write_reg_wait(ring, hub->vm_inv_eng0_req + eng,
+ hub->vm_inv_eng0_ack + eng,
+ req, 1 << vmid);
return pd_addr;
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (5 preceding siblings ...)
2018-04-03 9:08 ` [PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush"" Emily Deng
@ 2018-04-03 9:08 ` Emily Deng
2018-04-03 9:08 ` [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback Emily Deng
2018-04-03 13:06 ` [PATCH 0/8] The vega10 sriov still need those patches Michel Dänzer
8 siblings, 0 replies; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:08 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Emily Deng
This reverts commit 5044a9e3253d089cf195fc3d52da5b5234f950ec.
The vega10 sriov still need these patches.
---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index dd98d2e..03a36cb 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1171,13 +1171,6 @@ static void sdma_v4_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
sdma_v4_0_wait_reg_mem(ring, 0, 0, reg, 0, val, mask, 10);
}
-static void sdma_v4_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
- uint32_t reg0, uint32_t reg1,
- uint32_t ref, uint32_t mask)
-{
- sdma_v4_0_wait_reg_mem(ring, 0, 1, reg0, reg1, ref, mask, 10);
-}
-
static int sdma_v4_0_early_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1618,7 +1611,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = {
.pad_ib = sdma_v4_0_ring_pad_ib,
.emit_wreg = sdma_v4_0_ring_emit_wreg,
.emit_reg_wait = sdma_v4_0_ring_emit_reg_wait,
- .emit_reg_write_reg_wait = sdma_v4_0_ring_emit_reg_write_reg_wait,
+ .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
};
static void sdma_v4_0_set_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (6 preceding siblings ...)
2018-04-03 9:08 ` [PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang"" Emily Deng
@ 2018-04-03 9:08 ` Emily Deng
[not found] ` <1522746482-31353-9-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 13:06 ` [PATCH 0/8] The vega10 sriov still need those patches Michel Dänzer
8 siblings, 1 reply; 14+ messages in thread
From: Emily Deng @ 2018-04-03 9:08 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher, Emily Deng
This adds support for writing and reading back in a single
oneshot packet. This is needed to send a tlb invalidation
and wait for ack in a single operation.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 9d39fd5..e699b9e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4137,6 +4137,18 @@ static void gfx_v9_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
gfx_v9_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
}
+static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
+ uint32_t reg0, uint32_t reg1,
+ uint32_t ref, uint32_t mask)
+{
+ if (amdgpu_sriov_vf(ring->adev) && (ring->adev->asic_type == CHIP_VEGA10)) {
+ int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
+ gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
+ } else {
+ amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1, ref, mask);
+ }
+}
+
static void gfx_v9_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
enum amdgpu_interrupt_state state)
{
@@ -4458,6 +4470,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_gfx = {
.emit_tmz = gfx_v9_0_ring_emit_tmz,
.emit_wreg = gfx_v9_0_ring_emit_wreg,
.emit_reg_wait = gfx_v9_0_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = gfx_v9_0_ring_emit_reg_write_reg_wait,
};
static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
@@ -4492,6 +4505,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = {
.set_priority = gfx_v9_0_ring_set_priority_compute,
.emit_wreg = gfx_v9_0_ring_emit_wreg,
.emit_reg_wait = gfx_v9_0_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = gfx_v9_0_ring_emit_reg_write_reg_wait,
};
static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
@@ -4522,6 +4536,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {
.emit_rreg = gfx_v9_0_ring_emit_rreg,
.emit_wreg = gfx_v9_0_ring_emit_wreg,
.emit_reg_wait = gfx_v9_0_ring_emit_reg_wait,
+ .emit_reg_write_reg_wait = gfx_v9_0_ring_emit_reg_write_reg_wait,
};
static void gfx_v9_0_set_ring_funcs(struct amdgpu_device *adev)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
[not found] ` <1522746482-31353-9-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-03 10:55 ` Huang Rui
2018-04-03 10:56 ` Christian König
0 siblings, 1 reply; 14+ messages in thread
From: Huang Rui @ 2018-04-03 10:55 UTC (permalink / raw)
To: Emily Deng, Christian Koenig, Tom StDenis
Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Tue, Apr 03, 2018 at 05:08:02PM +0800, Emily Deng wrote:
> This adds support for writing and reading back in a single
> oneshot packet. This is needed to send a tlb invalidation
> and wait for ack in a single operation.
>
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 9d39fd5..e699b9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -4137,6 +4137,18 @@ static void gfx_v9_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
> gfx_v9_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
> }
>
> +static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
> + uint32_t reg0, uint32_t reg1,
> + uint32_t ref, uint32_t mask)
> +{
> + if (amdgpu_sriov_vf(ring->adev) && (ring->adev->asic_type == CHIP_VEGA10)) {
> + int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
> + gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
> + } else {
> + amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1, ref, mask);
> + }
> +}
+ Christian, Tom, I think this is the root cause for regression of raven.
Alex, we need write "1" to set eng_sel field on gfx ring with below patch
that based on you previous patch set. I just verified it, the gfx ring
stall is gone.
Thanks,
Ray
8<-----
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index ccacc7d22..2fbb6e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4134,7 +4134,9 @@ static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
uint32_t reg0, uint32_t reg1,
uint32_t ref, uint32_t mask)
{
- gfx_v9_0_wait_reg_mem(ring, 0, 0, 1, reg0, reg1, ref, mask, 0x20);
+ int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
+
+ gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
}
static void gfx_v9_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
2018-04-03 10:55 ` Huang Rui
@ 2018-04-03 10:56 ` Christian König
0 siblings, 0 replies; 14+ messages in thread
From: Christian König @ 2018-04-03 10:56 UTC (permalink / raw)
To: Huang Rui, Emily Deng, Alex Deucher, Tom StDenis
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 03.04.2018 um 12:55 schrieb Huang Rui:
> On Tue, Apr 03, 2018 at 05:08:02PM +0800, Emily Deng wrote:
>> This adds support for writing and reading back in a single
>> oneshot packet. This is needed to send a tlb invalidation
>> and wait for ack in a single operation.
>>
>> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++++++++
>> 1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> index 9d39fd5..e699b9e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> @@ -4137,6 +4137,18 @@ static void gfx_v9_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
>> gfx_v9_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
>> }
>>
>> +static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
>> + uint32_t reg0, uint32_t reg1,
>> + uint32_t ref, uint32_t mask)
>> +{
>> + if (amdgpu_sriov_vf(ring->adev) && (ring->adev->asic_type == CHIP_VEGA10)) {
>> + int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
>> + gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
>> + } else {
>> + amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1, ref, mask);
>> + }
>> +}
> + Christian, Tom, I think this is the root cause for regression of raven.
> Alex, we need write "1" to set eng_sel field on gfx ring with below patch
> that based on you previous patch set. I just verified it, the gfx ring
> stall is gone.
Good catch, Tom can you verify that?
If that works we could keep the patches until we have the proper RLC fix
for the issue.
Christian.
>
> Thanks,
> Ray
>
> 8<-----
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index ccacc7d22..2fbb6e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -4134,7 +4134,9 @@ static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
> uint32_t reg0, uint32_t reg1,
> uint32_t ref, uint32_t mask)
> {
> - gfx_v9_0_wait_reg_mem(ring, 0, 0, 1, reg0, reg1, ref, mask, 0x20);
> + int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
> +
> + gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
> }
>
> static void gfx_v9_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/8] The vega10 sriov still need those patches
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
` (7 preceding siblings ...)
2018-04-03 9:08 ` [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback Emily Deng
@ 2018-04-03 13:06 ` Michel Dänzer
[not found] ` <8abf4f42-54be-4b1c-6208-80ab8c40fe0a-otUistvHUpPR7s880joybQ@public.gmane.org>
8 siblings, 1 reply; 14+ messages in thread
From: Michel Dänzer @ 2018-04-03 13:06 UTC (permalink / raw)
To: Emily Deng; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 2018-04-03 11:07 AM, Emily Deng wrote:
> For vega10 sriov, still need to use one package for invalidate tlb
> flush
>
> Emily Deng (8):
> Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring
> callback""
> Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring
> callback""
> Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring
> callback""
> Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring
> callback""
> Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring
> callback""
> Revert "Revert "drm/amdgpu/gmc9: use
> amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""
> Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""
> drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
'Revert "Revert "...""' is pretty ugly, better to use the original
commit logs again (possibly with amendments explaining why they're being
applied gain).
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/8] The vega10 sriov still need those patches
[not found] ` <8abf4f42-54be-4b1c-6208-80ab8c40fe0a-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2018-04-03 15:07 ` Alex Deucher
[not found] ` <CADnq5_OLEhT1qA6iDHx6NpKfkCAnAgL=GA0LZ-=NhXt1idO0Mg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2018-04-03 15:07 UTC (permalink / raw)
To: Michel Dänzer; +Cc: Emily Deng, amd-gfx list
On Tue, Apr 3, 2018 at 9:06 AM, Michel Dänzer <michel@daenzer.net> wrote:
> On 2018-04-03 11:07 AM, Emily Deng wrote:
>> For vega10 sriov, still need to use one package for invalidate tlb
>> flush
>>
>> Emily Deng (8):
>> Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring
>> callback""
>> Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring
>> callback""
>> Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring
>> callback""
>> Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring
>> callback""
>> Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring
>> callback""
>> Revert "Revert "drm/amdgpu/gmc9: use
>> amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""
>> Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""
>> drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
>
> 'Revert "Revert "...""' is pretty ugly, better to use the original
> commit logs again (possibly with amendments explaining why they're being
> applied gain).
I agree. If the fix from Ray fixes the hangs on gfx, please just
generate new patches by cherry-picking the originals and squashing in
any fixes and updating the commit messages if necessary. E.g., you
can squash your sdma4 fix into the original sdma4 patch.
Thanks,
Alex
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH 0/8] The vega10 sriov still need those patches
[not found] ` <CADnq5_OLEhT1qA6iDHx6NpKfkCAnAgL=GA0LZ-=NhXt1idO0Mg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-04-04 2:03 ` Deng, Emily
0 siblings, 0 replies; 14+ messages in thread
From: Deng, Emily @ 2018-04-04 2:03 UTC (permalink / raw)
To: Alex Deucher, Michel Dänzer; +Cc: amd-gfx list
Thanks all, I will change the patches as you sugestion, and send to you review again.
> -----Original Message-----
> From: Alex Deucher [mailto:alexdeucher@gmail.com]
> Sent: Tuesday, April 03, 2018 11:07 PM
> To: Michel Dänzer <michel@daenzer.net>
> Cc: Deng, Emily <Emily.Deng@amd.com>; amd-gfx list <amd-
> gfx@lists.freedesktop.org>
> Subject: Re: [PATCH 0/8] The vega10 sriov still need those patches
>
> On Tue, Apr 3, 2018 at 9:06 AM, Michel Dänzer <michel@daenzer.net> wrote:
> > On 2018-04-03 11:07 AM, Emily Deng wrote:
> >> For vega10 sriov, still need to use one package for invalidate tlb
> >> flush
> >>
> >> Emily Deng (8):
> >> Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring
> >> callback""
> >> Revert "Revert "drm/amdgpu/sdma4: add emit_reg_write_reg_wait ring
> >> callback""
> >> Revert "Revert "drm/amdgpu/uvd7: add emit_reg_write_reg_wait ring
> >> callback""
> >> Revert "Revert "drm/amdgpu/vce4: add emit_reg_write_reg_wait ring
> >> callback""
> >> Revert "Revert "drm/amdgpu/vcn1: add emit_reg_write_reg_wait ring
> >> callback""
> >> Revert "Revert "drm/amdgpu/gmc9: use
> >> amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush""
> >> Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang""
> >> drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
> >
> > 'Revert "Revert "...""' is pretty ugly, better to use the original
> > commit logs again (possibly with amendments explaining why they're
> > being applied gain).
>
> I agree. If the fix from Ray fixes the hangs on gfx, please just generate new
> patches by cherry-picking the originals and squashing in any fixes and
> updating the commit messages if necessary. E.g., you can squash your
> sdma4 fix into the original sdma4 patch.
>
> Thanks,
>
> Alex
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-04-04 2:03 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 9:07 [PATCH 0/8] The vega10 sriov still need those patches Emily Deng
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 9:07 ` [PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback"" Emily Deng
2018-04-03 9:07 ` [PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: " Emily Deng
2018-04-03 9:07 ` [PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: " Emily Deng
2018-04-03 9:07 ` [PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: " Emily Deng
2018-04-03 9:07 ` [PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: " Emily Deng
2018-04-03 9:08 ` [PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush"" Emily Deng
2018-04-03 9:08 ` [PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang"" Emily Deng
2018-04-03 9:08 ` [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback Emily Deng
[not found] ` <1522746482-31353-9-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 10:55 ` Huang Rui
2018-04-03 10:56 ` Christian König
2018-04-03 13:06 ` [PATCH 0/8] The vega10 sriov still need those patches Michel Dänzer
[not found] ` <8abf4f42-54be-4b1c-6208-80ab8c40fe0a-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-03 15:07 ` Alex Deucher
[not found] ` <CADnq5_OLEhT1qA6iDHx6NpKfkCAnAgL=GA0LZ-=NhXt1idO0Mg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-04 2:03 ` Deng, Emily
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.