linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
@ 2022-04-07  6:00 Haowen Bai
  2022-04-07 14:18 ` Harry Wentland
  0 siblings, 1 reply; 6+ messages in thread
From: Haowen Bai @ 2022-04-07  6:00 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter
  Cc: Haowen Bai, amd-gfx, dri-devel, linux-kernel

Smatch reports the following:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
dcn10_enable_vblanks_synchronization() warn: if statement not indented

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index ee22f4422d26..3c338b85040c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
 	if (master >= 0) {
 		for (i = 0; i < group_size; i++) {
 			if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
-			grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
-				grouped_pipes[master]->stream_res.tg,
-				grouped_pipes[i]->stream_res.tg,
-				grouped_pipes[master]->stream->timing.pix_clk_100hz,
-				grouped_pipes[i]->stream->timing.pix_clk_100hz,
-				get_clock_divider(grouped_pipes[master], false),
-				get_clock_divider(grouped_pipes[i], false));
+				grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
+					grouped_pipes[master]->stream_res.tg,
+					grouped_pipes[i]->stream_res.tg,
+					grouped_pipes[master]->stream->timing.pix_clk_100hz,
+					grouped_pipes[i]->stream->timing.pix_clk_100hz,
+					get_clock_divider(grouped_pipes[master], false),
+					get_clock_divider(grouped_pipes[i], false));
 				grouped_pipes[i]->stream->vblank_synchronized = true;
 		}
 		grouped_pipes[master]->stream->vblank_synchronized = true;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
  2022-04-07  6:00 [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c Haowen Bai
@ 2022-04-07 14:18 ` Harry Wentland
  2022-04-07 15:52   ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2022-04-07 14:18 UTC (permalink / raw)
  To: Haowen Bai, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter
  Cc: dri-devel, amd-gfx, linux-kernel



On 2022-04-07 02:00, Haowen Bai wrote:
> Smatch reports the following:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
> dcn10_enable_vblanks_synchronization() warn: if statement not indented
> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index ee22f4422d26..3c338b85040c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
>  	if (master >= 0) {
>  		for (i = 0; i < group_size; i++) {
>  			if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
> -			grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> -				grouped_pipes[master]->stream_res.tg,
> -				grouped_pipes[i]->stream_res.tg,
> -				grouped_pipes[master]->stream->timing.pix_clk_100hz,
> -				grouped_pipes[i]->stream->timing.pix_clk_100hz,
> -				get_clock_divider(grouped_pipes[master], false),
> -				get_clock_divider(grouped_pipes[i], false));
> +				grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> +					grouped_pipes[master]->stream_res.tg,
> +					grouped_pipes[i]->stream_res.tg,
> +					grouped_pipes[master]->stream->timing.pix_clk_100hz,
> +					grouped_pipes[i]->stream->timing.pix_clk_100hz,
> +					get_clock_divider(grouped_pipes[master], false),
> +					get_clock_divider(grouped_pipes[i], false));
>  				grouped_pipes[i]->stream->vblank_synchronized = true;
>  		}
>  		grouped_pipes[master]->stream->vblank_synchronized = true;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
  2022-04-07 14:18 ` Harry Wentland
@ 2022-04-07 15:52   ` Alex Deucher
  2022-04-07 16:07     ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2022-04-07 15:52 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Haowen Bai, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, LKML

Applied.  Thanks!

Alex

