From patchwork Mon Dec 29 05:46:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 5547911 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3A9D4BF6C3 for ; Mon, 29 Dec 2014 05:46:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AE0A20117 for ; Mon, 29 Dec 2014 05:46:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0128D2010F for ; Mon, 29 Dec 2014 05:46:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F1A989AEA; Sun, 28 Dec 2014 21:46:54 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 160C089AEA for ; Sun, 28 Dec 2014 21:46:53 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 28 Dec 2014 21:44:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,658,1413270000"; d="scan'208";a="654305430" Received: from debian-hsw.sh.intel.com ([10.239.159.173]) by fmsmga002.fm.intel.com with ESMTP; 28 Dec 2014 21:46:51 -0800 From: Zhenyu Wang To: intel-gfx@lists.freedesktop.org Date: Mon, 29 Dec 2014 13:46:26 +0800 Message-Id: <1419831986-6244-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.1.4 Cc: kenneth.w.graunke@intel.com Subject: [Intel-gfx] [PATCH] intel: Fix GTT entry setup for aub dump on recent fulsim X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On recent fulsim GTT entry setup for aub dump seems to need mem type as GTT_ENTRY instead of NONLOCAL. NONLOCAL would write data in main memory space which seems wrong on recent fulsim. GTT_ENTRY write would setup GTT memory pool and other required internal buffers. With this I can run aub dump on latest fulsim release without crash. Signed-off-by: Zhenyu Wang --- intel/intel_bufmgr_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 14e92c9..3076111 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -3180,7 +3180,8 @@ drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable) /* Set up the GTT. The max we can handle is 256M */ aub_out(bufmgr_gem, CMD_AUB_TRACE_HEADER_BLOCK | ((bufmgr_gem->gen >= 8 ? 6 : 5) - 2)); - aub_out(bufmgr_gem, AUB_TRACE_MEMTYPE_NONLOCAL | 0 | AUB_TRACE_OP_DATA_WRITE); + /* Need to use GTT_ENTRY type for recent fulsim */ + aub_out(bufmgr_gem, AUB_TRACE_MEMTYPE_GTT_ENTRY | 0 | AUB_TRACE_OP_DATA_WRITE); aub_out(bufmgr_gem, 0); /* subtype */ aub_out(bufmgr_gem, 0); /* offset */ aub_out(bufmgr_gem, gtt_size); /* size */