drm/amd/display: Calc vline position in dc.
Hello Yongqiang Sun,
The patch 810ece19ee74: "drm/amd/display: Calc vline position in dc." from Jan 24, 2019, leads to the following static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c:152 calc_vline_position() warn: inconsistent indenting
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_optc.c
134 static void calc_vline_position(
135 struct timing_generator *optc,
136 const struct dc_crtc_timing *dc_crtc_timing,
137 unsigned long long vsync_delta,
138 uint32_t *start_line,
139 uint32_t *end_line)
140 {
141 unsigned long long req_delta_tens_of_usec = div64_u64((vsync_delta + 9999), 10000);
142 unsigned long long pix_clk_hundreds_khz = div64_u64((dc_crtc_timing->pix_clk_100hz + 999), 1000);
143 uint32_t req_delta_lines = (uint32_t) div64_u64(
144 (req_delta_tens_of_usec * pix_clk_hundreds_khz + dc_crtc_timing->h_total - 1),
145 dc_crtc_timing->h_total);
146
147 uint32_t vsync_line = get_start_vline(optc, dc_crtc_timing);
148
149 if (req_delta_lines != 0)
150 req_delta_lines--;
^^^^^^^My guess is that everything is indented one extra tab.
151
--> 152 if (req_delta_lines > vsync_line)
^^^^^^^It's also possible that this was supposed to be part of the if statement? Missing curly braces? But I don't know for sure.
153 *start_line = dc_crtc_timing->v_total - (req_delta_lines - vsync_line) - 1;
154 else
155 *start_line = vsync_line - req_delta_lines;
156
157 *end_line = *start_line + 2;
158
159 if (*end_line >= dc_crtc_timing->v_total)
160 *end_line = 2;
161 }regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx