AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: On DCN1, Wait for vupdate on cursor updates
@ 2019-03-25  6:17 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-03-25  6:17 UTC (permalink / raw)
  To: David.Francis-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hello David Francis,

The patch c6ade4ee7375: "drm/amd/display: On DCN1, Wait for vupdate
on cursor updates" from Feb 21, 2019, leads to the following static
checker warning:

	drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:216 delay_cursor_until_vupdate()
	error: uninitialized symbol 'vpos'.

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c
    202 static void delay_cursor_until_vupdate(struct pipe_ctx *pipe_ctx, struct dc *dc)
    203 {
    204 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
    205 	unsigned int vupdate_line;
    206 	unsigned int lines_to_vupdate, us_to_vupdate, vpos, nvpos;
    207 	struct dc_stream_state *stream = pipe_ctx->stream;
    208 	unsigned int us_per_line;
    209 
    210 	if (stream->ctx->asic_id.chip_family == FAMILY_RV &&
    211 			ASIC_REV_IS_RAVEN(stream->ctx->asic_id.hw_internal_rev)) {
    212 
    213 		vupdate_line = get_vupdate_offset_from_vsync(pipe_ctx);
    214 		dc_stream_get_crtc_position(dc, &stream, 1, &vpos, &nvpos);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Can return false on failure.

    215 
--> 216 		if (vpos >= vupdate_line)
    217 			return;
    218 
    219 		us_per_line = stream->timing.h_total * 10000 / stream->timing.pix_clk_100hz;
    220 		lines_to_vupdate = vupdate_line - vpos;
    221 		us_to_vupdate = lines_to_vupdate * us_per_line;
    222 
    223 		/* 70 us is a conservative estimate of cursor update time*/
    224 		if (us_to_vupdate < 70)
    225 			udelay(us_to_vupdate);
    226 	}
    227 #endif
    228 }

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-25  6:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-25  6:17 [bug report] drm/amd/display: On DCN1, Wait for vupdate on cursor updates Dan Carpenter

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