summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-08-04 16:20:31 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:51:00 -0400
commitefd4ccb59a4acb8b85835d6b053362dbacee40f9 (patch)
tree6718cb4d186aa13c1daf45ec3afa8ae0154cc75e /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parent34cb581a7d99401cad0e1c43b528690885435f5b (diff)
downloadblackbird-op-linux-efd4ccb59a4acb8b85835d6b053362dbacee40f9.tar.gz
blackbird-op-linux-efd4ccb59a4acb8b85835d6b053362dbacee40f9.zip
drm/amdgpu: cleanup ctx_mgr init/fini
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 53da3d8a868c..7226def4e8fb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -527,10 +527,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
mutex_init(&fpriv->bo_list_lock);
idr_init(&fpriv->bo_list_handles);
- /* init context manager */
- mutex_init(&fpriv->ctx_mgr.lock);
- idr_init(&fpriv->ctx_mgr.ctx_handles);
- fpriv->ctx_mgr.adev = adev;
+ amdgpu_ctx_mgr_init(&fpriv->ctx_mgr);
file_priv->driver_priv = fpriv;
@@ -571,8 +568,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
idr_destroy(&fpriv->bo_list_handles);
mutex_destroy(&fpriv->bo_list_lock);
- /* release context */
- amdgpu_ctx_fini(fpriv);
+ amdgpu_ctx_mgr_fini(&fpriv->ctx_mgr);
kfree(fpriv);
file_priv->driver_priv = NULL;
OpenPOWER on IntegriCloud