drm/display: guard if clause
Subsystems (3)
PATCH 1/1 drm/display: guard if clause
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)
^~
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
@@ -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); + }/* Since phantom pipe programming is moved to post_unlock_program_front_end, * move the SubVP lock to after the phantom pipes have been setup
Signature · 1 line
2.25.1
Christian König
maintainerWell 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:
Quoted 18 lines
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 <[email protected]>--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0
drivers/gpu/drm/amd/display/dc/core/dc.c static void commit_planes_for_stream(struct dc *dc, · line 3513
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2
-1@@ -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.
Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0/* Since phantom pipe programming is moved to post_unlock_program_front_end, * move the SubVP lock to after the phantom pipes have been setup
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 <[email protected]>
Sent: Thursday, September 1, 2022 7:07 PM
To: Song, Asher <[email protected]>; [email protected]; Lee, Alvin <[email protected]>; Lei, Jun <[email protected]>; Chen, Guchun <[email protected]>
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:
Quoted 20 lines
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 <[email protected]>--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0
drivers/gpu/drm/amd/display/dc/core/dc.c static void commit_planes_for_stream(struct dc *dc, · line 3513
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2
-1@@ -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.
Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0/* Since phantom pipe programming is moved to post_unlock_program_front_end, * move the SubVP lock to after the phantom pipes have been setup