Skip to contentSkip to conversation

drm/amdgpu/display: revert random whitespace changes

PATCH In review Alex Deucher 2 participants 3 messages May 17, 2021 – May 18, 2021

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amdgpu/display: revert random whitespace changes

Commit 458ef68e972878 ("drm/amd/display: Add get_current_time interface to dmub_srv") introduced a bunch of random whitespace changes which lead
to compiler warnings. Revert those changes to fix the warning
and keep the code readable. No intended functional change.

Fixes 458ef68e972878 ("drm/amd/display: Add get_current_time interface to dmub_srv")
Cc Wyatt Wood <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 36 +++++++++----------
 .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c |  8 ++---
 drivers/gpu/drm/amd/display/dc/dm_services.h  |  1 +
 3 files changed, 23 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -18
index b4aa20250301..ef157b83bacd 100644
@@ -2636,14 +2636,14 @@ static void commit_planes_for_stream(struct dc *dc,
 						top_pipe_to_program->stream_res.tg);
 		}
 
-		if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
-			dc->hwss.interdependent_update_lock(dc, context, true);
-		else
-			/* Lock the top pipe while updating plane addrs, since freesync requires
-			 *  plane addr update event triggers to be synchronized.
-			 *  top_pipe_to_program is expected to never be NULL
-			 */
-			dc->hwss.pipe_control_lock(dc, top_pipe_to_program, true);
+	if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
+		dc->hwss.interdependent_update_lock(dc, context, true);
+	else
+		/* Lock the top pipe while updating plane addrs, since freesync requires
+		 *  plane addr update event triggers to be synchronized.
+		 *  top_pipe_to_program is expected to never be NULL
+		 */
+		dc->hwss.pipe_control_lock(dc, top_pipe_to_program, true);
 
 	// Stream updates
 	if (stream_update)
@@ -2659,10 +2659,10 @@ static void commit_planes_for_stream(struct dc *dc,
 		if (dc->hwss.program_front_end_for_ctx)
 			dc->hwss.program_front_end_for_ctx(dc, context);
 
-			if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
-				dc->hwss.interdependent_update_lock(dc, context, false);
-			else
-				dc->hwss.pipe_control_lock(dc, top_pipe_to_program, false);
+		if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
+			dc->hwss.interdependent_update_lock(dc, context, false);
+		else
+			dc->hwss.pipe_control_lock(dc, top_pipe_to_program, false);
 		dc->hwss.post_unlock_program_front_end(dc, context);
 		return;
 	}
@@ -2789,10 +2789,10 @@ static void commit_planes_for_stream(struct dc *dc,
 
 	}
 
-		if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
-			dc->hwss.interdependent_update_lock(dc, context, false);
-		else
-			dc->hwss.pipe_control_lock(dc, top_pipe_to_program, false);
+	if ((update_type != UPDATE_TYPE_FAST) && dc->hwss.interdependent_update_lock)
+		dc->hwss.interdependent_update_lock(dc, context, false);
+	else
+		dc->hwss.pipe_control_lock(dc, top_pipe_to_program, false);
 
 	if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
 		if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
@@ -2838,8 +2838,8 @@ static void commit_planes_for_stream(struct dc *dc,
 				pipe_ctx->plane_state->skip_manual_trigger)
 			continue;
 
