Skip to content

Commit 9ba59b7

Browse files
tvyasvsyrjala
authored andcommitted
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 <[email protected]> Signed-off-by: Tarun Vyas <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3297234 commit 9ba59b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/intel_sprite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state)
131131
if (scanline < min || scanline > max)
132132
break;
133133

134-
if (timeout <= 0) {
134+
if (!timeout) {
135135
DRM_ERROR("Potential atomic update failure on pipe %c\n",
136136
pipe_name(crtc->pipe));
137137
break;

0 commit comments

Comments
 (0)