mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: remove some unneeded code
@ 2017-11-06 11:44 Dan Carpenter
  2017-11-06 11:59 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2017-11-06 11:44 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Christian König, David Airlie, Harry Wentland, Tony Cheng,
	Yongqiang Sun, Dmytro Laktyushkin, Charlene Liu, Vitaly Prosyak,
	amd-gfx, dri-devel, linux-kernel, kernel-janitors

We assign "v_init = asic_blank_start;" a few lines earlier so there is
no need to do it again inside the if statements.  Also "v_init" is
unsigned so it can't be less than zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c
index 1994865d4351..c7333cdf1802 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c
@@ -236,13 +236,10 @@ static void tgn10_program_timing(
 	if (tg->dlg_otg_param.signal == SIGNAL_TYPE_DISPLAY_PORT ||
 		tg->dlg_otg_param.signal == SIGNAL_TYPE_DISPLAY_PORT_MST ||
 		tg->dlg_otg_param.signal == SIGNAL_TYPE_EDP) {
-		v_init = asic_blank_start;
 		start_point = 1;
 		if (patched_crtc_timing.flags.INTERLACE == 1)
 			field_num = 1;
 	}
-	if (v_init < 0)
-		v_init = 0;
 	v_fp2 = 0;
 	if (tg->dlg_otg_param.vstartup_start > asic_blank_end)
 		v_fp2 = tg->dlg_otg_param.vstartup_start > asic_blank_end;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-06 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 11:44 [PATCH] drm/amd/display: remove some unneeded code Dan Carpenter
2017-11-06 11:59 ` Christian König
2017-11-06 21:35   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®