From patchwork Fri Dec 6 01:16:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 3292091 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5E516C0D4A for ; Fri, 6 Dec 2013 01:15:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 914D7204FB for ; Fri, 6 Dec 2013 01:15:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AFA54201DE for ; Fri, 6 Dec 2013 01:15:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA525FA981; Thu, 5 Dec 2013 17:15:33 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id CA81FFA981 for ; Thu, 5 Dec 2013 17:15:31 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 05 Dec 2013 17:15:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,837,1378882800"; d="scan'208";a="439446966" Received: from xhh-hsw32.sh.intel.com ([10.239.37.15]) by fmsmga001.fm.intel.com with ESMTP; 05 Dec 2013 17:15:30 -0800 From: "Xiang, Haihao" To: intel-gfx@lists.freedesktop.org Date: Fri, 6 Dec 2013 09:16:58 +0800 Message-Id: <1386292619-18006-1-git-send-email-haihao.xiang@intel.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Intel-gfx] [Intel gfx][assembler][i-g-t PATCH] assembler/bdw: Update write(...) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: "Xiang, Haihao" write(...) is used for Render Target Write and Media Block Write. The two message types no longer share the same cache agent on GEN8, So a parameter is needed for cache agent. The 4th parameter of write() is used for write commit bit which has been removed since GEN7. Hence we can re-use the 4th parameter as cache agent on GEN8 Signed-off-by: Xiang, Haihao --- assembler/gram.y | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/assembler/gram.y b/assembler/gram.y index bdcfe79..ad4cb29 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -1651,7 +1651,20 @@ msgtarget: NULL_TOKEN INTEGER RPAREN { if (IS_GENp(8)) { - gen8_set_sfid(GEN8(&$$), GEN6_SFID_DATAPORT_RENDER_CACHE); + if ($9 != 0 && + $9 != GEN6_SFID_DATAPORT_SAMPLER_CACHE && + $9 != GEN6_SFID_DATAPORT_RENDER_CACHE && + $9 != GEN6_SFID_DATAPORT_CONSTANT_CACHE && + $9 != GEN7_SFID_DATAPORT_DATA_CACHE && + $9 != HSW_SFID_DATAPORT_DATA_CACHE1) { + error (&@9, "error: wrong cache type\n"); + } + + if ($9 == 0) + gen8_set_sfid(GEN8(&$$), GEN6_SFID_DATAPORT_RENDER_CACHE); + else + gen8_set_sfid(GEN8(&$$), $9); + gen8_set_header_present(GEN8(&$$), 1); gen8_set_dp_binding_table_index(GEN8(&$$), $3); gen8_set_dp_message_control(GEN8(&$$), $5); @@ -1701,7 +1714,20 @@ msgtarget: NULL_TOKEN INTEGER COMMA INTEGER RPAREN { if (IS_GENp(8)) { - gen8_set_sfid(GEN8(&$$), GEN6_SFID_DATAPORT_RENDER_CACHE); + if ($9 != 0 && + $9 != GEN6_SFID_DATAPORT_SAMPLER_CACHE && + $9 != GEN6_SFID_DATAPORT_RENDER_CACHE && + $9 != GEN6_SFID_DATAPORT_CONSTANT_CACHE && + $9 != GEN7_SFID_DATAPORT_DATA_CACHE && + $9 != HSW_SFID_DATAPORT_DATA_CACHE1) { + error (&@9, "error: wrong cache type\n"); + } + + if ($9 == 0) + gen8_set_sfid(GEN8(&$$), GEN6_SFID_DATAPORT_RENDER_CACHE); + else + gen8_set_sfid(GEN8(&$$), $9); + gen8_set_header_present(GEN8(&$$), ($11 != 0)); gen8_set_dp_binding_table_index(GEN8(&$$), $3); gen8_set_dp_message_control(GEN8(&$$), $5);