From patchwork Wed Jan 14 06:20:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 5625911 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7D8F19F358 for ; Wed, 14 Jan 2015 06:20:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A18D120397 for ; Wed, 14 Jan 2015 06:20:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C075D201FB for ; Wed, 14 Jan 2015 06:20:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FCA86E71B; Tue, 13 Jan 2015 22:20:44 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D9D76E71B for ; Tue, 13 Jan 2015 22:20:43 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 13 Jan 2015 22:17:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,754,1413270000"; d="scan'208";a="661546265" Received: from debian-hsw.sh.intel.com ([10.239.159.184]) by fmsmga002.fm.intel.com with ESMTP; 13 Jan 2015 22:20:42 -0800 From: Zhenyu Wang To: intel-gfx@lists.freedesktop.org Date: Wed, 14 Jan 2015 14:20:26 +0800 Message-Id: <1421216426-3132-1-git-send-email-zhenyuw@linux.intel.com> X-Mailer: git-send-email 2.1.4 Subject: [Intel-gfx] [PATCH] intel: Fix GTT entry setup for aub dump 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 emulator GTT entry setup for aub dump needs mem type as GTT_ENTRY instead of NONLOCAL. NONLOCAL would write data in main memory space which is wrong with new memory layout. GTT_ENTRY write would setup GTT memory pool and other required internal buffers. With this I can run aub dump on latest release without crash. Signed-off-by: Zhenyu Wang --- intel/intel_bufmgr_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) I've done more testings about this on more hosts. No regression found on older HW with previous emulator with memory type change. And verify this on more recent emulators that without crash and produce result fine. diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 14e92c9..cf85bb8 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 emulator */ + 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 */