drm/radeon/dpm/rs780: use drm_mode_vrefresh()
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2013 13:23:48 +0000 (09:23 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2013 00:27:48 +0000 (20:27 -0400)
Rather than open coding it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/rs780_dpm.c

index 828a7764660c4ef111edcae7f99119155c7d7a0e..afb75845c161a366f2e71441373c71ea89a926ef 100644 (file)
@@ -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;
                }
        }