From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Boyuan Zhang <boyzhang-5C7GfCeVMHo@public.gmane.org>,
Alex Deucher
<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Boyuan Zhang <boyuan.zhang-5C7GfCeVMHo@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 3/5] drm/amdgpu: enable system interrupt for jrbc
Date: Tue, 24 Jul 2018 14:50:10 +0200 [thread overview]
Message-ID: <720bdbc9-eed9-42de-2547-654713e0d20b@gmail.com> (raw)
In-Reply-To: <763a42d3-c83b-2272-ec01-e11a14bdaf43-5C7GfCeVMHo@public.gmane.org>
Am 23.07.2018 um 21:53 schrieb Boyuan Zhang:
>
>
> On 2018-07-19 02:51 PM, Alex Deucher wrote:
>> On Wed, Jul 18, 2018 at 4:39 PM, <boyuan.zhang@amd.com> wrote:
>>> From: Boyuan Zhang <boyuan.zhang@amd.com>
>>>
>>> Enable system interrupt for jrbc during engine starting time.
>>>
>>> Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 8 +++++++-
>>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
>>> index 4fccb21..22c1588 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
>>> @@ -595,6 +595,7 @@ static int vcn_v1_0_start(struct amdgpu_device
>>> *adev)
>>> struct amdgpu_ring *ring = &adev->vcn.ring_dec;
>>> uint32_t rb_bufsz, tmp;
>>> uint32_t lmi_swap_cntl;
>>> + uint32_t reg_temp;
>>> int i, j, r;
>>>
>>> /* disable byte swapping */
>>> @@ -700,6 +701,11 @@ static int vcn_v1_0_start(struct amdgpu_device
>>> *adev)
>>> (UVD_MASTINT_EN__VCPU_EN_MASK|UVD_MASTINT_EN__SYS_EN_MASK),
>>> ~(UVD_MASTINT_EN__VCPU_EN_MASK|UVD_MASTINT_EN__SYS_EN_MASK));
>>>
>>> + /* enable system interrupt for JRBC*/
>>> + reg_temp = RREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_SYS_INT_EN));
>>> + reg_temp |= UVD_SYS_INT_EN__UVD_JRBC_EN_MASK;
>>> + WREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_SYS_INT_EN), reg_temp);
>>> +
>> Shouldn't we move the setting of these interrupts into
>> vcn_v1_0_set_interrupt_state()? Same for the mastint. that way they
>> will get enabled/disabled as part of the fence driver sequence I
>> think. Or do they need to happen in a specific sequence?
>>
>> Alex
>
> Hmm... at least for this JPEG specific case, interrupt won't be raised
> during those times that we don't care about the interrupt. This is not
> like other system component where interrupt might still be raised even
> if we don't care about it. So my feeling is that whether we disable it
> at the beginning and enable it later on, or we just enable it at the
> beginning doesn't really matter in the practical sense.
I agree with Alex here. While we currently don't use that much we would
still like to be able to control interrupts and not just silently enable
them all the time.
Regards,
Christian.
>
> Regards,
> Boyuan
>
>>
>>> /* clear the bit 4 of VCN_STATUS */
>>> WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_STATUS), 0,
>>> ~(2 << UVD_STATUS__VCPU_REPORT__SHIFT));
>>> @@ -1754,7 +1760,7 @@ static const struct amdgpu_irq_src_funcs
>>> vcn_v1_0_irq_funcs = {
>>>
>>> static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev)
>>> {
>>> - adev->vcn.irq.num_types = adev->vcn.num_enc_rings + 1;
>>> + adev->vcn.irq.num_types = adev->vcn.num_enc_rings + 2;
>>> adev->vcn.irq.funcs = &vcn_v1_0_irq_funcs;
>>> }
>>>
>>> --
>>> 2.7.4
>>>
>>> _______________________________________________
>>> 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
next prev parent reply other threads:[~2018-07-24 12:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 20:39 [PATCH 1/5] drm/amdgpu: add system interrupt register offset header boyuan.zhang-5C7GfCeVMHo
[not found] ` <1531946355-17488-1-git-send-email-boyuan.zhang-5C7GfCeVMHo@public.gmane.org>
2018-07-18 20:39 ` [PATCH 2/5] drm/amdgpu: add system interrupt mask for jrbc boyuan.zhang-5C7GfCeVMHo
2018-07-18 20:39 ` [PATCH 3/5] drm/amdgpu: enable system interrupt " boyuan.zhang-5C7GfCeVMHo
[not found] ` <1531946355-17488-3-git-send-email-boyuan.zhang-5C7GfCeVMHo@public.gmane.org>
2018-07-19 18:13 ` Leo Liu
[not found] ` <7ff97103-bd17-3011-103d-a4e2e77099a6-5C7GfCeVMHo@public.gmane.org>
2018-07-19 18:46 ` Zhang, Boyuan
2018-07-19 18:51 ` Alex Deucher
[not found] ` <CADnq5_NFgHpv4Z_2scvRC8y6EYPqUtnsvGXF6g2mD4yEKuQGOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-23 19:53 ` Boyuan Zhang
[not found] ` <763a42d3-c83b-2272-ec01-e11a14bdaf43-5C7GfCeVMHo@public.gmane.org>
2018-07-24 12:50 ` Christian König [this message]
[not found] ` <720bdbc9-eed9-42de-2547-654713e0d20b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-07-25 14:01 ` Boyuan Zhang
[not found] ` <7b6ce506-ec36-6f91-cdef-3e0b21969018-5C7GfCeVMHo@public.gmane.org>
2018-07-25 15:05 ` Alex Deucher
[not found] ` <CADnq5_NoOnf2211EuaPB4vbgSt92seoJViArJtPmc72W=e7a8Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-09 15:52 ` Boyuan Zhang
2018-07-18 20:39 ` [PATCH 4/5] drm/amdgpu: add emit trap for vcn jpeg boyuan.zhang-5C7GfCeVMHo
2018-07-18 20:39 ` [PATCH 5/5] drm/amdgpu: fix emit frame size and comments for jpeg boyuan.zhang-5C7GfCeVMHo
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=720bdbc9-eed9-42de-2547-654713e0d20b@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=boyuan.zhang-5C7GfCeVMHo@public.gmane.org \
--cc=boyzhang-5C7GfCeVMHo@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@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 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.