public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jackie Li <yaodong.li@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v10 4/7] drm/i915/guc: Add support to return CNL specific reserved GuC WOPCM size
Date: Mon, 12 Feb 2018 15:45:50 -0800	[thread overview]
Message-ID: <1518479153-28429-4-git-send-email-yaodong.li@intel.com> (raw)
In-Reply-To: <1518479153-28429-1-git-send-email-yaodong.li@intel.com>

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)

v10:
 - Used if-else ladder to the returning of context sizes (Joonas)

Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (v9)
Signed-off-by: Jackie Li <yaodong.li@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_wopcm.c | 6 ++++--
 drivers/gpu/drm/i915/intel_guc_wopcm.h | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_wopcm.c b/drivers/gpu/drm/i915/intel_guc_wopcm.c
index cf832b9..9a276fe 100644
--- a/drivers/gpu/drm/i915/intel_guc_wopcm.c
+++ b/drivers/gpu/drm/i915/intel_guc_wopcm.c
@@ -13,8 +13,10 @@ static inline u32 context_reserved_size(struct intel_guc *guc)
 
 	if (IS_GEN9_LP(i915))
 		return BXT_GUC_WOPCM_RC6_CTX_RESERVED;
-
-	return 0;
+	else if (INTEL_GEN(i915) >= 10)
+		return CNL_GUC_WOPCM_HW_CTX_RESERVED;
+	else
+		return 0;
 }
 
 static inline int gen9_check_dword_gap(struct intel_guc_wopcm *guc_wopcm)
diff --git a/drivers/gpu/drm/i915/intel_guc_wopcm.h b/drivers/gpu/drm/i915/intel_guc_wopcm.h
index a632caa..13fcab6 100644
--- a/drivers/gpu/drm/i915/intel_guc_wopcm.h
+++ b/drivers/gpu/drm/i915/intel_guc_wopcm.h
@@ -52,6 +52,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
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-02-12 23:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 23:45 [PATCH v10 1/7] drm/i915/guc: Move GuC WOPCM related code into separate files Jackie Li
2018-02-12 23:45 ` [PATCH v10 2/7] drm/i915/guc: Rename guc_ggtt_offset to intel_guc_ggtt_offset Jackie Li
2018-02-12 23:45 ` [PATCH v10 3/7] drm/i915/guc: Implement dynamic GuC WOPCM offset and size Jackie Li
2018-02-13 15:56   ` Michal Wajdeczko
2018-02-13 20:01     ` Yaodong Li
2018-02-13 22:58       ` Michal Wajdeczko
2018-02-14  2:26     ` Yaodong Li
2018-02-14 17:38       ` Michal Wajdeczko
2018-02-14 18:25         ` Yaodong Li
2018-02-12 23:45 ` Jackie Li [this message]
2018-02-12 23:45 ` [PATCH v10 5/7] drm/i915/guc: Add HuC firmware size related restriction for Gen9 and CNL A0 Jackie Li
2018-02-13 16:06   ` Michal Wajdeczko
2018-02-13 21:50     ` Yaodong Li
2018-02-13 22:59       ` Michal Wajdeczko
2018-02-14  0:41         ` Yaodong Li
2018-02-14 17:24           ` Michal Wajdeczko
2018-02-14 18:22             ` Yaodong Li
2018-02-12 23:45 ` [PATCH v10 6/7] drm/i915/guc: Check the locking status of GuC WOPCM registers Jackie Li
2018-02-13 17:39   ` Michal Wajdeczko
2018-02-14  1:18     ` Yaodong Li
2018-02-14 17:07       ` Michal Wajdeczko
2018-02-14 18:31         ` Yaodong Li
2018-02-14 18:42       ` Yaodong Li
2018-02-12 23:45 ` [PATCH v10 7/7] HAX Enable GuC Submission for CI Jackie Li
2018-02-13  0:27 ` ✗ Fi.CI.BAT: failure for series starting with [v10,1/7] drm/i915/guc: Move GuC WOPCM related code into separate files Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518479153-28429-4-git-send-email-yaodong.li@intel.com \
    --to=yaodong.li@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox