[bug report] drm/amd/display: On DCN1, Wait for vupdate on cursor updates
Dan Carpenter
dan.carpenter at oracle.com
Mon Mar 25 06:17:42 UTC 2019
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
More information about the amd-gfx
mailing list