diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-03-08 09:12:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:53:33 -0400 |
commit | 04e30c9c8667494847f3876fe3e6c8b39fa6fd1b (patch) | |
tree | ae7888abcc213c65fb250df006a5fdc07fdc7160 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | 78910246ddcf9359fbbad506f085ab83b39f876d (diff) |
drm/amdgpu: Merge pre/postclose hooks
Again no apparent explanation for the split except hysterical raisins.
Merging them also makes it a bit more obviuos what's going on wrt the
runtime pm refdancing.
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 096386515f2f..099a90e98a39 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |||
@@ -779,6 +779,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, | |||
779 | if (!fpriv) | 779 | if (!fpriv) |
780 | return; | 780 | return; |
781 | 781 | ||
782 | pm_runtime_get_sync(dev->dev); | ||
783 | |||
782 | amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr); | 784 | amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr); |
783 | 785 | ||
784 | amdgpu_uvd_free_handles(adev, file_priv); | 786 | amdgpu_uvd_free_handles(adev, file_priv); |
@@ -809,21 +811,6 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, | |||
809 | pm_runtime_put_autosuspend(dev->dev); | 811 | pm_runtime_put_autosuspend(dev->dev); |
810 | } | 812 | } |
811 | 813 | ||
812 | /** | ||
813 | * amdgpu_driver_preclose_kms - drm callback for pre close | ||
814 | * | ||
815 | * @dev: drm dev pointer | ||
816 | * @file_priv: drm file | ||
817 | * | ||
818 | * On device pre close, tear down hyperz and cmask filps on r1xx-r5xx | ||
819 | * (all asics). | ||
820 | */ | ||
821 | void amdgpu_driver_preclose_kms(struct drm_device *dev, | ||
822 | struct drm_file *file_priv) | ||
823 | { | ||
824 | pm_runtime_get_sync(dev->dev); | ||
825 | } | ||
826 | |||
827 | /* | 814 | /* |
828 | * VBlank related functions. | 815 | * VBlank related functions. |
829 | */ | 816 | */ |