aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-09-15 08:58:48 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-25 14:38:26 -0400
commita7d64de659946e852cd8f2a9691a21ddbb4ebc86 (patch)
tree23d8072cb76d150d6ab08961f233cbffde97ce1a /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentf3fd451263f0dbfb99adaa40d7ac7cc458f9c533 (diff)
drm/amdgpu: remove adev pointer from struct amdgpu_bo v2
It's completely pointless to have two pointers to the device in the same structure. v2: rename function to amdgpu_ttm_adev, fix typos Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 3ad0bf6ce3e4..d4fce326502b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -116,10 +116,11 @@ void amdgpu_gem_force_release(struct amdgpu_device *adev)
116 * Call from drm_gem_handle_create which appear in both new and open ioctl 116 * Call from drm_gem_handle_create which appear in both new and open ioctl
117 * case. 117 * case.
118 */ 118 */
119int amdgpu_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv) 119int amdgpu_gem_object_open(struct drm_gem_object *obj,
120 struct drm_file *file_priv)
120{ 121{
121 struct amdgpu_bo *abo = gem_to_amdgpu_bo(obj); 122 struct amdgpu_bo *abo = gem_to_amdgpu_bo(obj);
122 struct amdgpu_device *adev = abo->adev; 123 struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev);
123 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; 124 struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
124 struct amdgpu_vm *vm = &fpriv->vm; 125 struct amdgpu_vm *vm = &fpriv->vm;
125 struct amdgpu_bo_va *bo_va; 126 struct amdgpu_bo_va *bo_va;
@@ -142,7 +143,7 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,
142 struct drm_file *file_priv) 143 struct drm_file *file_priv)
143{ 144{
144 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); 145 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
145 struct amdgpu_device *adev = bo->adev; 146 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
146 struct amdgpu_fpriv *fpriv = file_priv->driver_priv; 147 struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
147 struct amdgpu_vm *vm = &fpriv->vm; 148 struct amdgpu_vm *vm = &fpriv->vm;
148 149