[PATCH 04/10] drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF

Michel Dänzer michel at daenzer.net
Thu Sep 1 01:06:01 UTC 2016


On 01/09/16 07:08 AM, Alex Deucher wrote:
> Missed this case previously. No need to do anything if the
> device is already off.  runtime pm will handle it.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2f96334..e6b34dc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1842,7 +1842,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon,
>  
>  	adev = dev->dev_private;
>  
> -	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
> +	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
> +	    dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
>  		return 0;
>  
>  	drm_kms_helper_poll_disable(dev);
> @@ -1926,7 +1927,8 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon,
>  	struct drm_crtc *crtc;
>  	int r;
>  
> -	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
> +	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
> +	    dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
>  		return 0;
>  
>  	if (fbcon) {
> 

This patch and patches 5, 9 & 10 are

Acked-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