* [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
@ 2021-12-06 8:45 Christian König
2021-12-07 1:58 ` Quan, Evan
0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2021-12-06 8:45 UTC (permalink / raw)
To: Alexander.Deucher; +Cc: amd-gfx
The runtime PM get was incorrectly added after the check.
Signed-off-by: Christian König <christian.koenig@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
2021-12-06 8:45 [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config Christian König
@ 2021-12-07 1:58 ` Quan, Evan
2021-12-07 7:03 ` Christian König
0 siblings, 1 reply; 6+ messages in thread
From: Quan, Evan @ 2021-12-07 1:58 UTC (permalink / raw)
To: Christian König, Deucher, Alexander; +Cc: amd-gfx
[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@lists.freedesktop.org> On Behalf Of
> Christian König
> Sent: Monday, December 6, 2021 4:46 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: amd-gfx@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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
2021-12-07 1:58 ` Quan, Evan
@ 2021-12-07 7:03 ` Christian König
2021-12-07 7:40 ` Quan, Evan
0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2021-12-07 7:03 UTC (permalink / raw)
To: Quan, Evan, Deucher, Alexander; +Cc: amd-gfx
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@lists.freedesktop.org> On Behalf Of
>> Christian König
>> Sent: Monday, December 6, 2021 4:46 PM
>> To: Deucher, Alexander <Alexander.Deucher@amd.com>
>> Cc: amd-gfx@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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
2021-12-07 7:03 ` Christian König
@ 2021-12-07 7:40 ` Quan, Evan
2021-12-09 15:34 ` Christian König
0 siblings, 1 reply; 6+ messages in thread
From: Quan, Evan @ 2021-12-07 7:40 UTC (permalink / raw)
To: Christian König, Deucher, Alexander; +Cc: amd-gfx
[AMD Official Use Only]
> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Tuesday, December 7, 2021 3:03 PM
> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
>
> You are looking at outdated code, that stuff is gone by now.
> amd-staging-drm-next probably needs a rebase.
Yep, I can see it in the vanilla kernel.
The patch is acked-by: Evan Quan <evan.quan@amd.com>
BR
Evan
>
> 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@lists.freedesktop.org> On Behalf Of
> >> Christian König
> >> Sent: Monday, December 6, 2021 4:46 PM
> >> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> >> Cc: amd-gfx@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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
2021-12-07 7:40 ` Quan, Evan
@ 2021-12-09 15:34 ` Christian König
2021-12-09 15:46 ` Deucher, Alexander
0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2021-12-09 15:34 UTC (permalink / raw)
To: Quan, Evan, Deucher, Alexander; +Cc: amd-gfx
Am 07.12.21 um 08:40 schrieb Quan, Evan:
> [AMD Official Use Only]
>> -----Original Message-----
>> From: Christian König <ckoenig.leichtzumerken@gmail.com>
>> Sent: Tuesday, December 7, 2021 3:03 PM
>> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>
>> Cc: amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
>>
>> You are looking at outdated code, that stuff is gone by now.
>> amd-staging-drm-next probably needs a rebase.
> Yep, I can see it in the vanilla kernel.
> The patch is acked-by: Evan Quan <evan.quan@amd.com>
Thanks.
Alex any objections that I push this to drm-misc-next? It was found
while working on changes already upstream in that function and would
conflict if we push it through amd-staging-drm-next.
Regards,
Christian.
>
> BR
> Evan
>> 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@lists.freedesktop.org> On Behalf Of
>>>> Christian König
>>>> Sent: Monday, December 6, 2021 4:46 PM
>>>> To: Deucher, Alexander <Alexander.Deucher@amd.com>
>>>> Cc: amd-gfx@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@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
2021-12-09 15:34 ` Christian König
@ 2021-12-09 15:46 ` Deucher, Alexander
0 siblings, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2021-12-09 15:46 UTC (permalink / raw)
To: Christian König, Quan, Evan; +Cc: amd-gfx
[-- Attachment #1: Type: text/plain, Size: 3185 bytes --]
[Public]
No objections from me.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Thursday, December 9, 2021 10:34 AM
To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
Am 07.12.21 um 08:40 schrieb Quan, Evan:
> [AMD Official Use Only]
>> -----Original Message-----
>> From: Christian König <ckoenig.leichtzumerken@gmail.com>
>> Sent: Tuesday, December 7, 2021 3:03 PM
>> To: Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander
>> <Alexander.Deucher@amd.com>
>> Cc: amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config
>>
>> You are looking at outdated code, that stuff is gone by now.
>> amd-staging-drm-next probably needs a rebase.
> Yep, I can see it in the vanilla kernel.
> The patch is acked-by: Evan Quan <evan.quan@amd.com>
Thanks.
Alex any objections that I push this to drm-misc-next? It was found
while working on changes already upstream in that function and would
conflict if we push it through amd-staging-drm-next.
Regards,
Christian.
>
> BR
> Evan
>> 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@lists.freedesktop.org> On Behalf Of
>>>> Christian König
>>>> Sent: Monday, December 6, 2021 4:46 PM
>>>> To: Deucher, Alexander <Alexander.Deucher@amd.com>
>>>> Cc: amd-gfx@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@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
[-- Attachment #2: Type: text/html, Size: 5631 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-09 17:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 8:45 [PATCH] drm/amdgpu: don't skip runtime pm get on A+A config Christian König
2021-12-07 1:58 ` Quan, Evan
2021-12-07 7:03 ` Christian König
2021-12-07 7:40 ` Quan, Evan
2021-12-09 15:34 ` Christian König
2021-12-09 15:46 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.