[PATCH 01/10] drm/amdgpu: handle runtime pm in drm pre/post close

Michel Dänzer michel at daenzer.net
Fri Sep 2 01:50:07 UTC 2016


On 02/09/16 05:38 AM, Alex Deucher wrote:
> On Wed, Aug 31, 2016 at 9:03 PM, Michel Dänzer <michel at daenzer.net> wrote:
>> On 01/09/16 07:08 AM, Alex Deucher wrote:
>>> Close was not handled correctly.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>>> ---
>>>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> index f1b9e0f..45f98b4 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> @@ -600,6 +600,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
>>>
>>>       kfree(fpriv);
>>>       file_priv->driver_priv = NULL;
>>> +
>>> +     pm_runtime_mark_last_busy(dev->dev);
>>> +     pm_runtime_put_autosuspend(dev->dev);
>>>  }
>>>
>>>  /**
>>> @@ -614,6 +617,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
>>>  void amdgpu_driver_preclose_kms(struct drm_device *dev,
>>>                               struct drm_file *file_priv)
>>>  {
>>> +     pm_runtime_get_sync(dev->dev);
>>>  }
>>
>> What if pm_runtime_get_sync returns an error?
>>
>> Same for patch 6.
> 
> I guess we could report it.

Based on the discussion of patch 3, it doesn't seem necessary. So this
patch and patch 6 are

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list