From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88B07C4338F for ; Thu, 29 Jul 2021 15:14:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FF4860462 for ; Thu, 29 Jul 2021 15:14:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3FF4860462 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4EEB6EDBA; Thu, 29 Jul 2021 15:14:36 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF81B6EDBA for ; Thu, 29 Jul 2021 15:14:35 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10060"; a="234800534" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="234800534" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 08:14:34 -0700 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="581374090" Received: from mburby-mobl.amr.corp.intel.com (HELO msatwood-mobl) ([10.255.228.145]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 08:14:33 -0700 Date: Thu, 29 Jul 2021 08:14:20 -0700 From: Matt Atwood To: Matt Roper ;, intel-gfx@lists.freedesktop.org Message-ID: <20210729151420.GC3816@msatwood-mobl> References: <20210723174239.1551352-1-matthew.d.roper@intel.com> <20210723174239.1551352-23-matthew.d.roper@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210723174239.1551352-23-matthew.d.roper@intel.com> Subject: Re: [Intel-gfx] [PATCH v3 22/30] drm/i915/dg2: Define MOCS table for DG2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Jul 23, 2021 at 10:42:31AM -0700, Matt Roper wrote: > Bspec: 45101, 45427 > Cc: Ramalingam C (v5) > Signed-off-by: Matt Roper Reviewed-by: Matt Atwood > --- > drivers/gpu/drm/i915/gt/intel_mocs.c | 35 +++++++++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c > index 0c9d0b936c20..d22ca8212092 100644 > --- a/drivers/gpu/drm/i915/gt/intel_mocs.c > +++ b/drivers/gpu/drm/i915/gt/intel_mocs.c > @@ -341,6 +341,30 @@ static const struct drm_i915_mocs_entry xehpsdv_mocs_table[] = { > MOCS_ENTRY(63, 0, L3_1_UC), > }; > > +static const struct drm_i915_mocs_entry dg2_mocs_table[] = { > + /* UC - Coherent; GO:L3 */ > + MOCS_ENTRY(0, 0, L3_1_UC | L3_LKUP(1)), > + /* UC - Coherent; GO:Memory */ > + MOCS_ENTRY(1, 0, L3_1_UC | L3_GLBGO(1) | L3_LKUP(1)), > + /* UC - Non-Coherent; GO:Memory */ > + MOCS_ENTRY(2, 0, L3_1_UC | L3_GLBGO(1)), > + > + /* WB - LC */ > + MOCS_ENTRY(3, 0, L3_3_WB | L3_LKUP(1)), > +}; > + > +static const struct drm_i915_mocs_entry dg2_mocs_table_g10_ax[] = { > + /* Wa_14011441408: Set Go to Memory for MOCS#0 */ > + MOCS_ENTRY(0, 0, L3_1_UC | L3_GLBGO(1) | L3_LKUP(1)), > + /* UC - Coherent; GO:Memory */ > + MOCS_ENTRY(1, 0, L3_1_UC | L3_GLBGO(1) | L3_LKUP(1)), > + /* UC - Non-Coherent; GO:Memory */ > + MOCS_ENTRY(2, 0, L3_1_UC | L3_GLBGO(1)), > + > + /* WB - LC */ > + MOCS_ENTRY(3, 0, L3_3_WB | L3_LKUP(1)), > +}; > + > enum { > HAS_GLOBAL_MOCS = BIT(0), > HAS_ENGINE_MOCS = BIT(1), > @@ -367,7 +391,16 @@ static unsigned int get_mocs_settings(const struct drm_i915_private *i915, > { > unsigned int flags; > > - if (IS_XEHPSDV(i915)) { > + if (IS_DG2(i915)) { > + if (IS_DG2_GT_STEP(i915, G10, STEP_A0, (STEP_B0 - 1))) { > + table->size = ARRAY_SIZE(dg2_mocs_table_g10_ax); > + table->table = dg2_mocs_table_g10_ax; > + } else { > + table->size = ARRAY_SIZE(dg2_mocs_table); > + table->table = dg2_mocs_table; > + } > + table->n_entries = GEN9_NUM_MOCS_ENTRIES; > + } else if (IS_XEHPSDV(i915)) { > table->size = ARRAY_SIZE(xehpsdv_mocs_table); > table->table = xehpsdv_mocs_table; > table->n_entries = GEN9_NUM_MOCS_ENTRIES; > -- > 2.25.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx