summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-08-27 12:27:24 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-02 10:34:48 -0400
commitd6bda7b4b4997f1062844dbc8b47708d244c10be (patch)
tree47c6b5c27b483897f91f4f310d69bc587ced42f0
parent32c59dc14b72803f20742e5b6e515d39e90dbb83 (diff)
downloadtalos-op-linux-d6bda7b4b4997f1062844dbc8b47708d244c10be.tar.gz
talos-op-linux-d6bda7b4b4997f1062844dbc8b47708d244c10be.zip
drm/amdgpu: handle runtime pm in drm pre/post close
Close was not handled correctly. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index cc4ae1103332..c2c7fb140338 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -601,6 +601,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);
}
/**
@@ -615,6 +618,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);
}
/*
OpenPOWER on IntegriCloud