Re: [PATCH i-g-t 1/4] lib: Extract helpers for determining submission method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 13, 2017 at 12:26:59PM +0100, Chris Wilson wrote:
> Quoting Michał Winiarski (2017-10-13 12:00:17)
> > Couple of tests are using either determining submission method, or
> > pretty printing. Let's move those to helpers in lib.
> > 
> > Signed-off-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>
> > Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Katarzyna Dec <katarzyna.dec@xxxxxxxxx>
> > Cc: Petri Latvala <petri.latvala@xxxxxxxxx>
> > ---
> >  lib/igt_aux.c               | 18 +++++++++++++
> >  lib/igt_aux.h               |  2 ++
> >  lib/igt_gt.c                | 63 +++++++++++++++++++++++++++++++++++++++++++++
> >  lib/igt_gt.h                |  7 +++++
> >  tests/gem_ctx_thrash.c      | 19 ++------------
> >  tests/gem_eio.c             | 45 ++------------------------------
> >  tests/gem_exec_await.c      | 39 ++--------------------------
> >  tests/gem_exec_fence.c      | 41 +++--------------------------
> >  tests/gem_exec_latency.c    | 31 +---------------------
> >  tests/gem_exec_nop.c        | 31 +---------------------
> >  tests/gem_exec_schedule.c   | 40 ++--------------------------
> >  tests/gem_exec_whisper.c    | 31 +---------------------
> >  tests/gem_read_read_speed.c | 17 +-----------
> >  tests/gem_sync.c            | 31 +---------------------
> >  14 files changed, 106 insertions(+), 309 deletions(-)
> > 
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index fa6594c3..0c77f85f 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -1455,6 +1455,24 @@ igt_show_stat(proc_t *info, int *state, const char *fn)
> >         ++*state;
> >  }
> >  
> > +void igt_show_submission_method(int fd)
> 
> Still igt when it appears to be gem specific.
> 
> I know I'm just as guilty of overusing the igt prefix, but I really do
> think we should try to claw it back so that we know the platform
> agnostic test tooling from the rest.

That's a valid point. gem_ sounds about right, especially for this one.

Seems like a bigger renaming effort and we may need to contain those in
a separate igt_gem.{c,h} files (like one we have for vgem_ stuff).

But generally,
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>

> > +unsigned gem_submission_method(int fd)
> > +{
> > +       unsigned flags = 0;
> > +       bool active;
> > +       int dir;
> > +
> > +       dir = igt_sysfs_open_parameters(fd);
> > +       if (dir < 0)
> > +               return 0;
> 
> Ok, we really need to kill of the modparam probing here and get this out
> of say PARAM_HAS_EXECBUF2 (by expanding that to this capability mask).
> 
> Because in about 4 weeks, we're going to lose some more of these
> modparams... And planning for future expansion is a bonus.
> -Chris

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux