Commit 9ba59b79 authored by Tarun's avatar Tarun Committed by Ville Syrjälä

drm/i915: Remove redundant check for negative timeout while doing an atomic pipe update

No functional changes, just a minor knit. Stumbled across the kernel doc for
schedule_timeout() which quotes "In all cases the return value is guaranteed
to be non-negative". Also, the return code of schedule_timeout() already checks
for negative values "return timeout < 0 ? 0 : timeout;" and returns 0
in such cases. Furthermore, the msec_to_jiffies returns an ungined long
value. So, let's do away with the redundant check for an atomic
pipe update.

v2: Commit message changes (Manasi).
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Signed-off-by: default avatarTarun Vyas <tarun.vyas@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502233300.81220-1-tarun.vyas@intel.com
parent 3297234a
...@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state) ...@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
if (scanline < min || scanline > max) if (scanline < min || scanline > max)
break; break;
if (timeout <= 0) { if (!timeout) {
DRM_ERROR("Potential atomic update failure on pipe %c\n", DRM_ERROR("Potential atomic update failure on pipe %c\n",
pipe_name(crtc->pipe)); pipe_name(crtc->pipe));
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment