All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu:fix exclusive mode game texture blank
@ 2016-09-30  3:56 Monk Liu
       [not found] ` <1475207799-5054-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Monk Liu @ 2016-09-30  3:56 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu

this fix DOTA and other exclusive & full screen game
textrue blank bug, the root cause is that when no ctx
switch between two DMAframe, CE go too faster and step
to the next DMAframe, thus DE and CE are not working on
the same DAMframe.

Change-Id: I92714a1d434bb05e94220a2db9b4a6113b0c2efc
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 4127e7c..efce228 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -129,6 +129,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
 
 	unsigned i;
 	int r = 0;
+	unsigned extra_nop = 0;
 
 	if (num_ibs == 0)
 		return -EINVAL;
@@ -155,6 +156,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
 	alloc_size = amdgpu_ring_get_dma_frame_size(ring) +
 		num_ibs * amdgpu_ring_get_emit_ib_size(ring);
 
+	if (!job->vm_needs_flush && ring->type == AMDGPU_RING_TYPE_GFX) {
+		extra_nop = 128;
+		alloc_size += extra_nop;
+	}
+
 	r = amdgpu_ring_alloc(ring, alloc_size);
 	if (r) {
 		dev_err(adev->dev, "scheduling IB failed (%d).\n", r);
@@ -165,6 +171,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
 		patch_offset = amdgpu_ring_init_cond_exec(ring);
 
 	if (vm) {
+		if (extra_nop)
+			amdgpu_ring_insert_nop(ring, 128); /* prevent CE go too fast than DE */
+
 		r = amdgpu_vm_flush(ring, job);
 		if (r) {
 			amdgpu_ring_undo(ring);
-- 
1.9.1

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

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

* [PATCH 2/2] drm/amdgpu:fix typo
       [not found] ` <1475207799-5054-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2016-09-30  3:56   ` Monk Liu
       [not found]     ` <1475207799-5054-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Monk Liu @ 2016-09-30  3:56 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu

COND_EXEC are needed by GFX ring

Change-Id: I4819300444061cb92b3bed44da660f82f2fc755e
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index efce228..9c18920 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -167,7 +167,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
 		return r;
 	}
 
-	if (ring->type == AMDGPU_RING_TYPE_SDMA && ring->funcs->init_cond_exec)
+	if (ring->type == AMDGPU_RING_TYPE_GFX && ring->funcs->init_cond_exec)
 		patch_offset = amdgpu_ring_init_cond_exec(ring);
 
 	if (vm) {
-- 
1.9.1

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

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

* Re: [PATCH 2/2] drm/amdgpu:fix typo
       [not found]     ` <1475207799-5054-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2016-09-30 14:51       ` Alex Deucher
       [not found]         ` <CADnq5_OWP1-g8x-F0EYDa4Bur3MaY51Kp2ZCmCaD9WqzGLdFJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2016-09-30 14:51 UTC (permalink / raw)
  To: Monk Liu; +Cc: amd-gfx list

On Thu, Sep 29, 2016 at 11:56 PM, Monk Liu <Monk.Liu@amd.com> wrote:
> COND_EXEC are needed by GFX ring
>
> Change-Id: I4819300444061cb92b3bed44da660f82f2fc755e
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index efce228..9c18920 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -167,7 +167,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>                 return r;
>         }
>
> -       if (ring->type == AMDGPU_RING_TYPE_SDMA && ring->funcs->init_cond_exec)
> +       if (ring->type == AMDGPU_RING_TYPE_GFX && ring->funcs->init_cond_exec)
>                 patch_offset = amdgpu_ring_init_cond_exec(ring);
>
>         if (vm) {
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 2/2] drm/amdgpu:fix typo
       [not found]         ` <CADnq5_OWP1-g8x-F0EYDa4Bur3MaY51Kp2ZCmCaD9WqzGLdFJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-30 17:49           ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2016-09-30 17:49 UTC (permalink / raw)
  To: Alex Deucher, Monk Liu; +Cc: amd-gfx list

Am 30.09.2016 um 16:51 schrieb Alex Deucher:
> On Thu, Sep 29, 2016 at 11:56 PM, Monk Liu <Monk.Liu@amd.com> wrote:
>> COND_EXEC are needed by GFX ring
>>
>> Change-Id: I4819300444061cb92b3bed44da660f82f2fc755e
>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>

I would rather say just drop the ring type check completely and only 
check if the init_cond_exec callback is present or not.

Christian.

>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> index efce228..9c18920 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
>> @@ -167,7 +167,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>>                  return r;
>>          }
>>
>> -       if (ring->type == AMDGPU_RING_TYPE_SDMA && ring->funcs->init_cond_exec)
>> +       if (ring->type == AMDGPU_RING_TYPE_GFX && ring->funcs->init_cond_exec)
>>                  patch_offset = amdgpu_ring_init_cond_exec(ring);
>>
>>          if (vm) {
>> --
>> 1.9.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


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

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

end of thread, other threads:[~2016-09-30 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30  3:56 [PATCH 1/2] drm/amdgpu:fix exclusive mode game texture blank Monk Liu
     [not found] ` <1475207799-5054-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-30  3:56   ` [PATCH 2/2] drm/amdgpu:fix typo Monk Liu
     [not found]     ` <1475207799-5054-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-30 14:51       ` Alex Deucher
     [not found]         ` <CADnq5_OWP1-g8x-F0EYDa4Bur3MaY51Kp2ZCmCaD9WqzGLdFJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-30 17:49           ` 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.