On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
>
>
> On 2022-04-07 02:00, Haowen Bai wrote:
> > Smatch reports the following:
> > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
> > dcn10_enable_vblanks_synchronization() warn: if statement not indented
> >
> > Signed-off-by: Haowen Bai <baihaowen@meizu.com>
>
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Harry
>
> > ---
> >  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > index ee22f4422d26..3c338b85040c 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > @@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
> >       if (master >= 0) {
> >               for (i = 0; i < group_size; i++) {
> >                       if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
> > -                     grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> > -                             grouped_pipes[master]->stream_res.tg,
> > -                             grouped_pipes[i]->stream_res.tg,
> > -                             grouped_pipes[master]->stream->timing.pix_clk_100hz,
> > -                             grouped_pipes[i]->stream->timing.pix_clk_100hz,
> > -                             get_clock_divider(grouped_pipes[master], false),
> > -                             get_clock_divider(grouped_pipes[i], false));
> > +                             grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> > +                                     grouped_pipes[master]->stream_res.tg,
> > +                                     grouped_pipes[i]->stream_res.tg,
> > +                                     grouped_pipes[master]->stream->timing.pix_clk_100hz,
> > +                                     grouped_pipes[i]->stream->timing.pix_clk_100hz,
> > +                                     get_clock_divider(grouped_pipes[master], false),
> > +                                     get_clock_divider(grouped_pipes[i], false));
> >                               grouped_pipes[i]->stream->vblank_synchronized = true;
> >               }
> >               grouped_pipes[master]->stream->vblank_synchronized = true;
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
  2022-04-07 15:52   ` Alex Deucher
@ 2022-04-07 16:07     ` Alex Deucher
  2022-04-07 17:32       ` Harry Wentland
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2022-04-07 16:07 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Haowen Bai, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, LKML

Actually this just causes another warning.  Dropped for now.  More below.

On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Applied.  Thanks!
>
> Alex
>
> On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland <harry.wentland@amd.com> wrote:
> >
> >
> >
> > On 2022-04-07 02:00, Haowen Bai wrote:
> > > Smatch reports the following:
> > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
> > > dcn10_enable_vblanks_synchronization() warn: if statement not indented
> > >
> > > Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> >
> > Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> >
> > Harry
> >
> > > ---
> > >  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
> > >  1 file changed, 7 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > index ee22f4422d26..3c338b85040c 100644
> > > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> > > @@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
> > >       if (master >= 0) {
> > >               for (i = 0; i < group_size; i++) {
> > >                       if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
> > > -                     grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> > > -                             grouped_pipes[master]->stream_res.tg,
> > > -                             grouped_pipes[i]->stream_res.tg,
> > > -                             grouped_pipes[master]->stream->timing.pix_clk_100hz,
> > > -                             grouped_pipes[i]->stream->timing.pix_clk_100hz,
> > > -                             get_clock_divider(grouped_pipes[master], false),
> > > -                             get_clock_divider(grouped_pipes[i], false));
> > > +                             grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> > > +                                     grouped_pipes[master]->stream_res.tg,
> > > +                                     grouped_pipes[i]->stream_res.tg,
> > > +                                     grouped_pipes[master]->stream->timing.pix_clk_100hz,
> > > +                                     grouped_pipes[i]->stream->timing.pix_clk_100hz,
> > > +                                     get_clock_divider(grouped_pipes[master], false),
> > > +                                     get_clock_divider(grouped_pipes[i], false));
> > >                               grouped_pipes[i]->stream->vblank_synchronized = true;

@Harry Wentland should this last statement be part of the if clause or
the for loop?

Alex

> > >               }
> > >               grouped_pipes[master]->stream->vblank_synchronized = true;
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
  2022-04-07 16:07     ` Alex Deucher
@ 2022-04-07 17:32       ` Harry Wentland
  2022-04-07 17:37         ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2022-04-07 17:32 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Haowen Bai, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, LKML



On 2022-04-07 12:07, Alex Deucher wrote:
> Actually this just causes another warning.  Dropped for now.  More below.
> 
> On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> Applied.  Thanks!
>>
>> Alex
>>
>> On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland <harry.wentland@amd.com> wrote:
>>>
>>>
>>>
>>> On 2022-04-07 02:00, Haowen Bai wrote:
>>>> Smatch reports the following:
>>>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
>>>> dcn10_enable_vblanks_synchronization() warn: if statement not indented
>>>>
>>>> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
>>>
>>> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>>>
>>> Harry
>>>
>>>> ---
>>>>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
>>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
>>>> index ee22f4422d26..3c338b85040c 100644
>>>> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
>>>> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
>>>> @@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
>>>>       if (master >= 0) {
>>>>               for (i = 0; i < group_size; i++) {
>>>>                       if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
>>>> -                     grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
>>>> -                             grouped_pipes[master]->stream_res.tg,
>>>> -                             grouped_pipes[i]->stream_res.tg,
>>>> -                             grouped_pipes[master]->stream->timing.pix_clk_100hz,
>>>> -                             grouped_pipes[i]->stream->timing.pix_clk_100hz,
>>>> -                             get_clock_divider(grouped_pipes[master], false),
>>>> -                             get_clock_divider(grouped_pipes[i], false));
>>>> +                             grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
>>>> +                                     grouped_pipes[master]->stream_res.tg,
>>>> +                                     grouped_pipes[i]->stream_res.tg,
>>>> +                                     grouped_pipes[master]->stream->timing.pix_clk_100hz,
>>>> +                                     grouped_pipes[i]->stream->timing.pix_clk_100hz,
>>>> +                                     get_clock_divider(grouped_pipes[master], false),
>>>> +                                     get_clock_divider(grouped_pipes[i], false));
>>>>                               grouped_pipes[i]->stream->vblank_synchronized = true;
> 
> @Harry Wentland should this last statement be part of the if clause or
> the for loop?
> 

It should be part of the if clause.

Harry

> Alex
> 
>>>>               }
>>>>               grouped_pipes[master]->stream->vblank_synchronized = true;
>>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c
  2022-04-07 17:32       ` Harry Wentland
