[PATCH] drm/amdkfd:Check use_xgmi_p2p before reporting hive_id

Paul Menzel pmenzel at molgen.mpg.de
Wed Mar 23 06:31:42 UTC 2022


Dear Divya,


Thank you for your patch.

Am 22.03.22 um 20:23 schrieb Divya Shikre:

Please add a space after the colon in the commit message summary.

> XGMI iolinks will not be created in KFD topology when use_xgmi_p2p module parameter
> is disabled in a dGPU.

1.  Is “will not be” the current problem, or the result of your patch? 
Please start by describing the current problem, how to reproduce it.

2.  Please wrap lines after 75 characters, and add a blank line between 
paragraphs.

The script `scripts/checkpatch.pl`, you should run on all your patches 
before submitting them, also warns about the first issue:

     WARNING: Possible unwrapped commit description (prefer a maximum 75 
chars per line)

> In this case PCIe p2p links will be used instead.

Is this a regression, and fixes another commit? If so, please add a 
Fixes line.

> Signed-off-by: Divya Shikre <DivyaUday.Shikre at amd.com>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 339e12c94cff..d5536e33b3d8 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -536,7 +536,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
>   		goto kfd_doorbell_error;
>   	}
>   
> -	kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;
> +	if (amdgpu_use_xgmi_p2p)
> +		kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;

Is hive_id now unset?

>   	kfd->noretry = kfd->adev->gmc.noretry;
>   


Kind regards,

Paul


More information about the amd-gfx mailing list