From: Alex Deucher Date: Fri, 13 Sep 2013 13:23:48 +0000 (-0400) Subject: drm/radeon/dpm/rs780: use drm_mode_vrefresh() X-Git-Tag: firefly_0821_release~176^2~5263^2~8^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c3eaa088277709d3e489c19a5a5b698eefbeb434;p=firefly-linux-kernel-4.4.55.git drm/radeon/dpm/rs780: use drm_mode_vrefresh() Rather than open coding it. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- diff --git a/drivers/gpu/drm/radeon/rs780_dpm.c b/drivers/gpu/drm/radeon/rs780_dpm.c index 828a7764660c..afb75845c161 100644 --- a/drivers/gpu/drm/radeon/rs780_dpm.c +++ b/drivers/gpu/drm/radeon/rs780_dpm.c @@ -62,9 +62,7 @@ static void rs780_get_pm_mode_parameters(struct radeon_device *rdev) radeon_crtc = to_radeon_crtc(crtc); pi->crtc_id = radeon_crtc->crtc_id; if (crtc->mode.htotal && crtc->mode.vtotal) - pi->refresh_rate = - (crtc->mode.clock * 1000) / - (crtc->mode.htotal * crtc->mode.vtotal); + pi->refresh_rate = drm_mode_vrefresh(&crtc->mode); break; } }