* [bug report] drm/amd/display: Calc vline position in dc.
@ 2019-02-13 11:57 Dan Carpenter via amd-gfx
0 siblings, 0 replies; only message in thread
From: Dan Carpenter via amd-gfx @ 2019-02-13 11:57 UTC (permalink / raw)
To: yongqiang.sun-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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
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-02-13 11:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 11:57 [bug report] drm/amd/display: Calc vline position in dc Dan Carpenter via amd-gfx
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.