[PATCH] drm/amdgpu: wait for IB test on first device open

Zhang, Jerry(Junwei) Jerry.Zhang at amd.com
Fri Nov 2 09:40:34 UTC 2018


On 11/2/18 5:32 PM, Christian König wrote:
> Am 02.11.18 um 10:19 schrieb Zhang, Jerry(Junwei):
>> On 11/2/18 4:44 PM, Christian König wrote:
>>> Instead of delaying that to the first query. Otherwise we could try 
>>> to use the
>>> SDMA for VM updates before the IB tests are done.
>>
>> Be curious:
>> Does that happen when App opens dri node without libdrm?
>> since device init always queries info at first.
>
> The problem is at this point we have already created the root PD and 
> cleared it using the SDMA.
>
> So we can end up with the sequence root PD clear -> IB test.
>
> Not much of an issue, but I just noticed this during one of my tests.

Yeah, indeed.
Hope that delay work is executed prior to later root PD clear operation.

Anyway, feel free to add
Reviewed-by: Junwei Zhang <Jerry.Zhang at amd.com>

Jerry

>
> Christian.
>
>>
>> Regards,
>> Jerry
>>>
>>> Signed-off-by: Christian König <christian.koenig at amd.com>
>>> ---
>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++---
>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c 
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> index 08d04f68dfeb..f87f717cc905 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> @@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device 
>>> *dev, void *data, struct drm_file
>>>       if (!info->return_size || !info->return_pointer)
>>>           return -EINVAL;
>>>   -    /* Ensure IB tests are run on ring */
>>> -    flush_delayed_work(&adev->late_init_work);
>>> -
>>>       switch (info->query) {
>>>       case AMDGPU_INFO_ACCEL_WORKING:
>>>           ui32 = adev->accel_working;
>>> @@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device 
>>> *dev, struct drm_file *file_priv)
>>>       struct amdgpu_fpriv *fpriv;
>>>       int r, pasid;
>>>   +    /* Ensure IB tests are run on ring */
>>> +    flush_delayed_work(&adev->late_init_work);
>>> +
>>>       file_priv->driver_priv = NULL;
>>>         r = pm_runtime_get_sync(dev->dev);
>>
>



More information about the amd-gfx mailing list