[Intel-gfx] [PATCH] prime_self_import: Assure no pending requests before object counting
Damien Lespiau
damien.lespiau at intel.com
Fri Nov 1 17:22:31 CET 2013
On Fri, Nov 01, 2013 at 12:53:42PM +0000, oscar.mateo at intel.com wrote:
> +static void retire_requests(void)
> +{
> + char fname[FILENAME_MAX];
> + int drop_caches_fd;
> + const char *data = "0x4";
> +
> + snprintf(fname, FILENAME_MAX, "%s/%i/%s",
> + "/sys/kernel/debug/dri", drm_get_card(),
> + "i915_gem_drop_caches");
> +
> + drop_caches_fd = open(fname, O_WRONLY);
This can be replaced by the newly introduced igt_debugfs_t facilities
(that take care or where to find the debugfs mount point and allows to
have fixes aroud that located in one place):
igt_debugfs_t debugfs;
igt_debugfs_init(&debugfs);
fd = igt_debugfs_open(&debugfs, "i915_gem_drop_caches", O_WRONLY);
--
Damien
More information about the Intel-gfx
mailing list