All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6
@ 2018-01-16 19:39 Christian König
       [not found] ` <20180116194017.39067-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 38+ messages in thread
From: Christian König @ 2018-01-16 19:39 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Needed for vm_flush unification.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 39acafbc84d6..e72f3e5d24b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -2402,6 +2402,18 @@ static void gfx_v6_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
 	}
 }
 
+static void gfx_v6_0_ring_emit_wreg(struct amdgpu_ring *ring,
+				    uint32_t reg, uint32_t val)
+{
+	int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
+
+	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
+	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(usepfp) |
+				 WRITE_DATA_DST_SEL(0)));
+	amdgpu_ring_write(ring, reg);
+	amdgpu_ring_write(ring, 0);
+	amdgpu_ring_write(ring, val);
+}
 
 static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
 {
@@ -3529,6 +3541,7 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
 	.test_ib = gfx_v6_0_ring_test_ib,
 	.insert_nop = amdgpu_ring_insert_nop,
 	.emit_cntxcntl = gfx_v6_ring_emit_cntxcntl,
+	.emit_wreg = gfx_v6_0_ring_emit_wreg,
 };
 
 static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 38+ messages in thread
* [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6
@ 2018-01-19 11:48 Christian König
       [not found] ` <20180119114825.1336-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 38+ messages in thread
From: Christian König @ 2018-01-19 11:48 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Needed for vm_flush unification.

v2: handle compute rings as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 39acafbc84d6..ebe42632def0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -2402,6 +2402,18 @@ static void gfx_v6_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
 	}
 }
 
+static void gfx_v6_0_ring_emit_wreg(struct amdgpu_ring *ring,
+				    uint32_t reg, uint32_t val)
+{
+	int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
+
+	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
+	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(usepfp) |
+				 WRITE_DATA_DST_SEL(0)));
+	amdgpu_ring_write(ring, reg);
+	amdgpu_ring_write(ring, 0);
+	amdgpu_ring_write(ring, val);
+}
 
 static void gfx_v6_0_rlc_fini(struct amdgpu_device *adev)
 {
@@ -3529,6 +3541,7 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
 	.test_ib = gfx_v6_0_ring_test_ib,
 	.insert_nop = amdgpu_ring_insert_nop,
 	.emit_cntxcntl = gfx_v6_ring_emit_cntxcntl,
+	.emit_wreg = gfx_v6_0_ring_emit_wreg,
 };
 
 static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
@@ -3554,6 +3567,7 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
 	.test_ring = gfx_v6_0_ring_test_ring,
 	.test_ib = gfx_v6_0_ring_test_ib,
 	.insert_nop = amdgpu_ring_insert_nop,
+	.emit_wreg = gfx_v6_0_ring_emit_wreg,
 };
 
 static void gfx_v6_0_set_ring_funcs(struct amdgpu_device *adev)
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-01-19 11:48 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 19:39 [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6 Christian König
     [not found] ` <20180116194017.39067-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 19:39   ` [PATCH 02/21] drm/amdgpu: wire up emit_wreg for gfx v7 Christian König
2018-01-16 19:39   ` [PATCH 03/21] drm/amdgpu: wire up emit_wreg for gfx v8 Christian König
2018-01-16 19:40   ` [PATCH 04/21] drm/amdgpu: wire up emit_wreg for gfx v9 Christian König
2018-01-16 19:40   ` [PATCH 05/21] drm/amdgpu: wire up emit_wreg for SI DMA Christian König
2018-01-16 19:40   ` [PATCH 06/21] drm/amdgpu: wire up emit_wreg for CIK SDMA Christian König
2018-01-16 19:40   ` [PATCH 07/21] drm/amdgpu: wire up emit_wreg for SDMA v2.4 Christian König
2018-01-16 19:40   ` [PATCH 08/21] drm/amdgpu: wire up emit_wreg for SDMA v3 Christian König
2018-01-16 19:40   ` [PATCH 09/21] drm/amdgpu: wire up emit_wreg for SDMA v4 Christian König
2018-01-16 19:40   ` [PATCH 10/21] drm/amdgpu: wire up emit_wreg for UVD v6 Christian König
     [not found]     ` <20180116194017.39067-10-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 20:01       ` Alex Deucher
     [not found]         ` <CADnq5_Pc2QujuEDmsb8O2E0-VGmMgSCkN2K-B4O_1y-3zrQE7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 12:42           ` Christian König
     [not found]             ` <c33f3adf-66d4-1d37-ebc9-cf3ab7d1b967-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-17 14:22               ` Deucher, Alexander
     [not found]                 ` <BN6PR12MB1652DE27EE111B57EC39AA78F7E90-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-17 14:49                   ` Christian König
2018-01-16 19:40   ` [PATCH 11/21] drm/amdgpu: wire up emit_wreg for UVD v7 Christian König
     [not found]     ` <20180116194017.39067-11-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 20:05       ` Alex Deucher
     [not found]         ` <CADnq5_MaS1zp4sixq8D5ZdQ-0fheF92k+V=pBYeM1m2PAJFWVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 12:46           ` Christian König
2018-01-16 19:40   ` [PATCH 12/21] drm/amdgpu: wire up emit_wreg for VCE v4 Christian König
2018-01-16 19:40   ` [PATCH 13/21] drm/amdgpu: wire up emit_wreg for VCN v1 Christian König
2018-01-16 19:40   ` [PATCH 14/21] drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback Christian König
     [not found]     ` <20180116194017.39067-14-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:24       ` Chunming Zhou
     [not found]         ` <abf156ad-44a7-fe7f-12b0-3c1a77757fbd-5C7GfCeVMHo@public.gmane.org>
2018-01-17 12:19           ` Christian König
     [not found]             ` <2d56c566-9a4d-924e-6542-1e406ce1776a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-18  7:08               ` Chunming Zhou
     [not found]                 ` <db8d7b0d-bb67-e5fe-299e-a334e483bd19-5C7GfCeVMHo@public.gmane.org>
2018-01-18  8:15                   ` Christian König
2018-01-16 19:40   ` [PATCH 15/21] drm/amdgpu: implement gmc_v6_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 16/21] drm/amdgpu: implement gmc_v7_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 17/21] drm/amdgpu: implement gmc_v8_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 18/21] drm/amdgpu: implement gmc_v9_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 19/21] drm/amdgpu: add PASID mapping for GMC v7 Christian König
2018-01-16 19:40   ` [PATCH 20/21] drm/amdgpu: add PASID mapping for GFX v8 Christian König
2018-01-16 19:40   ` [PATCH 21/21] " Christian König
     [not found]     ` <20180116194017.39067-21-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:11       ` Chunming Zhou
     [not found]         ` <bd8e530b-869f-2cf9-c5b2-8fce9afd2341-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:12           ` Chunming Zhou
2018-01-17  6:13           ` Chunming Zhou
     [not found]             ` <4d39da90-bbe3-d704-72b5-b5ee27a41b14-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:15               ` Chunming Zhou
2018-01-16 20:15   ` [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6 Alex Deucher
     [not found]     ` <CADnq5_ObVUuxn4GxWmZfY5m6MjfDcZHR-jwGS6cGXa7MbA3NMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 13:47       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2018-01-19 11:48 Christian König
     [not found] ` <20180119114825.1336-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-19 11:48   ` [PATCH 14/21] drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback Christian König

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.