On 2019-09-26 5:59 p.m., Zhao, Yong wrote:
> On 2019-09-26 5:36 p.m., Kuehling, Felix wrote:
>> Minor nit-pick inline. Otherwise this patch is
>>
>> Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com>
>>
>> On 2019-09-26 5:27 p.m., Zhao, Yong wrote:
>>> This makes possible the vmid pasid mapping query through software.
>>>
>>> Change-Id: Ib539aae277a227cc39f6469ae23c46c4d289b87b
>>> Signed-off-by: Yong Zhao <yong.z...@amd.com>
>>> ---
>>>     .../drm/amd/amdkfd/kfd_device_queue_manager.c | 33 ++++++++++++-------
>>>     .../drm/amd/amdkfd/kfd_device_queue_manager.h |  3 +-
>>>     drivers/gpu/drm/amd/amdkfd/kfd_priv.h         |  2 ++
>>>     3 files changed, 25 insertions(+), 13 deletions(-)
>>>
[snip]
>>>     
>>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h 
>>> b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
>>> index eed8f950b663..99c8b36301ef 100644
>>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
>>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
>>> @@ -188,7 +188,8 @@ struct device_queue_manager {
>>>             unsigned int            *allocated_queues;
>>>             uint64_t                sdma_bitmap;
>>>             uint64_t                xgmi_sdma_bitmap;
>>> -   unsigned int            vmid_bitmap;
>>> +   /* the pasid mapping for each kfd vmid */
>>> +   uint16_t                vmid_pasid[VMID_NUM];
>>>             uint64_t                pipelines_addr;
>>>             struct kfd_mem_obj      *pipeline_mem;
>>>             uint64_t                fence_gpu_addr;
>>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h 
>>> b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>>> index 0d2c7fa1fa46..a08015720841 100644
>>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
>>> @@ -43,6 +43,8 @@
>>>     
>>>     #include "amd_shared.h"
>>>     
>>> +#define VMID_NUM 16
>>> +
>> Any good reason why this is not defined in kfd_device_queue_manager.h?
>> It's only used there.
> [yz] It could be used by other places in the future, as they use 16
> directly now.

Can you point out those places? A quick grep for hard-coded 16 in kfd 
doesn't show up anything VMID-related on a first glance.

Regards,
   Felix


>>
>>>     #define KFD_MAX_RING_ENTRY_SIZE 8
>>>     
>>>     #define KFD_SYSFS_FILE_MODE 0444
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to