summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-09 08:52:53 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-04-09 08:52:53 -0700
commit7e2b1a6cf55579c6f8b1fd56a97e9f41e34b88fc (patch)
treefae38788fc71d275c7dfdccaa38c00a5ebb53a17
parentab7ee9c1af3bd844653a83b5160773db671bbcad (diff)
Fix refresh calculation (mistakenly removed 1000 factor needed for integer calulations, fixed mode printout debugging routine instead).
-rw-r--r--linux-core/drm_modes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/drm_modes.c b/linux-core/drm_modes.c
index 1ae43447..bedef163 100644
--- a/linux-core/drm_modes.c
+++ b/linux-core/drm_modes.c
@@ -37,7 +37,7 @@ void drm_mode_debug_printmodeline(struct drm_device *dev,
struct drm_display_mode *mode)
{
DRM_DEBUG("Modeline \"%s\" %d %d %d %d %d %d %d %d %d %d\n",
- mode->name, mode->vrefresh, mode->clock,
+ mode->name, mode->vrefresh / 1000, mode->clock,
mode->hdisplay, mode->hsync_start,
mode->hsync_end, mode->htotal,
mode->vdisplay, mode->vsync_start,
@@ -75,7 +75,7 @@ int drm_mode_vrefresh(struct drm_display_mode *mode)
if (mode->vrefresh > 0)
refresh = mode->vrefresh;
else if (mode->htotal > 0 && mode->vtotal > 0) {
- refresh = (mode->clock * 1000) / mode->htotal / mode->vtotal;
+ refresh = ((mode->clock * 1000) * 1000) / mode->htotal / mode->vtotal;
if (mode->flags & V_INTERLACE)
refresh *= 2;
if (mode->flags & V_DBLSCAN)