diff options
| author | Luben Tuikov <luben.tuikov@amd.com> | 2020-08-24 12:27:47 -0400 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2020-08-24 13:06:06 -0400 | 
| commit | 1348969ab68cb864034ec4fe48a86c157cc4e10d (patch) | |
| tree | 004ac0060e3e546d4cea65f93c633e16f17366af /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | |
| parent | 50166d1ce59e8f78660102ac07fea515ed695234 (diff) | |
drm/amdgpu: drm_device to amdgpu_device by inline-f (v2)
Get the amdgpu_device from the DRM device by use
of an inline function, drm_to_adev(). The inline
function resolves a pointer to struct drm_device
to a pointer to struct amdgpu_device.
v2: Use a typed visible static inline function
    instead of an invisible macro.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index d76172965199..e7ebc7bb70de 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -152,7 +152,7 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,  				struct drm_modeset_acquire_ctx *ctx)  {  	struct drm_device *dev = crtc->dev; -	struct amdgpu_device *adev = dev->dev_private; +	struct amdgpu_device *adev = drm_to_adev(dev);  	struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);  	struct drm_gem_object *obj;  	struct amdgpu_flip_work *work; @@ -292,7 +292,7 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,  	pm_runtime_mark_last_busy(dev->dev); -	adev = dev->dev_private; +	adev = drm_to_adev(dev);  	/* if we have active crtcs and we don't have a power ref,  	   take the current one */  	if (active && !adev->have_disp_power_ref) { @@ -813,7 +813,7 @@ int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,  	int vbl_start, vbl_end, vtotal, ret = 0;  	bool in_vbl = true; -	struct amdgpu_device *adev = dev->dev_private; +	struct amdgpu_device *adev = drm_to_adev(dev);  	/* preempt_disable_rt() should go right here in PREEMPT_RT patchset. */  | 
