[PATCH 1/7] drm/amdgpu: release VF exclusive accessing after hw_init

Li, Bingley Bingley.Li at amd.com
Wed Oct 25 01:39:25 UTC 2017


Hi Shaoyun,

Can you comment on this?

Regards,
Bingley

-----Original Message-----
From: Ding, Pixel 
Sent: Wednesday, October 25, 2017 9:11 AM
To: Deucher, Alexander <Alexander.Deucher at amd.com>; Liu, Monk <Monk.Liu at amd.com>; Wang, Daniel(Xiaowei) <Daniel.Wang2 at amd.com>
Cc: Sun, Gary <Gary.Sun at amd.com>; Li, Bingley <Bingley.Li at amd.com>; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH 1/7] drm/amdgpu: release VF exclusive accessing after hw_init

Hi all,

I notice that this change will break KFD init on VF. KFD also load HQD which needs to be done in exclusive mode, otherwise KIQ register accessing causes LOAD VF failed at that time. However if we release EX mode after KFD init, the retry init logic will be quite complicated to handle all failures, also the EX mode time consuming is too much. Any idea? 

By now I would drop this change upstream.


— 
Sincerely Yours,
Pixel








On 24/10/2017, 12:23 AM, "Deucher, Alexander" <Alexander.Deucher at amd.com> wrote:

>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
>> Of Pixel Ding
>> Sent: Monday, October 23, 2017 6:03 AM
>> To: amd-gfx at lists.freedesktop.org
>> Cc: Sun, Gary; Ding, Pixel; Li, Bingley
>> Subject: [PATCH 1/7] drm/amdgpu: release VF exclusive accessing after
>> hw_init
>> 
>> The subsequent operations don't need exclusive accessing hardware.
>> 
>> Signed-off-by: Pixel Ding <Pixel.Ding at amd.com>
>
>Acked-by: Alex Deucher <alexander.deucher at amd.com>
>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 3 ---
>>  2 files changed, 5 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 99acf29..286ba3c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -1716,6 +1716,11 @@ static int amdgpu_init(struct amdgpu_device
>> *adev)
>>  		adev->ip_blocks[i].status.hw = true;
>>  	}
>> 
>> +	if (amdgpu_sriov_vf(adev)) {
>> +		DRM_INFO("rel_init\n");
>> +		amdgpu_virt_release_full_gpu(adev, true);
>> +	}
>> +
>>  	return 0;
>>  }
>> 
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> index 4a9f749..f2eb7ac 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>> @@ -171,9 +171,6 @@ int amdgpu_driver_load_kms(struct drm_device
>> *dev, unsigned long flags)
>>  		pm_runtime_put_autosuspend(dev->dev);
>>  	}
>> 
>> -	if (amdgpu_sriov_vf(adev))
>> -		amdgpu_virt_release_full_gpu(adev, true);
>> -
>>  out:
>>  	if (r) {
>>  		/* balance pm_runtime_get_sync in
>> amdgpu_driver_unload_kms */
>> --
>> 2.9.5
>> 
>> _______________________________________________
>> 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