[PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 16, 2018 at 2:39 PM, Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
> Needed for vm_flush unification.
>
> Signed-off-by: Christian König <christian.koenig at 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,

I think you need to update the compute ring_funcs as well for all the gfx IPs.

Alex

>  };
>
>  static const struct amdgpu_ring_funcs gfx_v6_0_ring_funcs_compute = {
> --
> 2.14.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux