AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
To: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 10/21] drm/amdgpu: wire up emit_wreg for UVD v6
Date: Wed, 17 Jan 2018 15:49:49 +0100	[thread overview]
Message-ID: <2db2e630-2fe3-b3c7-8e7f-de7d4f67266d@amd.com> (raw)
In-Reply-To: <BN6PR12MB1652DE27EE111B57EC39AA78F7E90-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3725 bytes --]

Am 17.01.2018 um 15:22 schrieb Deucher, Alexander:
>
>
> ------------------------------------------------------------------------
> *From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of 
> Christian König <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> *Sent:* Wednesday, January 17, 2018 7:42 AM
> *To:* Alex Deucher
> *Cc:* amd-gfx list
> *Subject:* Re: [PATCH 10/21] drm/amdgpu: wire up emit_wreg for UVD v6
> Am 16.01.2018 um 21:01 schrieb Alex Deucher:
> > On Tue, Jan 16, 2018 at 2:40 PM, Christian König
> > <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> Needed for vm_flush unification.
> >>
> >> Signed-off-by: Christian König <christian.koenig-5C7GfCeVMHo@public.gmane.org>
> >> ---
> >>   drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 12 ++++++++++++
> >>   1 file changed, 12 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c 
> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> >> index c6e22eff89e7..b48b843c66ae 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
> >> @@ -1059,6 +1059,17 @@ static void uvd_v6_0_enc_ring_emit_ib(struct 
> amdgpu_ring *ring,
> >>          amdgpu_ring_write(ring, ib->length_dw);
> >>   }
> >>
> >> +static void uvd_v6_0_ring_emit_wreg(struct amdgpu_ring *ring,
> >> +                                   uint32_t reg, uint32_t val)
> >> +{
> >> +       amdgpu_ring_write(ring, PACKET0(mmUVD_GPCOM_VCPU_DATA0, 0));
> >> +       amdgpu_ring_write(ring, reg << 2);
> >> +       amdgpu_ring_write(ring, PACKET0(mmUVD_GPCOM_VCPU_DATA1, 0));
> >> +       amdgpu_ring_write(ring, val);
> >> +       amdgpu_ring_write(ring, PACKET0(mmUVD_GPCOM_VCPU_CMD, 0));
> >> +       amdgpu_ring_write(ring, 0x8);
> > Is this valid on UVD6?
>
> This is valid on the decode ring of UVD6, only the HEVC UVD6 encode and
> VCE3 rings use different commands.
>
> >    I think this may be a UVD7 thing.  Looking at
> > the other UVD code, I think we just want:
> >          amdgpu_ring_write(ring, PACKET0(reg, 0));
> >          amdgpu_ring_write(ring, val);
>
> IIRC that won't work. The UVD RBC can only write to UVD registers using
> the PACKET0 command.
>
> We probably need to fix a bunch of functions in uvd4,5,6,7 in that 
> case which use packet0 directly to write non-UVD registers.

Yeah, I see. I briefly remember that I questioned if this works or not 
two years ago when we added the code.

Going to wire things up correctly with the new wreg callback.

Christian.

>
> Alex
>
>
> Regards,
> Christian.
>
> >
> > Alex
> >
> >
> >> +}
> >> +
> >>   static void uvd_v6_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
> >> unsigned vmid, unsigned pasid,
> >> uint64_t pd_addr)
> >> @@ -1595,6 +1606,7 @@ static const struct amdgpu_ring_funcs 
> uvd_v6_0_ring_vm_funcs = {
> >>          .pad_ib = amdgpu_ring_generic_pad_ib,
> >>          .begin_use = amdgpu_uvd_ring_begin_use,
> >>          .end_use = amdgpu_uvd_ring_end_use,
> >> +       .emit_wreg = uvd_v6_0_ring_emit_wreg,
> >>   };
> >>
> >>   static const struct amdgpu_ring_funcs uvd_v6_0_enc_ring_vm_funcs = {
> >> --
> >> 2.14.1
> >>
> >> _______________________________________________
> >> amd-gfx mailing list
> >> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[-- Attachment #1.2: Type: text/html, Size: 9851 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

  parent reply	other threads:[~2018-01-17 14:49 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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 10/21] drm/amdgpu: wire up emit_wreg for UVD v6 Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2db2e630-2fe3-b3c7-8e7f-de7d4f67266d@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox