From: Dan Carpenter via amd-gfx <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
To: yongqiang.sun-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/display: Calc vline position in dc.
Date: Wed, 13 Feb 2019 14:57:02 +0300 [thread overview]
Message-ID: <20190213115702.GA18585@kadam> (raw)
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
reply other threads:[~2019-02-13 11:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190213115702.GA18585@kadam \
--to=amd-gfx-pd4fty7x32lngt0pjobp9y5qc8qiuhrw@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=yongqiang.sun-5C7GfCeVMHo@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.