summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/drm
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-10-23 11:31:29 +0800
committerChia-I Wu <[email protected]>2010-10-23 11:32:06 +0800
commit662e098b560c6983f5ac320cc5ff7a82ecdc5f8a (patch)
tree82120161b11a7d65ff68faa5f69ff78a77565dc2 /src/gallium/state_trackers/egl/drm
parente32ac5b8a963202dcdfb91354f77979765083000 (diff)
st/egl: Fix native_mode refresh mode.
Define the unit to match _EGLMode's.
Diffstat (limited to 'src/gallium/state_trackers/egl/drm')
-rw-r--r--src/gallium/state_trackers/egl/drm/modeset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/egl/drm/modeset.c b/src/gallium/state_trackers/egl/drm/modeset.c
index 06a60770537..5ed22f7b9d4 100644
--- a/src/gallium/state_trackers/egl/drm/modeset.c
+++ b/src/gallium/state_trackers/egl/drm/modeset.c
@@ -469,8 +469,8 @@ drm_display_get_modes(struct native_display *ndpy,
drmmode->base.height = drmmode->mode.vdisplay;
drmmode->base.refresh_rate = drmmode->mode.vrefresh;
/* not all kernels have vrefresh = refresh_rate * 1000 */
- if (drmmode->base.refresh_rate > 1000)
- drmmode->base.refresh_rate = (drmmode->base.refresh_rate + 500) / 1000;
+ if (drmmode->base.refresh_rate < 1000)
+ drmmode->base.refresh_rate *= 1000;
}
nmodes_return = MALLOC(count * sizeof(*nmodes_return));