Yes, exactly. The logic in two successive if checks of "(update_type != UPDATE_TYPE_FAST) " is incorrect still. Possibly we can update code by dropping one if check as below. Anyway, this needs confirm from display team @Lee, Alvin @Lei, Jun. if (update_type != UPDATE_TYPE_FAST) { dc->hwss.post_unlock_program_front_end(dc, context); if (dc->hwss.commit_subvp_config) dc->hwss.commit_subvp_config(dc, context); } Regards, Guchun -----Original Message----- From: Koenig, Christian <Christian.Koenig@xxxxxxx> Sent: Thursday, September 1, 2022 7:07 PM To: Song, Asher <Asher.Song@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Lee, Alvin <Alvin.Lee2@xxxxxxx>; Lei, Jun <Jun.Lei@xxxxxxx>; Chen, Guchun <Guchun.Chen@xxxxxxx> Subject: Re: [PATCH] drm/display: guard if clause Well please adjust the subject line, that should read something like "drm/amd/display:..." or "drm/amdgpu:...". Am 01.09.22 um 11:11 schrieb Asher Song: > To eliminate the following compiling error, guard if clause. > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c: In function 'commit_planes_for_stream': > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3521:2: error: this > 'if' clause does not guard... [-Werror=misleading-indentation] > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3523:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' > if (update_type != UPDATE_TYPE_FAST) > ^~ > > Signed-off-by: Asher Song <Asher.Song@xxxxxxx> > --- > drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c > b/drivers/gpu/drm/amd/display/dc/core/dc.c > index b49237390cce..66072ac1bb4f 100644 > --- a/drivers/gpu/drm/amd/display/dc/core/dc.c > +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c > @@ -3505,11 +3505,12 @@ static void commit_planes_for_stream(struct dc *dc, > top_pipe_to_program->stream_res.tg); > } > > - if (update_type != UPDATE_TYPE_FAST) > + if (update_type != UPDATE_TYPE_FAST){ > dc->hwss.post_unlock_program_front_end(dc, context); > if (update_type != UPDATE_TYPE_FAST) > if (dc->hwss.commit_subvp_config) > dc->hwss.commit_subvp_config(dc, context); > + } That looks like a step into the right directly, but please re-read the code: if (update_type != UPDATE_TYPE_FAST) { .... if (update_type != UPDATE_TYPE_FAST) .... } That's certainly still not correct. Regards, Christian. > > /* Since phantom pipe programming is moved to post_unlock_program_front_end, > * move the SubVP lock to after the phantom pipes have been setup