Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: oscar.mateo@intel.com
Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH] prime_self_import: Assure no pending requests before object counting
Date: Fri, 1 Nov 2013 16:22:31 +0000	[thread overview]
Message-ID: <20131101162231.GE10288@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1383310422-30702-1-git-send-email-oscar.mateo@intel.com>

On Fri, Nov 01, 2013 at 12:53:42PM +0000, oscar.mateo@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

      parent reply	other threads:[~2013-11-01 16:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 12:53 [PATCH] prime_self_import: Assure no pending requests before object counting oscar.mateo
2013-11-01 16:08 ` Daniel Vetter
2013-11-01 16:18   ` Ben Widawsky
2013-11-01 18:42     ` Daniel Vetter
2013-11-01 18:44       ` Ben Widawsky
2013-11-01 18:47         ` Daniel Vetter
2013-11-01 18:52           ` Ben Widawsky
2013-11-01 19:07             ` Daniel Vetter
2013-11-04 16:45               ` Mateo Lozano, Oscar
2013-11-04 17:13                 ` Daniel Vetter
2013-11-04 17:26                   ` Mateo Lozano, Oscar
2013-11-04 17:43                     ` Daniel Vetter
2013-11-01 16:16 ` Ben Widawsky
2013-11-01 16:22 ` Damien Lespiau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131101162231.GE10288@strange.amr.corp.intel.com \
    --to=damien.lespiau@intel.com \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=oscar.mateo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox