drm/amdgpu: Get DRM dev from adev by inline-f
Add a static inline adev_to_drm() to obtain the DRM device pointer from an amdgpu_device pointer. Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
1348969ab6
commit
4a580877bd
@@ -991,6 +991,11 @@ static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)
|
||||
return ddev->dev_private;
|
||||
}
|
||||
|
||||
static inline struct drm_device *adev_to_drm(struct amdgpu_device *adev)
|
||||
{
|
||||
return adev->ddev;
|
||||
}
|
||||
|
||||
static inline struct amdgpu_device *amdgpu_ttm_adev(struct ttm_bo_device *bdev)
|
||||
{
|
||||
return container_of(bdev, struct amdgpu_device, mman.bdev);
|
||||
|
Reference in New Issue
Block a user