dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/radeon: Assign VMID to PASID for IH in non-HWS mode
Date: Tue, 6 Jan 2015 18:42:41 +0200	[thread overview]
Message-ID: <54AC1081.4050304@amd.com> (raw)
In-Reply-To: <CADnq5_NO5EdwX3Wg2DxfXgPc8gX=90QbMJXF12+ko4H1OLOeKw@mail.gmail.com>



On 01/05/2015 08:41 PM, Alex Deucher wrote:
> On Mon, Jan 5, 2015 at 8:52 AM, Oded Gabbay <oded.gabbay@amd.com> wrote:
>> From: Ben Goz <ben.goz@amd.com>
>>
>> This patch fixes a bug in kgd_set_pasid_vmid_mapping(), where the function
>> only updated the ATC registers (IOMMU) with the new VMID <--> PASID mapping,
>> but didn't update the IH (Interrupt) registers.
>>
>> The bug only occurs when using non-HWS mode. In HWS mode, the CP automatically
>> does the VMID <--> PASID mapping.
>>
>> Signed-off-by: Ben Goz <ben.goz@amd.com>
>> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
>
> I'm not too familiar with how these registers work.  I'm assuming they
> are just scratch registers that either the fw or the driver has to
> update depending on the scheduling model?  For the series:
>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
Yes, those registers need to be updated by the driver, if we are working in 
non-HWS mode, or by the fw, if we are working in HWS mode, which is the default 
mode and the "production" mode.

	Oded

>> ---
>>   drivers/gpu/drm/radeon/cikd.h       | 2 ++
>>   drivers/gpu/drm/radeon/radeon_kfd.c | 4 ++++
>>   2 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/radeon/cikd.h b/drivers/gpu/drm/radeon/cikd.h
>> index ba85986..03003f8 100644
>> --- a/drivers/gpu/drm/radeon/cikd.h
>> +++ b/drivers/gpu/drm/radeon/cikd.h
>> @@ -2156,4 +2156,6 @@
>>   #define ATC_VM_APERTURE1_HIGH_ADDR                             0x330Cu
>>   #define ATC_VM_APERTURE1_LOW_ADDR                              0x3304u
>>
>> +#define IH_VMID_0_LUT                                          0x3D40u
>> +
>>   #endif
>> diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c
>> index a55afba..8bf87f1 100644
>> --- a/drivers/gpu/drm/radeon/radeon_kfd.c
>> +++ b/drivers/gpu/drm/radeon/radeon_kfd.c
>> @@ -390,6 +390,10 @@ static int kgd_set_pasid_vmid_mapping(struct kgd_dev *kgd, unsigned int pasid,
>>                  cpu_relax();
>>          write_register(kgd, ATC_VMID_PASID_MAPPING_UPDATE_STATUS, 1U << vmid);
>>
>> +       /* Mapping vmid to pasid also for IH block */
>> +       write_register(kgd, IH_VMID_0_LUT + vmid * sizeof(uint32_t),
>> +                       pasid_mapping);
>> +
>>          return 0;
>>   }
>>
>> --
>> 1.9.1
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2015-01-06 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-05 13:52 [PATCH 1/2] drm/radeon: Assign VMID to PASID for IH in non-HWS mode Oded Gabbay
2015-01-05 13:52 ` [PATCH 2/2] drm/amdkfd: unmap VMID<-->PASID when relesing VMID (non-HWS) Oded Gabbay
2015-01-05 18:41 ` [PATCH 1/2] drm/radeon: Assign VMID to PASID for IH in non-HWS mode Alex Deucher
2015-01-06 16:42   ` Oded Gabbay [this message]

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=54AC1081.4050304@amd.com \
    --to=oded.gabbay@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.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