aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun <tarun.vyas@intel.com>2018-05-02 19:33:00 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-05-03 11:09:39 -0400
commit9ba59b79dc699af38624e1dc337f07d99b376c27 (patch)
tree39ab9e793eb9c52a020f723f74d4b1607c12bca1
parent3297234a05ab1e90091b0574db4c397ef0e90d5f (diff)
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: Manasi Navare <manasi.d.navare@intel.com> Signed-off-by: Tarun Vyas <tarun.vyas@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180502233300.81220-1-tarun.vyas@intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index aa1dfaa692b9..9cd4be020840 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
131 if (scanline < min || scanline > max) 131 if (scanline < min || scanline > max)
132 break; 132 break;
133 133
134 if (timeout <= 0) { 134 if (!timeout) {
135 DRM_ERROR("Potential atomic update failure on pipe %c\n", 135 DRM_ERROR("Potential atomic update failure on pipe %c\n",
136 pipe_name(crtc->pipe)); 136 pipe_name(crtc->pipe));
137 break; 137 break;