From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH] prime_self_import: Assure no pending requests before object counting Date: Fri, 1 Nov 2013 16:22:31 +0000 Message-ID: <20131101162231.GE10288@strange.amr.corp.intel.com> References: <1383310422-30702-1-git-send-email-oscar.mateo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 496B5F06D1 for ; Fri, 1 Nov 2013 09:22:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1383310422-30702-1-git-send-email-oscar.mateo@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: oscar.mateo@intel.com Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org 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