diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2009-09-29 04:31:49 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-02 15:12:31 -0400 |
commit | 0d0884cee3099ec1271a5d379c39b66de1e31923 (patch) | |
tree | dae97d59535be5efe22413b5a0579756405d0d58 /drivers/gpu/drm/i915/intel_tv.c | |
parent | 8d23adf7610f2c000c08abe3941c493952d21a61 (diff) |
drm/i915: Multiply the refresh by 1000 in TV mode validatiion
As of 559ee21d261a54c42594ef9405d27e9008eedf44 the actual refresh rate
is returned by the function of drm_mode_vrefresh, so multiply the refresh
rate by 1000 in TV mode validation.
At the same time the error is expanded from 10 to 1000.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_tv.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index c64eab493fb0..9ca917931afb 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1082,7 +1082,8 @@ intel_tv_mode_valid(struct drm_connector *connector, struct drm_display_mode *mo | |||
1082 | const struct tv_mode *tv_mode = intel_tv_mode_find(intel_output); | 1082 | const struct tv_mode *tv_mode = intel_tv_mode_find(intel_output); |
1083 | 1083 | ||
1084 | /* Ensure TV refresh is close to desired refresh */ | 1084 | /* Ensure TV refresh is close to desired refresh */ |
1085 | if (tv_mode && abs(tv_mode->refresh - drm_mode_vrefresh(mode)) < 10) | 1085 | if (tv_mode && abs(tv_mode->refresh - drm_mode_vrefresh(mode) * 1000) |
1086 | < 1000) | ||
1086 | return MODE_OK; | 1087 | return MODE_OK; |
1087 | return MODE_CLOCK_RANGE; | 1088 | return MODE_CLOCK_RANGE; |
1088 | } | 1089 | } |