[PATCH] drm/amdgpu: don't skip runtime pm get on A+A config

Christian König ckoenig.leichtzumerken at gmail.com
Tue Dec 7 07:03:28 UTC 2021


You are looking at outdated code, that stuff is gone by now. 
amd-staging-drm-next probably needs a rebase.

And this code was what the check was initially good for. Just skipping 
the PM stuff as well on A+A was unintentionally.

Regards,
Christian.

Am 07.12.21 um 02:58 schrieb Quan, Evan:
> [AMD Official Use Only]
>
> It seems more jobs(below) other than bumping the runpm counter are performed.
> Are they desired also?
>
> 	r = __dma_resv_make_exclusive(bo->tbo.base.resv);
> 	if (r)
> 		goto out;
>
> 	bo->prime_shared_count++;
>
> BR
> Evan
>> -----Original Message-----
>> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
>> Christian König
>> Sent: Monday, December 6, 2021 4:46 PM
>> To: Deucher, Alexander <Alexander.Deucher at amd.com>
>> Cc: amd-gfx at lists.freedesktop.org
>> Subject: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
>>
>> The runtime PM get was incorrectly added after the check.
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> index ae6ab93c868b..4896c876ffec 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
>> @@ -61,9 +61,6 @@ static int amdgpu_dma_buf_attach(struct dma_buf
>> *dmabuf,
>>   	if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true)
>> < 0)
>>   		attach->peer2peer = false;
>>
>> -	if (attach->dev->driver == adev->dev->driver)
>> -		return 0;
>> -
>>   	r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
>>   	if (r < 0)
>>   		goto out;
>> --
>> 2.25.1



More information about the amd-gfx mailing list