On Fri, Nov 01, 2013 at 12:53:42PM +0000, [email protected] 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
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to