[PATCH 2/2] drm/amdkfd: Query vmid pasid mapping through stored info
Liu, Shaoyun
Shaoyun.Liu at amd.com
Thu Sep 26 21:02:17 UTC 2019
I think this is only for none-hws case . HWS may dynamic change the
mapping and driver will not get updated . If that's the case , please
specify this is for none hardware scheduler case in the header .
Regards
shaoyun.liu
On 2019-09-26 4:07 p.m., Kuehling, Felix wrote:
> On 2019-09-26 3:46 p.m., Zhao, Yong wrote:
>> Because we record the mapping in the software, we can query pasid
>> through vmid using the stored mapping instead of reading from ATC
>> registers.
>>
>> This also prepares for the defeatured ATC block in future ASICs.
>>
>> Change-Id: I781cb9d30dc0cc93379908ff1cf8da798bb26f13
>> Signed-off-by: Yong Zhao <Yong.Zhao at amd.com>
>> ---
>> drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
>> index ab8a695c4a3c..754c052b7d72 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
>> @@ -58,8 +58,9 @@ static bool event_interrupt_isr_v9(struct kfd_dev *dev,
>> memcpy(patched_ihre, ih_ring_entry,
>> dev->device_info->ih_ring_entry_size);
>>
>> - pasid = dev->kfd2kgd->get_atc_vmid_pasid_mapping_pasid(
>> - dev->kgd, vmid);
>> + pasid = dev->dqm->vmid_pasid[vmid];
>> + if (!pasid)
>> + pr_err("pasid is not queried correctly\n");
> This error message is not helpful. A helpful message may be something
> like "No PASID assigned for VMID %d". That said, printing error messages
> in an interrupt handler that can be potentially very frequent is not the
> best idea. There is already a WARN_ONCE a few lines below that should be
> triggered if PASID is not assigned.
>
> Regards,
> Felix
>
>
>>
>> /* Patch the pasid field */
>> patched_ihre[3] = cpu_to_le32((le32_to_cpu(patched_ihre[3])
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list