<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 30, 2014 at 11:54 AM, Alex Deucher <span dir="ltr"><<a href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, Jul 30, 2014 at 11:18 AM, Christian König<br>
<<a href="mailto:deathsimple@vodafone.de">deathsimple@vodafone.de</a>> wrote:<br>
> From: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
><br>
> Seems to make VM flushes more stable on SI and CIK.<br>
><br>
> v2: only use the PFP on the GFX ring on CIK<br>
><br>
> Signed-off-by: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
> Cc: <a href="mailto:stable@vger.kernel.org">stable@vger.kernel.org</a><br>
<br>
</div>Applied to my 3.17 tree.  We should use PFP whenever possible for all packets.<br></blockquote><div><br></div><div>Can all this be explained with more words ? What are the choice ? What are the difference ? What we gain ?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Alex<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> ---<br>
>  drivers/gpu/drm/radeon/cik.c | 5 +++--<br>
>  drivers/gpu/drm/radeon/si.c  | 2 +-<br>
>  2 files changed, 4 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c<br>
> index cc1f02f..db53616 100644<br>
> --- a/drivers/gpu/drm/radeon/cik.c<br>
> +++ b/drivers/gpu/drm/radeon/cik.c<br>
> @@ -5641,12 +5641,13 @@ static void cik_vm_decode_fault(struct radeon_device *rdev,<br>
>  void cik_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm)<br>
>  {<br>
>         struct radeon_ring *ring = &rdev->ring[ridx];<br>
> +       int usepfp = (ridx == RADEON_RING_TYPE_GFX_INDEX);<br>
><br>
>         if (vm == NULL)<br>
>                 return;<br>
><br>
>         radeon_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));<br>
> -       radeon_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |<br>
> +       radeon_ring_write(ring, (WRITE_DATA_ENGINE_SEL(usepfp) |<br>
>                                  WRITE_DATA_DST_SEL(0)));<br>
>         if (vm->id < 8) {<br>
>                 radeon_ring_write(ring,<br>
> @@ -5696,7 +5697,7 @@ void cik_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm)<br>
>         radeon_ring_write(ring, 1 << vm->id);<br>
><br>
>         /* compute doesn't have PFP */<br>
> -       if (ridx == RADEON_RING_TYPE_GFX_INDEX) {<br>
> +       if (usepfp) {<br>
>                 /* sync PFP to ME, otherwise we might get invalid PFP reads */<br>
>                 radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0));<br>
>                 radeon_ring_write(ring, 0x0);<br>
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c<br>
> index 9e854fd..f87d82a 100644<br>
> --- a/drivers/gpu/drm/radeon/si.c<br>
> +++ b/drivers/gpu/drm/radeon/si.c<br>
> @@ -4815,7 +4815,7 @@ void si_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm)<br>
><br>
>         /* write new base address */<br>
>         radeon_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));<br>
> -       radeon_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |<br>
> +       radeon_ring_write(ring, (WRITE_DATA_ENGINE_SEL(1) |<br>
>                                  WRITE_DATA_DST_SEL(0)));<br>
><br>
>         if (vm->id < 8) {<br>
> --<br>
> 1.9.1<br>
><br>
_______________________________________________<br>
dri-devel mailing list<br>
<a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</div></div></blockquote></div><br></div></div>