All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers
@ 2017-12-14 19:57 Chris Wilson
  2017-12-14 20:15 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-12-14 19:57 UTC (permalink / raw)
  To: intel-gfx

Why open code a printf/write loop, when we already have a function
providing it?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 lib/igt_debugfs.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 49b68dfed..1aec079c5 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -887,20 +887,12 @@ bool igt_drop_caches_has(int drm_fd, uint64_t val)
  */
 void igt_drop_caches_set(int drm_fd, uint64_t val)
 {
-	int fd;
-	char data[19];
-	size_t nbytes;
-
-	sprintf(data, "0x%" PRIx64, val);
-
-	fd = igt_debugfs_open(drm_fd, "i915_gem_drop_caches", O_WRONLY);
+	int dir;
 
-	igt_assert(fd >= 0);
-	do {
-		nbytes = write(fd, data, strlen(data) + 1);
-	} while (nbytes == -1 && (errno == EINTR || errno == EAGAIN));
-	igt_assert(nbytes == strlen(data) + 1);
-	close(fd);
+	dir = igt_debugfs_dir(drm_fd);
+	igt_assert(igt_sysfs_printf(dir, "i915_gem_drop_caches",
+				    "0x%" PRIx64, val) > 0);
+	close(dir);
 }
 
 /*
-- 
2.15.1

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

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

* ✓ Fi.CI.BAT: success for lib/debug: Convert igt_drop_caches_set() to use common file writers
  2017-12-14 19:57 [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers Chris Wilson
@ 2017-12-14 20:15 ` Patchwork
  2017-12-14 21:09 ` ✗ Fi.CI.IGT: warning " Patchwork
  2017-12-15 10:31 ` [PATCH igt] " Joonas Lahtinen
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-14 20:15 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: lib/debug: Convert igt_drop_caches_set() to use common file writers
URL   : https://patchwork.freedesktop.org/series/35374/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
103af7286e2d1014e3d7126691fe046ab2c9f73e lib: Ask the kernel to quiesce the GPU

with latest DRM-Tip kernel build CI_DRM_3520
048a4c890dc7 drm-tip: 2017y-12m-14d-19h-09m-41s UTC integration manifest

No testlist changes.

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> DMESG-WARN (fi-elk-e7500) fdo#103989 +1
Test gem_sync:
        Subgroup basic-all:
                fail       -> DMESG-FAIL (fi-blb-e6850) fdo#104259

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:445s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:438s
fi-blb-e6850     total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  time:398s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:498s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:279s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:495s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:502s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:487s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:267s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:534s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:410s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:416s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:391s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:475s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:426s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:479s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:525s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:470s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:521s
fi-pnv-d510      total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  time:596s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:447s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:534s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:556s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:491s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:447s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:554s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:419s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:595s
fi-cnl-y         total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:624s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:477s

== Logs ==

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

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

* ✗ Fi.CI.IGT: warning for lib/debug: Convert igt_drop_caches_set() to use common file writers
  2017-12-14 19:57 [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers Chris Wilson
  2017-12-14 20:15 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-12-14 21:09 ` Patchwork
  2017-12-15 10:31 ` [PATCH igt] " Joonas Lahtinen
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-14 21:09 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: lib/debug: Convert igt_drop_caches_set() to use common file writers
URL   : https://patchwork.freedesktop.org/series/35374/
State : warning

== Summary ==

Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                pass       -> FAIL       (shard-snb) fdo#101623
Test gem_tiled_swapping:
        Subgroup non-threaded:
                pass       -> INCOMPLETE (shard-hsw) fdo#104218
Test kms_cursor_crc:
        Subgroup cursor-128x128-rapid-movement:
                pass       -> SKIP       (shard-hsw)
        Subgroup cursor-64x64-onscreen:
                pass       -> SKIP       (shard-hsw)
Test kms_draw_crc:
        Subgroup draw-method-xrgb8888-mmap-cpu-untiled:
                pass       -> SKIP       (shard-hsw)
Test kms_atomic_interruptible:
        Subgroup legacy-cursor:
                pass       -> SKIP       (shard-hsw)
Test kms_flip:
        Subgroup flip-vs-panning-vs-hang-interruptible:
                dmesg-warn -> PASS       (shard-snb) fdo#103821
        Subgroup plain-flip-fb-recreate:
                fail       -> PASS       (shard-snb) fdo#100368 +1
        Subgroup modeset-vs-vblank-race:
                fail       -> PASS       (shard-hsw) fdo#103060
Test kms_plane_lowres:
        Subgroup pipe-b-tiling-none:
                incomplete -> PASS       (shard-snb)
Test pm_rpm:
        Subgroup cursor-dpms:
                skip       -> PASS       (shard-hsw)

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060

shard-hsw        total:2661 pass:1501 dwarn:1   dfail:0   fail:11  skip:1147 time:8925s
shard-snb        total:2712 pass:1308 dwarn:1   dfail:0   fail:12  skip:1391 time:8096s
Blacklisted hosts:
shard-apl        total:2712 pass:1686 dwarn:1   dfail:0   fail:24  skip:1001 time:13793s
shard-kbl        total:2686 pass:1792 dwarn:1   dfail:0   fail:26  skip:866 time:10519s

== Logs ==

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

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

* Re: [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers
  2017-12-14 19:57 [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers Chris Wilson
  2017-12-14 20:15 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-12-14 21:09 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-12-15 10:31 ` Joonas Lahtinen
  2017-12-15 10:33   ` Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2017-12-15 10:31 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Thu, 2017-12-14 at 19:57 +0000, Chris Wilson wrote:
> Why open code a printf/write loop, when we already have a function
> providing it?
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Will merge the patch.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers
  2017-12-15 10:31 ` [PATCH igt] " Joonas Lahtinen
@ 2017-12-15 10:33   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-12-15 10:33 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx

Quoting Joonas Lahtinen (2017-12-15 10:31:08)
> On Thu, 2017-12-14 at 19:57 +0000, Chris Wilson wrote:
> > Why open code a printf/write loop, when we already have a function
> > providing it?
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Will merge the patch.

Apply the handle EINTR from vfprintf first.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-12-15 10:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 19:57 [PATCH igt] lib/debug: Convert igt_drop_caches_set() to use common file writers Chris Wilson
2017-12-14 20:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-14 21:09 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-15 10:31 ` [PATCH igt] " Joonas Lahtinen
2017-12-15 10:33   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.