Skip to content

Commit a6e23be

Browse files
qlyjsldalexdeucher
authored andcommitted
drm/radeon: add helper rdev_to_drm(rdev)
Add helper rdev_to_drm(rdev), similar to amdgpu, most function should access the "drm_device" with "rdev_to_drm(rdev)" instead, where amdgpu has "adev_to_drm(adev)". It also makes changing from "*drm_device" to "drm_device" in "radeon_devicce" later on easier. Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Wu Hoi Pok <wuhoipok@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 78dd6a8 commit a6e23be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/radeon/radeon.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,6 +2476,11 @@ void r100_io_wreg(struct radeon_device *rdev, u32 reg, u32 v);
24762476
u32 cik_mm_rdoorbell(struct radeon_device *rdev, u32 index);
24772477
void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
24782478

2479+
static inline struct drm_device *rdev_to_drm(struct radeon_device *rdev)
2480+
{
2481+
return rdev->ddev;
2482+
}
2483+
24792484
/*
24802485
* Cast helper
24812486
*/

0 commit comments

Comments
 (0)