Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
@ 2018-09-01 18:09 Chris Wilson
  2018-09-01 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-01 18:09 UTC (permalink / raw)
  To: igt-dev

Even with a small number of known drivers (6), a bsearch will take at
most 3 steps, whereas the linear search will take 3 steps on average. In
the future with more known drivers, the logN bsearch will be even more
advantageous.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
---
 lib/drmtest.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 93228f900..bfb38f1e9 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -222,9 +222,15 @@ static int open_device(const char *name, unsigned int chipset)
 	if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
 		goto err;
 
-	for (const struct module *m = modules; m->module; m++) {
-		if (strcmp(m->module, dev_name) == 0) {
-			chip = m->bit;
+	for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
+		int mid = start + (end - start) / 2;
+		int ret = strcmp(modules[mid].module, dev_name);
+		if (ret < 0) {
+			end = mid;
+		} else if (ret > 0) {
+			start = mid + 1;
+		} else {
+			chip = modules[mid].bit;
 			break;
 		}
 	}
-- 
2.19.0.rc1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib: Use a bsearch to find the module name
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
@ 2018-09-01 18:46 ` Patchwork
  2018-09-01 19:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-01 18:46 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib: Use a bsearch to find the module name
URL   : https://patchwork.freedesktop.org/series/49045/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4751 -> IGTPW_1771 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49045/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1771:

  === IGT changes ===

    ==== Possible regressions ====

    {igt@pm_rpm@module-reload}:
      {fi-kbl-8809g}:     PASS -> FAIL

    
    ==== Warnings ====

    {igt@amdgpu/amd_prime@i915-to-amd}:
      {fi-kbl-8809g}:     PASS -> SKIP

    
== Known issues ==

  Here are the changes found in IGTPW_1771 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103167)

    
    ==== Possible fixes ====

    {igt@amdgpu/amd_prime@amd-to-i915}:
      {fi-kbl-8809g}:     FAIL (fdo#107341) -> SKIP

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-WARN (fdo#102614) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      {fi-byt-clapper}:   FAIL (fdo#103191, fdo#107362) -> PASS +1

    igt@prime_vgem@basic-fence-flip:
      fi-skl-6770hq:      FAIL (fdo#104008) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362


== Participating hosts (50 -> 46) ==

  Missing    (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4618 -> IGTPW_1771

  CI_DRM_4751: 2679376a6fe30a27b8734442d9b1af6a411f7bc7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1771: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1771/
  IGT_4618: 9d83154c898b5acc8b462d17104df50cfd71e9a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1771/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib: Use a bsearch to find the module name
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
  2018-09-01 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-09-01 19:35 ` Patchwork
  2018-09-03  7:02 ` [igt-dev] [PATCH i-g-t] " Katarzyna Dec
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-01 19:35 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: lib: Use a bsearch to find the module name
URL   : https://patchwork.freedesktop.org/series/49045/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4618_full -> IGTPW_1771_full =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49045/revisions/1/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1771_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_parallel@vebox:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-snb:          PASS -> FAIL (fdo#106641)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
      shard-glk:          PASS -> FAIL (fdo#103167)

    igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
      shard-snb:          PASS -> FAIL (fdo#103166)

    igt@kms_rotation_crc@sprite-rotation-180:
      shard-snb:          PASS -> FAIL (fdo#103925)

    
    ==== Possible fixes ====

    igt@gem_exec_await@wide-contexts:
      shard-glk:          FAIL (fdo#105900) -> PASS

    igt@gem_exec_big:
      shard-hsw:          INCOMPLETE (fdo#103540) -> PASS

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
      shard-hsw:          FAIL (fdo#105767) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-snb:          FAIL -> PASS

    igt@kms_vblank@pipe-a-ts-continuation-suspend:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#107556) -> PASS

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
  fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4618 -> IGTPW_1771
    * Linux: CI_DRM_4749 -> CI_DRM_4751

  CI_DRM_4749: 4a46c18fad0de38a78b4b0c848892de494324a17 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4751: 2679376a6fe30a27b8734442d9b1af6a411f7bc7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1771: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1771/
  IGT_4618: 9d83154c898b5acc8b462d17104df50cfd71e9a0 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1771/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
  2018-09-01 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-09-01 19:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-09-03  7:02 ` Katarzyna Dec
  2018-09-03  9:39 ` Petri Latvala
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Katarzyna Dec @ 2018-09-03  7:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Sat, Sep 01, 2018 at 07:09:11PM +0100, Chris Wilson wrote:
> Even with a small number of known drivers (6), a bsearch will take at
> most 3 steps, whereas the linear search will take 3 steps on average. In
> the future with more known drivers, the logN bsearch will be even more
> advantageous.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>

Another nice improvement in drmtest.
Kasia :)
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
                   ` (2 preceding siblings ...)
  2018-09-03  7:02 ` [igt-dev] [PATCH i-g-t] " Katarzyna Dec
@ 2018-09-03  9:39 ` Petri Latvala
  2018-09-03  9:44   ` Chris Wilson
  2018-09-03 11:01 ` [igt-dev] ✓ Fi.CI.BAT: success for lib: Use a bsearch to find the module name (rev2) Patchwork
  2018-09-03 14:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 10+ messages in thread
From: Petri Latvala @ 2018-09-03  9:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Sat, Sep 01, 2018 at 07:09:11PM +0100, Chris Wilson wrote:
> Even with a small number of known drivers (6), a bsearch will take at
> most 3 steps, whereas the linear search will take 3 steps on average. In
> the future with more known drivers, the logN bsearch will be even more
> advantageous.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Katarzyna Dec <katarzyna.dec@intel.com>
> ---
>  lib/drmtest.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 93228f900..bfb38f1e9 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -222,9 +222,15 @@ static int open_device(const char *name, unsigned int chipset)
>  	if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
>  		goto err;
>  
> -	for (const struct module *m = modules; m->module; m++) {
> -		if (strcmp(m->module, dev_name) == 0) {
> -			chip = m->bit;
> +	for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
> +		int mid = start + (end - start) / 2;
> +		int ret = strcmp(modules[mid].module, dev_name);
> +		if (ret < 0) {
> +			end = mid;
> +		} else if (ret > 0) {
> +			start = mid + 1;


Isn't this the wrong way around?


-- 
Petri Latvala




> +		} else {
> +			chip = modules[mid].bit;
>  			break;
>  		}
>  	}
> -- 
> 2.19.0.rc1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
  2018-09-03  9:39 ` Petri Latvala
@ 2018-09-03  9:44   ` Chris Wilson
  2018-09-03 10:34     ` Jani Nikula
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2018-09-03  9:44 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Quoting Petri Latvala (2018-09-03 10:39:31)
> On Sat, Sep 01, 2018 at 07:09:11PM +0100, Chris Wilson wrote:
> > Even with a small number of known drivers (6), a bsearch will take at
> > most 3 steps, whereas the linear search will take 3 steps on average. In
> > the future with more known drivers, the logN bsearch will be even more
> > advantageous.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Katarzyna Dec <katarzyna.dec@intel.com>
> > ---
> >  lib/drmtest.c | 12 +++++++++---
> >  1 file changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/drmtest.c b/lib/drmtest.c
> > index 93228f900..bfb38f1e9 100644
> > --- a/lib/drmtest.c
> > +++ b/lib/drmtest.c
> > @@ -222,9 +222,15 @@ static int open_device(const char *name, unsigned int chipset)
> >       if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
> >               goto err;
> >  
> > -     for (const struct module *m = modules; m->module; m++) {
> > -             if (strcmp(m->module, dev_name) == 0) {
> > -                     chip = m->bit;
> > +     for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
> > +             int mid = start + (end - start) / 2;
> > +             int ret = strcmp(modules[mid].module, dev_name);
> > +             if (ret < 0) {
> > +                     end = mid;
> > +             } else if (ret > 0) {
> > +                     start = mid + 1;
> 
> 
> Isn't this the wrong way around?

* blinks.

Yes. Shame on me for assuming that a run through igt was good enough to
flush out the kinks. It just happens that vgem occupies the initial mid,
so anything that wanted vgem-only got it; everything else hit the
DRIVER_ANY.

amdgpu -> skip. Ah. Hmm, that should have been flagged :|
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
  2018-09-03  9:44   ` Chris Wilson
@ 2018-09-03 10:34     ` Jani Nikula
  2018-09-03 10:39       ` Chris Wilson
  0 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2018-09-03 10:34 UTC (permalink / raw)
  To: Chris Wilson, Petri Latvala; +Cc: igt-dev

On Mon, 03 Sep 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Petri Latvala (2018-09-03 10:39:31)
>> On Sat, Sep 01, 2018 at 07:09:11PM +0100, Chris Wilson wrote:
>> > Even with a small number of known drivers (6), a bsearch will take at
>> > most 3 steps, whereas the linear search will take 3 steps on average. In
>> > the future with more known drivers, the logN bsearch will be even more
>> > advantageous.
>> > 
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > Cc: Katarzyna Dec <katarzyna.dec@intel.com>
>> > ---
>> >  lib/drmtest.c | 12 +++++++++---
>> >  1 file changed, 9 insertions(+), 3 deletions(-)
>> > 
>> > diff --git a/lib/drmtest.c b/lib/drmtest.c
>> > index 93228f900..bfb38f1e9 100644
>> > --- a/lib/drmtest.c
>> > +++ b/lib/drmtest.c
>> > @@ -222,9 +222,15 @@ static int open_device(const char *name, unsigned int chipset)
>> >       if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
>> >               goto err;
>> >  
>> > -     for (const struct module *m = modules; m->module; m++) {
>> > -             if (strcmp(m->module, dev_name) == 0) {
>> > -                     chip = m->bit;
>> > +     for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
>> > +             int mid = start + (end - start) / 2;
>> > +             int ret = strcmp(modules[mid].module, dev_name);
>> > +             if (ret < 0) {
>> > +                     end = mid;
>> > +             } else if (ret > 0) {
>> > +                     start = mid + 1;
>> 
>> 
>> Isn't this the wrong way around?
>
> * blinks.
>
> Yes. Shame on me for assuming that a run through igt was good enough to
> flush out the kinks. It just happens that vgem occupies the initial mid,
> so anything that wanted vgem-only got it; everything else hit the
> DRIVER_ANY.
>
> amdgpu -> skip. Ah. Hmm, that should have been flagged :|

Just sayin'


diff --git a/lib/drmtest.c b/lib/drmtest.c
index adff1a81fffb..3a050211146e 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -209,11 +209,19 @@ static const struct module {
 	{}
 };
 
+static int module_compare(const void *_m1, const void *_m2)
+{
+	const struct module *m1 = _m1, *m2 = _m2;
+
+	return strcmp(m1->module, m2->module);
+}
+
 static int open_device(const char *name, unsigned int chipset)
 {
 	char dev_name[16] = "";
 	int chip = DRIVER_ANY;
 	int fd;
+	struct module key, *res;
 
 	fd = open(name, O_RDWR);
 	if (fd == -1)
@@ -222,18 +230,11 @@ static int open_device(const char *name, unsigned int chipset)
 	if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
 		goto err;
 
-	for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
-		int mid = start + (end - start) / 2;
-		int ret = strcmp(modules[mid].module, dev_name);
-		if (ret < 0) {
-			start = mid + 1;
-		} else if (ret > 0) {
-			end = mid;
-		} else {
-			chip = modules[mid].bit;
-			break;
-		}
-	}
+	key.module = dev_name;
+	res = bsearch(&key, modules, ARRAY_SIZE(modules) - 1,
+		      sizeof(modules[0]), module_compare);
+	if (res)
+		chip = res->bit;
 	if (chipset & chip)
 		return fd;
 

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name
  2018-09-03 10:34     ` Jani Nikula
@ 2018-09-03 10:39       ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2018-09-03 10:39 UTC (permalink / raw)
  To: Jani Nikula, Petri Latvala; +Cc: igt-dev

Quoting Jani Nikula (2018-09-03 11:34:53)
> On Mon, 03 Sep 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Quoting Petri Latvala (2018-09-03 10:39:31)
> >> On Sat, Sep 01, 2018 at 07:09:11PM +0100, Chris Wilson wrote:
> >> > Even with a small number of known drivers (6), a bsearch will take at
> >> > most 3 steps, whereas the linear search will take 3 steps on average. In
> >> > the future with more known drivers, the logN bsearch will be even more
> >> > advantageous.
> >> > 
> >> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >> > Cc: Katarzyna Dec <katarzyna.dec@intel.com>
> >> > ---
> >> >  lib/drmtest.c | 12 +++++++++---
> >> >  1 file changed, 9 insertions(+), 3 deletions(-)
> >> > 
> >> > diff --git a/lib/drmtest.c b/lib/drmtest.c
> >> > index 93228f900..bfb38f1e9 100644
> >> > --- a/lib/drmtest.c
> >> > +++ b/lib/drmtest.c
> >> > @@ -222,9 +222,15 @@ static int open_device(const char *name, unsigned int chipset)
> >> >       if (__get_drm_device_name(fd, dev_name, sizeof(dev_name) - 1) == -1)
> >> >               goto err;
> >> >  
> >> > -     for (const struct module *m = modules; m->module; m++) {
> >> > -             if (strcmp(m->module, dev_name) == 0) {
> >> > -                     chip = m->bit;
> >> > +     for (int start = 0, end = ARRAY_SIZE(modules) - 1; start < end; ){
> >> > +             int mid = start + (end - start) / 2;
> >> > +             int ret = strcmp(modules[mid].module, dev_name);
> >> > +             if (ret < 0) {
> >> > +                     end = mid;
> >> > +             } else if (ret > 0) {
> >> > +                     start = mid + 1;
> >> 
> >> 
> >> Isn't this the wrong way around?
> >
> > * blinks.
> >
> > Yes. Shame on me for assuming that a run through igt was good enough to
> > flush out the kinks. It just happens that vgem occupies the initial mid,
> > so anything that wanted vgem-only got it; everything else hit the
> > DRIVER_ANY.
> >
> > amdgpu -> skip. Ah. Hmm, that should have been flagged :|
> 
> Just sayin'

The bug was getting m1 and m2 reversed...
Wouldn't have prevented the bug, but if besearch() was a macro generator
then yes I'd be more inclined (or we had real generics).
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for lib: Use a bsearch to find the module name (rev2)
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
                   ` (3 preceding siblings ...)
  2018-09-03  9:39 ` Petri Latvala
@ 2018-09-03 11:01 ` Patchwork
  2018-09-03 14:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-03 11:01 UTC (permalink / raw)
  To: Jani Nikula; +Cc: igt-dev

== Series Details ==

Series: lib: Use a bsearch to find the module name (rev2)
URL   : https://patchwork.freedesktop.org/series/49045/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4754 -> IGTPW_1776 =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1776 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1776, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49045/revisions/2/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1776:

  === IGT changes ===

    ==== Warnings ====

    igt@amdgpu/amd_prime@i915-to-amd:
      fi-kbl-8809g:       SKIP -> PASS

    
== Known issues ==

  Here are the changes found in IGTPW_1776 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@amdgpu/amd_prime@amd-to-i915:
      fi-kbl-8809g:       SKIP -> FAIL (fdo#107341)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      {fi-byt-clapper}:   FAIL (fdo#107362, fdo#103191) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

    {igt@pm_rpm@module-reload}:
      fi-kbl-8809g:       FAIL -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#107341 https://bugs.freedesktop.org/show_bug.cgi?id=107341
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362


== Participating hosts (52 -> 48) ==

  Additional (1): fi-skl-6700hq 
  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4620 -> IGTPW_1776

  CI_DRM_4754: b6b0b80157c9ecad0569a42bb8efeb6d2f27dfb3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1776: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1776/
  IGT_4620: 20087bf22698612a526353f022bc232e2b0dcdcc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1776/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for lib: Use a bsearch to find the module name (rev2)
  2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
                   ` (4 preceding siblings ...)
  2018-09-03 11:01 ` [igt-dev] ✓ Fi.CI.BAT: success for lib: Use a bsearch to find the module name (rev2) Patchwork
@ 2018-09-03 14:43 ` Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-09-03 14:43 UTC (permalink / raw)
  To: Jani Nikula; +Cc: igt-dev

== Series Details ==

Series: lib: Use a bsearch to find the module name (rev2)
URL   : https://patchwork.freedesktop.org/series/49045/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4620_full -> IGTPW_1776_full =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/49045/revisions/2/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1776_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_isolation@bcs0-s3:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665) +1

    igt@gem_exec_big:
      shard-hsw:          PASS -> INCOMPLETE (fdo#103540)

    igt@gem_userptr_blits@stress-mm-invalidate-close:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite:
      shard-glk:          PASS -> FAIL (fdo#103167)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-kbl:          FAIL (fdo#106886) -> PASS

    igt@gem_exec_await@wide-contexts:
      shard-glk:          FAIL (fdo#105900) -> PASS

    igt@gem_exec_store@cachelines-bsd:
      shard-hsw:          FAIL (fdo#100007) -> PASS

    igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
      shard-hsw:          FAIL (fdo#103355) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS +1

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@kms_plane@pixel-format-pipe-a-planes:
      shard-snb:          FAIL (fdo#107749) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@perf@blocking:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    igt@perf_pmu@rc6-runtime-pm-long:
      shard-apl:          FAIL (fdo#105010) -> PASS
      shard-glk:          FAIL (fdo#105010) -> PASS
      shard-kbl:          FAIL (fdo#105010) -> PASS

    
  fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
  fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105010 https://bugs.freedesktop.org/show_bug.cgi?id=105010
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107749 https://bugs.freedesktop.org/show_bug.cgi?id=107749
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4620 -> IGTPW_1776
    * Linux: CI_DRM_4753 -> CI_DRM_4754

  CI_DRM_4753: 0892613a442a70a96cba33b12bb344033b557879 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4754: b6b0b80157c9ecad0569a42bb8efeb6d2f27dfb3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1776: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1776/
  IGT_4620: 20087bf22698612a526353f022bc232e2b0dcdcc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1776/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2018-09-03 14:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-01 18:09 [igt-dev] [PATCH i-g-t] lib: Use a bsearch to find the module name Chris Wilson
2018-09-01 18:46 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-01 19:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-03  7:02 ` [igt-dev] [PATCH i-g-t] " Katarzyna Dec
2018-09-03  9:39 ` Petri Latvala
2018-09-03  9:44   ` Chris Wilson
2018-09-03 10:34     ` Jani Nikula
2018-09-03 10:39       ` Chris Wilson
2018-09-03 11:01 ` [igt-dev] ✓ Fi.CI.BAT: success for lib: Use a bsearch to find the module name (rev2) Patchwork
2018-09-03 14:43 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox