[PATCH] drm/amdgpu: Each PSP need to get latest topology info on XGMI configuration

Liu, Shaoyun Shaoyun.Liu at amd.com
Fri Nov 9 20:43:59 UTC 2018


For now we depends on the  TA(firmware)  to decided whether the memory 
will be shared or not . They always been  set to enabled within same hive .

Regards

shaoyun.liu

On 2018-11-09 12:53 p.m., Grodzovsky, Andrey wrote:
> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
>
> Question - shouldn't we also set psp_xgmi_node_info.is_sharing_enabled
> to 1 to enable FB sharing ?
>
> Andrey
>
>
> On 11/08/2018 11:14 AM, Liu, Shaoyun wrote:
>> From: shaoyunl <Shaoyun.Liu at amd.com>
>>
>> Driver need to call each psp instance to get topology info before set topology
>>
>> Change-Id: I20d914a0c678686db3f1f99edf250f3656ec9fc1
>> Signed-off-by: shaoyunl <Shaoyun.Liu at amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 19 ++++++++++++-------
>>    1 file changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
>> index 56acdea..909216a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
>> @@ -88,14 +88,19 @@ int amdgpu_xgmi_add_device(struct amdgpu_device *adev)
>>    	list_for_each_entry(entry, &hive->device_list, head)
>>    		tmp_topology->nodes[count++].node_id = entry->node_id;
>>    
>> -	ret = psp_xgmi_get_topology_info(&adev->psp, count, tmp_topology);
>> -	if (ret) {
>> -		dev_err(adev->dev,
>> -			"XGMI: Get topology failure on device %llx, hive %llx, ret %d",
>> -			adev->gmc.xgmi.node_id,
>> -			adev->gmc.xgmi.hive_id, ret);
>> -		goto exit;
>> +	/* Each psp need to get the latest topology */
>> +	list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
>> +		ret = psp_xgmi_get_topology_info(&tmp_adev->psp, count, tmp_topology);
>> +		if (ret) {
>> +			dev_err(tmp_adev->dev,
>> +				"XGMI: Get topology failure on device %llx, hive %llx, ret %d",
>> +				tmp_adev->gmc.xgmi.node_id,
>> +				tmp_adev->gmc.xgmi.hive_id, ret);
>> +			/* To do : continue with some node failed or disable the whole hive */
>> +			break;
>> +		}
>>    	}
>> +
>>    	/* Each psp need to set the latest topology */
>>    	list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
>>    		ret = psp_xgmi_set_topology_info(&tmp_adev->psp, count, tmp_topology);


More information about the amd-gfx mailing list