All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
	<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>,
	"Monk Liu" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 09/13] drm/amdgpu:fix gmc_v9 vm fault process for SRIOV
Date: Mon, 27 Mar 2017 15:00:30 +0800	[thread overview]
Message-ID: <58D8B88E.4040304@amd.com> (raw)
In-Reply-To: <56a0f0fb-42f7-9b1e-ffaa-caa142a84e1c-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>

On 03/27/2017 02:39 PM, Christian König wrote:
> Am 27.03.2017 um 03:51 schrieb Zhang, Jerry (Junwei):
>> On 03/24/2017 06:38 PM, Monk Liu wrote:
>>> for SRIOV we cannot use access register when in IRQ routine
>>> with regular KIQ method
>>>
>>> Change-Id: Ifae3164cf12311b851ae131f58175f6ec3174f82
>>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
>>> ---
>>>   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 24 ++++++++++++++++--------
>>>   1 file changed, 16 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> index 51a1919..88221bb 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> @@ -138,20 +138,28 @@ static int gmc_v9_0_process_interrupt(struct
>>> amdgpu_device *adev,
>>>       addr = (u64)entry->src_data[0] << 12;
>>>       addr |= ((u64)entry->src_data[1] & 0xf) << 44;
>>>
>>> -    if (entry->vm_id_src) {
>>> -        status = RREG32(mmhub->vm_l2_pro_fault_status);
>>> -        WREG32_P(mmhub->vm_l2_pro_fault_cntl, 1, ~1);
>>> -    } else {
>>> -        status = RREG32(gfxhub->vm_l2_pro_fault_status);
>>> -        WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>>> -    }
>>> +    if (!amdgpu_sriov_vf(adev)) {
>>> +        if (entry->vm_id_src) {
>>> +            status = RREG32(mmhub->vm_l2_pro_fault_status);
>>> +            WREG32_P(mmhub->vm_l2_pro_fault_cntl, 1, ~1);
>>> +        } else {
>>> +            status = RREG32(gfxhub->vm_l2_pro_fault_status);
>>> +            WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>>> +        }
>>
>> Even though SRIOV don't use status info, is it needed to clear vm L2 fault
>> cntl regs?
>
> Actually it is forbidden to clear that register under SRIOV. So the answer is
> no we shouldn't clear it.

Thanks for your clarification.
That's fine.

Jerry

>
>>
>> If not,
>> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com> as well.
>
> Regards,
> Christian.
>
>>
>>>
>>> -    DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
>>> +        DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
>>>             "at page 0x%016llx from %d\n"
>>>             "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>>             entry->vm_id_src ? "mmhub" : "gfxhub",
>>>             entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
>>>             addr, entry->client_id, status);
>>> +    } else {
>>> +        DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
>>> +          "at page 0x%016llx from %d\n",
>>> +          entry->vm_id_src ? "mmhub" : "gfxhub",
>>> +          entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
>>> +          addr, entry->client_id);
>>> +    }
>>>
>>>       return 0;
>>>   }
>>>
>> _______________________________________________
>> 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

  parent reply	other threads:[~2017-03-27  7:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 10:38 [PATCH 00/13] *** VEGA10 SRIOV PATCHES *** Monk Liu
     [not found] ` <1490351912-10122-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 10:38   ` [PATCH 01/13] drm/amdgpu:imple cond_exec for gfx8 Monk Liu
     [not found]     ` <1490351912-10122-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:38       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 02/13] drm/amdgpu:enable mcbp for gfx9 Monk Liu
     [not found]     ` <1490351912-10122-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:38       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 03/13] drm/amdgpu:add KIQ interrupt id Monk Liu
     [not found]     ` <1490351912-10122-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:40       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 04/13] drm/amdgpu:virt_init_setting invoke is missed! Monk Liu
     [not found]     ` <1490351912-10122-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:40       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 05/13] drm/amdgpu:fix ring init sequence Monk Liu
     [not found]     ` <1490351912-10122-6-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-27 15:54       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 06/13] drm/amdgpu:change sequence of SDMA v4 init Monk Liu
     [not found]     ` <1490351912-10122-7-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:46       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 07/13] drm/amdgpu:two fixings for sdma v4 for SRIOV Monk Liu
     [not found]     ` <1490351912-10122-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:47       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 08/13] drm/amdgpu:no cg for soc15 of SRIOV Monk Liu
     [not found]     ` <1490351912-10122-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:47       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 09/13] drm/amdgpu:fix gmc_v9 vm fault process for SRIOV Monk Liu
     [not found]     ` <1490351912-10122-10-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:49       ` Deucher, Alexander
2017-03-27  1:51       ` Zhang, Jerry (Junwei)
     [not found]         ` <58D8700C.1030305-5C7GfCeVMHo@public.gmane.org>
2017-03-27  6:39           ` Christian König
     [not found]             ` <56a0f0fb-42f7-9b1e-ffaa-caa142a84e1c-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-27  7:00               ` Zhang, Jerry (Junwei) [this message]
2017-03-24 10:38   ` [PATCH 10/13] drm/amdgpu:fix ring_write_multiple Monk Liu
     [not found]     ` <1490351912-10122-11-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-27 15:54       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 11/13] drm/amdgpu:fix missing programing critical registers Monk Liu
     [not found]     ` <1490351912-10122-12-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-24 14:50       ` Deucher, Alexander
2017-03-24 10:38   ` [PATCH 12/13] drm/amdgpu:changes in gfx DMAframe scheme Monk Liu
     [not found]     ` <1490351912-10122-13-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-03-27 15:59       ` Deucher, Alexander
2017-03-27 16:16       ` Christian König
     [not found]         ` <0befd76b-3656-af37-e820-8d84660cf20e-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-28  3:23           ` 答复: " Liu, Monk
     [not found]             ` <DM5PR12MB16103525AF905E70A4BB6C0C84320-2J9CzHegvk++jCVTvoAFKAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-28  8:33               ` Christian König
     [not found]                 ` <fc8681ca-4fa1-b75e-da70-7e573059cb85-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-28  8:42                   ` 答复: " Liu, Monk
2017-03-24 10:38   ` [PATCH 13/13] drm/amdgpu:change emit_frame_size of gfx8 Monk Liu
2017-03-24 11:39   ` [PATCH 00/13] *** VEGA10 SRIOV PATCHES *** Yu, Xiangliang

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=58D8B88E.4040304@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@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.