Commit 7bb39561 authored by Deepak R Varma's avatar Deepak R Varma Committed by Alex Deucher
Browse files

drm/amd/display: Simplify same effect if/else blocks



The if / else block code has same effect irrespective of the logical
evaluation.  Hence, simply the implementation by removing the unnecessary
conditional evaluation. While at it, also fix the long line checkpatch
complaint. Issue identified using cond_no_effect.cocci Coccinelle
semantic patch script.

Fixes: 9114b55f ("drm/amd/display: Fix SubVP control flow in the MPO context")
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarDeepak R Varma <drv@mailo.com>
Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7cb3cfc0
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -3569,14 +3569,9 @@ static void commit_planes_for_stream(struct dc *dc,
		/* Since phantom pipe programming is moved to post_unlock_program_front_end,
		 * move the SubVP lock to after the phantom pipes have been setup
		 */
		if (should_lock_all_pipes && dc->hwss.interdependent_update_lock) {
			if (dc->hwss.subvp_pipe_control_lock)
				dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
		} else {
		if (dc->hwss.subvp_pipe_control_lock)
				dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes, NULL, subvp_prev_use);
		}

			dc->hwss.subvp_pipe_control_lock(dc, context, false, should_lock_all_pipes,
							 NULL, subvp_prev_use);
		return;
	}