@ 2022-04-07 17:37         ` Alex Deucher
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2022-04-07 17:37 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Haowen Bai, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, LKML

On Thu, Apr 7, 2022 at 1:32 PM Harry Wentland <harry.wentland@amd.com> wrote:
>
>
>
> On 2022-04-07 12:07, Alex Deucher wrote:
> > Actually this just causes another warning.  Dropped for now.  More below.
> >
> > On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher <alexdeucher@gmail.com> wrote:
> >>
> >> Applied.  Thanks!
> >>
> >> Alex
> >>
> >> On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland <harry.wentland@amd.com> wrote:
> >>>
> >>>
> >>>
> >>> On 2022-04-07 02:00, Haowen Bai wrote:
> >>>> Smatch reports the following:
> >>>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174
> >>>> dcn10_enable_vblanks_synchronization() warn: if statement not indented
> >>>>
> >>>> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> >>>
> >>> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> >>>
> >>> Harry
> >>>
> >>>> ---
> >>>>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++++++-------
> >>>>  1 file changed, 7 insertions(+), 7 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> >>>> index ee22f4422d26..3c338b85040c 100644
> >>>> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> >>>> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> >>>> @@ -2172,13 +2172,13 @@ void dcn10_enable_vblanks_synchronization(
> >>>>       if (master >= 0) {
> >>>>               for (i = 0; i < group_size; i++) {
> >>>>                       if (i != master && !grouped_pipes[i]->stream->has_non_synchronizable_pclk)
> >>>> -                     grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> >>>> -                             grouped_pipes[master]->stream_res.tg,
> >>>> -                             grouped_pipes[i]->stream_res.tg,
> >>>> -                             grouped_pipes[master]->stream->timing.pix_clk_100hz,
> >>>> -                             grouped_pipes[i]->stream->timing.pix_clk_100hz,
> >>>> -                             get_clock_divider(grouped_pipes[master], false),
> >>>> -                             get_clock_divider(grouped_pipes[i], false));
> >>>> +                             grouped_pipes[i]->stream_res.tg->funcs->align_vblanks(
> >>>> +                                     grouped_pipes[master]->stream_res.tg,
> >>>> +                                     grouped_pipes[i]->stream_res.tg,
> >>>> +                                     grouped_pipes[master]->stream->timing.pix_clk_100hz,
> >>>> +                                     grouped_pipes[i]->stream->timing.pix_clk_100hz,
> >>>> +                                     get_clock_divider(grouped_pipes[master], false),
> >>>> +                                     get_clock_divider(grouped_pipes[i], false));
> >>>>                               grouped_pipes[i]->stream->vblank_synchronized = true;
> >
> > @Harry Wentland should this last statement be part of the if clause or
> > the for loop?
> >
>
> It should be part of the if clause.

Can one of you send a patch to fix that up?

Thanks!

Alex

>
> Harry
>
> > Alex
> >
> >>>>               }
> >>>>               grouped_pipes[master]->stream->vblank_synchronized = true;
> >>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-07 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  6:00 [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c Haowen Bai
2022-04-07 14:18 ` Harry Wentland
2022-04-07 15:52   ` Alex Deucher
2022-04-07 16:07     ` Alex Deucher
2022-04-07 17:32       ` Harry Wentland
2022-04-07 17:37         ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).