From patchwork Thu Feb 8 23:03:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jackie Li X-Patchwork-Id: 10208111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B624B60327 for ; Thu, 8 Feb 2018 23:05:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE3FA29334 for ; Thu, 8 Feb 2018 23:05:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3322296DA; Thu, 8 Feb 2018 23:05:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D782E29334 for ; Thu, 8 Feb 2018 23:05:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C58576E6B4; Thu, 8 Feb 2018 23:05:31 +0000 (UTC) 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 ESMTPS id C1DB66E63D for ; Thu, 8 Feb 2018 23:05:29 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 15:05:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,480,1511856000"; d="scan'208";a="17090544" Received: from yli84-z170x-ud5.fm.intel.com ([10.19.83.14]) by orsmga006.jf.intel.com with ESMTP; 08 Feb 2018 15:05:28 -0800 From: Jackie Li To: intel-gfx@lists.freedesktop.org Date: Thu, 8 Feb 2018 15:03:52 -0800 Message-Id: <1518131035-24108-4-git-send-email-yaodong.li@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518131035-24108-1-git-send-email-yaodong.li@intel.com> References: <1518131035-24108-1-git-send-email-yaodong.li@intel.com> Subject: [Intel-gfx] [PATCH v9 4/7] drm/i915/guc: Add support to return CNL specific reserved GuC WOPCM size X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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-Virus-Scanned: ClamAV using ClamSMTP CNL has its specific reserved GuC WOPCM size for RC6 and other hardware contexts. This patch updates the code to return CNL specific reserved GuC WOPCM size for RC6 and other hardware contexts so that the GuC WOPCM size can be calculated correctly for CNL. v9: - Created a new patch for these changes originally made in v8 4/6 patch of this series (Sagar/Michal) Cc: Sagar Arun Kamble Cc: Michal Wajdeczko Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Jackie Li Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_guc_wopcm.c | 3 +++ drivers/gpu/drm/i915/intel_guc_wopcm.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_guc_wopcm.c b/drivers/gpu/drm/i915/intel_guc_wopcm.c index 8b2ce49..d0185b0 100644 --- a/drivers/gpu/drm/i915/intel_guc_wopcm.c +++ b/drivers/gpu/drm/i915/intel_guc_wopcm.c @@ -34,6 +34,9 @@ static inline u32 guc_wopcm_context_reserved_size(struct intel_guc *guc) if (IS_GEN9_LP(i915)) return BXT_GUC_WOPCM_RC6_CTX_RESERVED; + if (IS_GEN10(i915)) + return CNL_GUC_WOPCM_HW_CTX_RESERVED; + return 0; } diff --git a/drivers/gpu/drm/i915/intel_guc_wopcm.h b/drivers/gpu/drm/i915/intel_guc_wopcm.h index 3af7ca9..1c5ffeb 100644 --- a/drivers/gpu/drm/i915/intel_guc_wopcm.h +++ b/drivers/gpu/drm/i915/intel_guc_wopcm.h @@ -72,6 +72,8 @@ struct intel_guc; #define GUC_WOPCM_STACK_RESERVED (8 << 10) /* 24KB at the end of GuC WOPCM is reserved for RC6 CTX on BXT. */ #define BXT_GUC_WOPCM_RC6_CTX_RESERVED (24 << 10) +/* 36KB WOPCM reserved at the end of GuC WOPCM on CNL. */ +#define CNL_GUC_WOPCM_HW_CTX_RESERVED (36 << 10) /* * GuC WOPCM starts at 144KB (GUC_WOPCM_RESERVED + 128KB reserved for GuC