From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: [PATCH i-g-t 18/26] assembler/skl: update read(...) Date: Fri, 26 Sep 2014 15:03:16 +0100 Message-ID: <1411740204-25709-18-git-send-email-damien.lespiau@intel.com> References: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 14A876E770 for ; Fri, 26 Sep 2014 07:05:08 -0700 (PDT) In-Reply-To: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhao Yakui READ(...) is used for Render Target read and Media Block read. But there is no sampler cache agent on gen9. At the same time two message types don't share the same cache agent any more. So a parameter is needed for cache agent. The 2th parameter of read(...) is not used for gen6/gen7/gen8. Hence it is reused as cache agent for SKL as that on ILK. Signed-off-by: Zhao Yakui Signed-off-by: Ben Widawsky Signed-off-by: Damien Lespiau --- assembler/gram.y | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assembler/gram.y b/assembler/gram.y index e56533d..157ce79 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -1609,7 +1609,27 @@ msgtarget: NULL_TOKEN | READ LPAREN INTEGER COMMA INTEGER COMMA INTEGER COMMA INTEGER RPAREN { - if (IS_GENp(8)) { + if (IS_GENp(9)) { + if ($5 != 0 && + $5 != GEN6_SFID_DATAPORT_RENDER_CACHE && + $5 != GEN7_SFID_DATAPORT_DATA_CACHE && + $5 != HSW_SFID_DATAPORT_DATA_CACHE1 && + $5 != SKL_SFID_DATAPORT_DCR0 && + $5 != SKL_SFID_DATAPORT_DATA_CACHE2) { + error (&@9, "error: wrong cache type\n"); + } + + if ($5 == 0) + gen8_set_sfid(GEN8(&$$), HSW_SFID_DATAPORT_DATA_CACHE1); + else + gen8_set_sfid(GEN8(&$$), $5); + + gen8_set_header_present(GEN8(&$$), 1); + gen8_set_dp_binding_table_index(GEN8(&$$), $3); + gen8_set_dp_message_control(GEN8(&$$), $7); + gen8_set_dp_message_type(GEN8(&$$), $9); + gen8_set_dp_category(GEN8(&$$), 0); + } else if (IS_GENp(8)) { gen8_set_sfid(GEN8(&$$), GEN6_SFID_DATAPORT_SAMPLER_CACHE); gen8_set_header_present(GEN8(&$$), 1); gen8_set_dp_binding_table_index(GEN8(&$$), $3); -- 1.8.3.1