From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Souza, Jose" <jose.souza@intel.com>
Cc: "Syrjala, Ville" <ville.syrjala@intel.com>,
"Peres, Martin" <martin.peres@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v5 1/2] igt/tests/kms_atomic_transition: Skip transition, if no changes done
Date: Mon, 8 Apr 2019 07:50:33 +0000 [thread overview]
Message-ID: <f774d657b76cd251a9d33471ae1f47f6e8f772b5.camel@intel.com> (raw)
In-Reply-To: <41a03061ffed75fc1c9e2358e23a752452ce96ee.camel@intel.com>
On Fri, 2019-04-05 at 16:45 -0700, Souza, Jose wrote:
> On Fri, 2019-04-05 at 07:50 +0100, Lisovskiy, Stanislav wrote:
> > On Thu, 2019-04-04 at 15:55 -0700, Souza, Jose wrote:
> > > On Thu, 2019-04-04 at 15:13 +0300, Stanislav Lisovskiy wrote:
> > > > While fixing used amount of planes, discovered that if
> > > > wm_setup_plane is called with 0 planes(might happen during
> > > > main testing cycle, as parms[i].mask can be 0 due to
> > > > randomization)
> > >
> > > As already said and you agreed this 'as parms[i].mask can be 0
> > > due
> > > to
> > > randomization' statement is not true, even if this patch is right
> > > the
> > > commit message needs to be true.
> > >
> >
> > I will fix the commit message, you are right parms[i].mask can't be
> > true. But parms[i].mask & mask parameter can be easily. The
> > function
> > user should be able to check if no changes are actually done.
> > Otherwise
> > run_transition will timeout on fd_completed call.
> >
> > > For me this patch is only hidden the real bug.
> >
> > Sorry, what do you mean by "real bug"?
> >
>
> Take a look here: https://patchwork.freedesktop.org/series/59086/
>
> It don't need anything like this patch and fixed the ICL BW issue,
> something is wrong in the next patch and this patch was only hiding
> it.
Ok, I looked and this patch does almost exactly the same thing and has
even more lines. If you think that my patch has some issue, it would be
nice to at least point out what exactly, considering that I've
explained what was the problem and gave appropriate reasoning regarding
wm_setup_plane. Otherwise you or somebody else might just repeat the
same mistake.
I really see no point in this kind of review, when you say that
"this is bad" and then without any explanation send almost exactly
similar solution.
What is wrong with wm_setup_plane having return value? Does it break
anything?
You doubt, this might bring problems? Just call it with 0 mask and
then atomic_commit, wait_transition and you will see.
Instead you just say "this is wrong", sending patch with more lines,
more conditions and which needs to reviewed completely from scratch
again. Great.
>
>
> > > > then subsequent wait_transition fails in assertion on
> > > > fd_completed.
> > > > So added return value to wm_setup_plane, which would allow to
> > > > determine, if we need to skip this step.
> > > >
> > > > Signed-off-by: Stanislav Lisovskiy <
> > > > stanislav.lisovskiy@intel.com
> > > > >
> > > >
> > > > ---
> > > > tests/kms_atomic_transition.c | 23 +++++++++++++++++------
> > > > 1 file changed, 17 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/tests/kms_atomic_transition.c
> > > > b/tests/kms_atomic_transition.c
> > > > index 18f73317..638fe17e 100644
> > > > --- a/tests/kms_atomic_transition.c
> > > > +++ b/tests/kms_atomic_transition.c
> > > > @@ -118,11 +118,12 @@ static void configure_fencing(igt_plane_t
> > > > *plane)
> > > > igt_assert_eq(ret, 0);
> > > > }
> > > >
> > > > -static void
> > > > +static int
> > > > wm_setup_plane(igt_display_t *display, enum pipe pipe,
> > > > uint32_t mask, struct plane_parms *parms, bool
> > > > fencing)
> > > > {
> > > > igt_plane_t *plane;
> > > > + int planes_set_up = 0;
> > > >
> > > > /*
> > > > * Make sure these buffers are suited for display use
> > > > @@ -133,8 +134,10 @@ wm_setup_plane(igt_display_t *display,
> > > > enum
> > > > pipe
> > > > pipe,
> > > > int i = plane->index;
> > > >
> > > > if (!mask || !(parms[i].mask & mask)) {
> > > > - if (plane->values[IGT_PLANE_FB_ID])
> > > > + if (plane->values[IGT_PLANE_FB_ID]) {
> > > > igt_plane_set_fb(plane, NULL);
> > > > + planes_set_up++;
> > > > + }
> > > > continue;
> > > > }
> > > >
> > > > @@ -144,7 +147,10 @@ wm_setup_plane(igt_display_t *display,
> > > > enum
> > > > pipe
> > > > pipe,
> > > > igt_plane_set_fb(plane, parms[i].fb);
> > > > igt_fb_set_size(parms[i].fb, plane,
> > > > parms[i].width,
> > > > parms[i].height);
> > > > igt_plane_set_size(plane, parms[i].width,
> > > > parms[i].height);
> > > > +
> > > > + planes_set_up++;
> > > > }
> > > > + return planes_set_up;
> > > > }
> > > >
> > > > static void ev_page_flip(int fd, unsigned seq, unsigned
> > > > tv_sec,
> > > > unsigned tv_usec, void *user_data)
> > > > @@ -544,7 +550,8 @@ run_transition_test(igt_display_t *display,
> > > > enum
> > > > pipe pipe, igt_output_t *output
> > > >
> > > > igt_output_set_pipe(output, pipe);
> > > >
> > > > - wm_setup_plane(display, pipe, i, parms,
> > > > fencing);
> > > > + if (!wm_setup_plane(display, pipe, i, parms,
> > > > fencing))
> > > > + continue;
> > > >
> > > > atomic_commit(display, pipe, flags, (void
> > > > *)(unsigned
> > > > long)i, fencing);
> > > > wait_for_transition(display, pipe, nonblocking,
> > > > fencing);
> > > > @@ -552,7 +559,8 @@ run_transition_test(igt_display_t *display,
> > > > enum
> > > > pipe pipe, igt_output_t *output
> > > > if (type == TRANSITION_MODESET_DISABLE) {
> > > > igt_output_set_pipe(output, PIPE_NONE);
> > > >
> > > > - wm_setup_plane(display, pipe, 0, parms,
> > > > fencing);
> > > > + if (!wm_setup_plane(display, pipe, 0,
> > > > parms,
> > > > fencing))
> > > > + continue;
> > > >
> > > > atomic_commit(display, pipe, flags,
> > > > (void *)
> > > > 0UL, fencing);
> > > > wait_for_transition(display, pipe,
> > > > nonblocking,
> > > > fencing);
> > > > @@ -568,7 +576,8 @@ run_transition_test(igt_display_t *display,
> > > > enum
> > > > pipe pipe, igt_output_t *output
> > > > n_enable_planes < pipe_obj-
> > > > > n_planes)
> > > >
> > > > continue;
> > > >
> > > > - wm_setup_plane(display, pipe,
> > > > j, parms,
> > > > fencing);
> > > > + if (!wm_setup_plane(display,
> > > > pipe, j,
> > > > parms, fencing))
> > > > + continue;
> > > >
> > > > if (type >= TRANSITION_MODESET)
> > > > igt_output_override_mod
> > > > e(output
> > > > , &override_mode);
> > > > @@ -576,7 +585,9 @@ run_transition_test(igt_display_t *display,
> > > > enum
> > > > pipe pipe, igt_output_t *output
> > > > atomic_commit(display, pipe,
> > > > flags,
> > > > (void *)(unsigned long) j, fencing);
> > > > wait_for_transition(display,
> > > > pipe,
> > > > nonblocking, fencing);
> > > >
> > > > - wm_setup_plane(display, pipe,
> > > > i, parms,
> > > > fencing);
> > > > + if (!wm_setup_plane(display,
> > > > pipe, i,
> > > > parms, fencing))
> > > > + continue;
> > > > +
> > > > if (type >= TRANSITION_MODESET)
> > > > igt_output_override_mod
> > > > e(output
> > > > , NULL);
> > > >
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-08 7:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 12:13 [igt-dev] [PATCH i-g-t v5 0/2] kms_atomic_transition improvements Stanislav Lisovskiy
2019-04-04 12:13 ` [igt-dev] [PATCH i-g-t v5 1/2] igt/tests/kms_atomic_transition: Skip transition, if no changes done Stanislav Lisovskiy
2019-04-04 22:55 ` Souza, Jose
2019-04-05 6:50 ` Lisovskiy, Stanislav
2019-04-05 23:45 ` Souza, Jose
2019-04-08 7:50 ` Lisovskiy, Stanislav [this message]
2019-04-04 12:13 ` [igt-dev] [PATCH i-g-t v5 2/2] igt/tests/kms_atomic_transition: Tolerate if can't have all planes Stanislav Lisovskiy
2019-04-05 0:59 ` Souza, Jose
2019-04-05 6:57 ` Lisovskiy, Stanislav
2019-04-04 14:08 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_atomic_transition improvements (rev9) Patchwork
2019-04-05 5:28 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-04-05 14:21 [igt-dev] [PATCH i-g-t v5 0/2] kms_atomic_transition improvements Stanislav Lisovskiy
2019-04-05 14:21 ` [igt-dev] [PATCH i-g-t v5 1/2] igt/tests/kms_atomic_transition: Skip transition, if no changes done Stanislav Lisovskiy
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=f774d657b76cd251a9d33471ae1f47f6e8f772b5.camel@intel.com \
--to=stanislav.lisovskiy@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jose.souza@intel.com \
--cc=martin.peres@intel.com \
--cc=ville.syrjala@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox