* [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code
@ 2016-09-15 19:55 Alex Deucher
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2016-09-15 19:55 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
The compute functions just called the gfx functions, drop
the wrapper.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 33 +++++++++------------------------
1 file changed, 9 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 9697994..3cf4e9e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -1324,8 +1324,8 @@ static void gfx_v6_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
amdgpu_ring_write(ring, 0x1);
}
-static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
- u64 seq, unsigned flags)
+static void gfx_v6_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
+ u64 seq, unsigned flags)
{
bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
@@ -1351,17 +1351,9 @@ static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
amdgpu_ring_write(ring, upper_32_bits(seq));
}
-static void gfx_v6_0_ring_emit_fence_compute(struct amdgpu_ring *ring,
- u64 addr, u64 seq,
- unsigned flags)
-{
- gfx_v6_0_ring_emit_fence_gfx(ring, addr, seq, flags);
-}
-
-
-static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
- struct amdgpu_ib *ib,
- unsigned vm_id, bool ctx_switch)
+static void gfx_v6_0_ring_emit_ib(struct amdgpu_ring *ring,
+ struct amdgpu_ib *ib,
+ unsigned vm_id, bool ctx_switch)
{
u32 header, control = 0;
@@ -1388,13 +1380,6 @@ static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
amdgpu_ring_write(ring, control);
}
-static void gfx_v6_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
- struct amdgpu_ib *ib,
- unsigned vm_id, bool ctx_switch)
-{
- gfx_v6_0_ring_emit_ib_gfx(ring, ib, vm_id, ctx_switch);
-}
-
/**
* gfx_v6_0_ring_test_ib - basic ring IB test
*
@@ -3119,8 +3104,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
.get_wptr = gfx_v6_0_ring_get_wptr,
.set_wptr = gfx_v6_0_ring_set_wptr_gfx,
.parse_cs = NULL,
- .emit_ib = gfx_v6_0_ring_emit_ib_gfx,
- .emit_fence = gfx_v6_0_ring_emit_fence_gfx,
+ .emit_ib = gfx_v6_0_ring_emit_ib,
+ .emit_fence = gfx_v6_0_ring_emit_fence,
.emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
.emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
.emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
@@ -3136,8 +3121,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
.get_wptr = gfx_v6_0_ring_get_wptr,
.set_wptr = gfx_v6_0_ring_set_wptr_compute,
.parse_cs = NULL,
- .emit_ib = gfx_v6_0_ring_emit_ib_compute,
- .emit_fence = gfx_v6_0_ring_emit_fence_compute,
+ .emit_ib = gfx_v6_0_ring_emit_ib,
+ .emit_fence = gfx_v6_0_ring_emit_fence,
.emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
.emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
.emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] drm/amdgpu/gfx6: add ring_emit_cntxcntl
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2016-09-15 19:55 ` Alex Deucher
2016-09-15 19:55 ` [PATCH 3/3] drm/amdgpu/gfx6: drop gds_switch callback Alex Deucher
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2016-09-15 19:55 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Missing for gfx6.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 3cf4e9e..d33d321 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -2686,6 +2686,13 @@ static void gfx_v6_0_ring_emit_gds_switch(struct amdgpu_ring *ring,
{
}
+static void gfx_v6_ring_emit_cntxcntl(struct amdgpu_ring *ring, uint32_t flags)
+{
+ amdgpu_ring_write(ring, PACKET3(PACKET3_CONTEXT_CONTROL, 1));
+ amdgpu_ring_write(ring, 0x80000000);
+ amdgpu_ring_write(ring, 0);
+}
+
static const struct amdgpu_gfx_funcs gfx_v6_0_gfx_funcs = {
.get_gpu_clock_counter = &gfx_v6_0_get_gpu_clock_counter,
.select_se_sh = &gfx_v6_0_select_se_sh,
@@ -3114,6 +3121,7 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
.test_ring = gfx_v6_0_ring_test_ring,
.test_ib = gfx_v6_0_ring_test_ib,
.insert_nop = amdgpu_ring_insert_nop,
+ .emit_cntxcntl = gfx_v6_ring_emit_cntxcntl,
};
static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] drm/amdgpu/gfx6: drop gds_switch callback
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-15 19:55 ` [PATCH 2/3] drm/amdgpu/gfx6: add ring_emit_cntxcntl Alex Deucher
@ 2016-09-15 19:55 ` Alex Deucher
2016-09-16 7:34 ` [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code Christian König
2016-09-16 8:26 ` Edward O'Callaghan
3 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2016-09-15 19:55 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
GDS works differently on GFX6, plus the callback was
empty.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index d33d321..e7293f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -2678,14 +2678,6 @@ static uint64_t gfx_v6_0_get_gpu_clock_counter(struct amdgpu_device *adev)
return clock;
}
-static void gfx_v6_0_ring_emit_gds_switch(struct amdgpu_ring *ring,
- uint32_t vmid,
- uint32_t gds_base, uint32_t gds_size,
- uint32_t gws_base, uint32_t gws_size,
- uint32_t oa_base, uint32_t oa_size)
-{
-}
-
static void gfx_v6_ring_emit_cntxcntl(struct amdgpu_ring *ring, uint32_t flags)
{
amdgpu_ring_write(ring, PACKET3(PACKET3_CONTEXT_CONTROL, 1));
@@ -3115,7 +3107,6 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
.emit_fence = gfx_v6_0_ring_emit_fence,
.emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
.emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
- .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
.emit_hdp_flush = gfx_v6_0_ring_emit_hdp_flush,
.emit_hdp_invalidate = gfx_v6_0_ring_emit_hdp_invalidate,
.test_ring = gfx_v6_0_ring_test_ring,
@@ -3133,7 +3124,6 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
.emit_fence = gfx_v6_0_ring_emit_fence,
.emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
.emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
- .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
.emit_hdp_flush = gfx_v6_0_ring_emit_hdp_flush,
.emit_hdp_invalidate = gfx_v6_0_ring_emit_hdp_invalidate,
.test_ring = gfx_v6_0_ring_test_ring,
--
2.5.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-15 19:55 ` [PATCH 2/3] drm/amdgpu/gfx6: add ring_emit_cntxcntl Alex Deucher
2016-09-15 19:55 ` [PATCH 3/3] drm/amdgpu/gfx6: drop gds_switch callback Alex Deucher
@ 2016-09-16 7:34 ` Christian König
2016-09-16 8:26 ` Edward O'Callaghan
3 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2016-09-16 7:34 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Am 15.09.2016 um 21:55 schrieb Alex Deucher:
> The compute functions just called the gfx functions, drop
> the wrapper.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> for the whole
series.
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 33 +++++++++------------------------
> 1 file changed, 9 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> index 9697994..3cf4e9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> @@ -1324,8 +1324,8 @@ static void gfx_v6_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
> amdgpu_ring_write(ring, 0x1);
> }
>
> -static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
> - u64 seq, unsigned flags)
> +static void gfx_v6_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
> + u64 seq, unsigned flags)
> {
> bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
> bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
> @@ -1351,17 +1351,9 @@ static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
> amdgpu_ring_write(ring, upper_32_bits(seq));
> }
>
> -static void gfx_v6_0_ring_emit_fence_compute(struct amdgpu_ring *ring,
> - u64 addr, u64 seq,
> - unsigned flags)
> -{
> - gfx_v6_0_ring_emit_fence_gfx(ring, addr, seq, flags);
> -}
> -
> -
> -static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
> - struct amdgpu_ib *ib,
> - unsigned vm_id, bool ctx_switch)
> +static void gfx_v6_0_ring_emit_ib(struct amdgpu_ring *ring,
> + struct amdgpu_ib *ib,
> + unsigned vm_id, bool ctx_switch)
> {
> u32 header, control = 0;
>
> @@ -1388,13 +1380,6 @@ static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
> amdgpu_ring_write(ring, control);
> }
>
> -static void gfx_v6_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
> - struct amdgpu_ib *ib,
> - unsigned vm_id, bool ctx_switch)
> -{
> - gfx_v6_0_ring_emit_ib_gfx(ring, ib, vm_id, ctx_switch);
> -}
> -
> /**
> * gfx_v6_0_ring_test_ib - basic ring IB test
> *
> @@ -3119,8 +3104,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
> .get_wptr = gfx_v6_0_ring_get_wptr,
> .set_wptr = gfx_v6_0_ring_set_wptr_gfx,
> .parse_cs = NULL,
> - .emit_ib = gfx_v6_0_ring_emit_ib_gfx,
> - .emit_fence = gfx_v6_0_ring_emit_fence_gfx,
> + .emit_ib = gfx_v6_0_ring_emit_ib,
> + .emit_fence = gfx_v6_0_ring_emit_fence,
> .emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
> .emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
> .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
> @@ -3136,8 +3121,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
> .get_wptr = gfx_v6_0_ring_get_wptr,
> .set_wptr = gfx_v6_0_ring_set_wptr_compute,
> .parse_cs = NULL,
> - .emit_ib = gfx_v6_0_ring_emit_ib_compute,
> - .emit_fence = gfx_v6_0_ring_emit_fence_compute,
> + .emit_ib = gfx_v6_0_ring_emit_ib,
> + .emit_fence = gfx_v6_0_ring_emit_fence,
> .emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
> .emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
> .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
` (2 preceding siblings ...)
2016-09-16 7:34 ` [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code Christian König
@ 2016-09-16 8:26 ` Edward O'Callaghan
3 siblings, 0 replies; 5+ messages in thread
From: Edward O'Callaghan @ 2016-09-16 8:26 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
[-- Attachment #1.1.1: Type: text/plain, Size: 3461 bytes --]
This series is,
Reviewed-by: Edward O'Callaghan <funfunctor-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
P.S., keep these hedge cuttings coming!
On 09/16/2016 05:55 AM, Alex Deucher wrote:
> The compute functions just called the gfx functions, drop
> the wrapper.
>
> Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 33 +++++++++------------------------
> 1 file changed, 9 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> index 9697994..3cf4e9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
> @@ -1324,8 +1324,8 @@ static void gfx_v6_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
> amdgpu_ring_write(ring, 0x1);
> }
>
> -static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
> - u64 seq, unsigned flags)
> +static void gfx_v6_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
> + u64 seq, unsigned flags)
> {
> bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
> bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
> @@ -1351,17 +1351,9 @@ static void gfx_v6_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
> amdgpu_ring_write(ring, upper_32_bits(seq));
> }
>
> -static void gfx_v6_0_ring_emit_fence_compute(struct amdgpu_ring *ring,
> - u64 addr, u64 seq,
> - unsigned flags)
> -{
> - gfx_v6_0_ring_emit_fence_gfx(ring, addr, seq, flags);
> -}
> -
> -
> -static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
> - struct amdgpu_ib *ib,
> - unsigned vm_id, bool ctx_switch)
> +static void gfx_v6_0_ring_emit_ib(struct amdgpu_ring *ring,
> + struct amdgpu_ib *ib,
> + unsigned vm_id, bool ctx_switch)
> {
> u32 header, control = 0;
>
> @@ -1388,13 +1380,6 @@ static void gfx_v6_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
> amdgpu_ring_write(ring, control);
> }
>
> -static void gfx_v6_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
> - struct amdgpu_ib *ib,
> - unsigned vm_id, bool ctx_switch)
> -{
> - gfx_v6_0_ring_emit_ib_gfx(ring, ib, vm_id, ctx_switch);
> -}
> -
> /**
> * gfx_v6_0_ring_test_ib - basic ring IB test
> *
> @@ -3119,8 +3104,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_gfx = {
> .get_wptr = gfx_v6_0_ring_get_wptr,
> .set_wptr = gfx_v6_0_ring_set_wptr_gfx,
> .parse_cs = NULL,
> - .emit_ib = gfx_v6_0_ring_emit_ib_gfx,
> - .emit_fence = gfx_v6_0_ring_emit_fence_gfx,
> + .emit_ib = gfx_v6_0_ring_emit_ib,
> + .emit_fence = gfx_v6_0_ring_emit_fence,
> .emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
> .emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
> .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
> @@ -3136,8 +3121,8 @@ static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
> .get_wptr = gfx_v6_0_ring_get_wptr,
> .set_wptr = gfx_v6_0_ring_set_wptr_compute,
> .parse_cs = NULL,
> - .emit_ib = gfx_v6_0_ring_emit_ib_compute,
> - .emit_fence = gfx_v6_0_ring_emit_fence_compute,
> + .emit_ib = gfx_v6_0_ring_emit_ib,
> + .emit_fence = gfx_v6_0_ring_emit_fence,
> .emit_pipeline_sync = gfx_v6_0_ring_emit_pipeline_sync,
> .emit_vm_flush = gfx_v6_0_ring_emit_vm_flush,
> .emit_gds_switch = gfx_v6_0_ring_emit_gds_switch,
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-16 8:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 19:55 [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code Alex Deucher
[not found] ` <1473969314-14962-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-15 19:55 ` [PATCH 2/3] drm/amdgpu/gfx6: add ring_emit_cntxcntl Alex Deucher
2016-09-15 19:55 ` [PATCH 3/3] drm/amdgpu/gfx6: drop gds_switch callback Alex Deucher
2016-09-16 7:34 ` [PATCH 1/3] drm/amdgpu/gfx6: drop duplicate code Christian König
2016-09-16 8:26 ` Edward O'Callaghan
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.