-			if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger)
-				pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
+		if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger)
+			pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
 	}
 }
 
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c +4 -4
index e7c56df8f762..b0c9180b808f 100644
@@ -795,10 +795,10 @@ bool hubp21_program_surface_flip_and_addr(
 	flip_regs.tmz_surface = address->tmz_surface;
 	flip_regs.immediate = flip_immediate;
 
-		if (hubp->ctx->dc->debug.enable_dmcub_surface_flip && address->type == PLN_ADDR_TYPE_VIDEO_PROGRESSIVE)
-			dmcub_PLAT_54186_wa(hubp, &flip_regs);
-		else
-			program_surface_flip_and_addr(hubp, &flip_regs);
+	if (hubp->ctx->dc->debug.enable_dmcub_surface_flip && address->type == PLN_ADDR_TYPE_VIDEO_PROGRESSIVE)
+		dmcub_PLAT_54186_wa(hubp, &flip_regs);
+	else
+		program_surface_flip_and_addr(hubp, &flip_regs);
 
 	hubp->request_address = *address;
 
drivers/gpu/drm/amd/display/dc/dm_services.h +1 -0
index 7a3beaecd19d..9a3f2a44f882 100644
@@ -264,6 +264,7 @@ static inline unsigned long long dm_get_timestamp(struct dc_context *ctx)
 unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx,
 		unsigned long long current_time_stamp,
 		unsigned long long last_time_stamp);
+
 /*
  * performance tracing
  */
Signature · 6 lines
2.31.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author maintainer
#1 lore raw

PATCH 2/2 drm/amdgpu/display/dc: drop un used variables

Unused so remove them.

Fixes 5791d219561cb6 ("drm/amd/display: Refactor and add visual confirm for HW Flip Queue")
Cc Wyatt Wood <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 -
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c        | 1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -1
index 85a947015945..81803463ca9b 100644
@@ -2521,7 +2521,6 @@ void dcn10_update_visual_confirm_color(struct dc *dc, struct pipe_ctx *pipe_ctx,
 
 void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
-	struct dce_hwseq *hws = dc->hwseq;
 	struct hubp *hubp = pipe_ctx->plane_res.hubp;
 	struct mpcc_blnd_cfg blnd_cfg = {{0}};
 	bool per_pixel_alpha = pipe_ctx->plane_state->per_pixel_alpha && pipe_ctx->bottom_pipe;
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0 -1
index 558821e5ed2f..25de15158801 100644
@@ -2286,7 +2286,6 @@ void dcn20_update_visual_confirm_color(struct dc *dc, struct pipe_ctx *pipe_ctx,
 
 void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
-	struct dce_hwseq *hws = dc->hwseq;
 	struct hubp *hubp = pipe_ctx->plane_res.hubp;
 	struct mpcc_blnd_cfg blnd_cfg = { {0} };
 	bool per_pixel_alpha = pipe_ctx->plane_state->per_pixel_alpha;
Signature · 6 lines
2.31.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu/display/dc: drop un used variables

Quoted 5 lines · Alex Deucher

Unused so remove them.

Fixes 5791d219561cb6 ("drm/amd/display: Refactor and add visual confirm for HW Flip Queue")
Cc Wyatt Wood <[email protected]>

Series is

Harry

Quoted 23 lines
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 -
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c        | 1 -
 2 files changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -1
index 85a947015945..81803463ca9b 100644
@@ -2521,7 +2521,6 @@ void dcn10_update_visual_confirm_color(struct dc *dc, struct pipe_ctx *pipe_ctx,
 
 void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
-	struct dce_hwseq *hws = dc->hwseq;
 	struct hubp *hubp = pipe_ctx->plane_res.hubp;
 	struct mpcc_blnd_cfg blnd_cfg = {{0}};
 	bool per_pixel_alpha = pipe_ctx->plane_state->per_pixel_alpha && pipe_ctx->bottom_pipe;
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0 -0
index 558821e5ed2f..25de15158801 100644

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c void dcn20_update_visual_confirm_color(struct dc *dc, struct pipe_ctx *pipe_ctx, · line 2291

Quoted 7 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0 -1
@@ -2286,7 +2286,6 @@ void dcn20_update_visual_confirm_color(struct dc *dc, struct pipe_ctx *pipe_ctx,
 
 void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
-	struct dce_hwseq *hws = dc->hwseq;
 	struct hubp *hubp = pipe_ctx->plane_res.hubp;
 	struct mpcc_blnd_cfg blnd_cfg = { {0} };
 	bool per_pixel_alpha = pipe_ctx->plane_state->per_pixel_alpha;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx