mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
drm/i915/wopcm: update default size for gen11+
The size has been increased to 2MB starting from Gen11. GuC and HuC FWs fit in 1MB so we were fine even with the legacy define, but let's still move to the correct one before the blobs grow to avoid being caught off guard in the future. v2: return early if the platform doesn't have GuC, fix nits (Michal) Bspec: 12690 Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Stuart Summers <stuart.summers@intel.com> [ickle: use SZ consistently] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190606224225.14287-2-daniele.ceraolospurio@intel.com
This commit is contained in:
parent
33ec6c9eb3
commit
23529cbe91
1 changed files with 18 additions and 9 deletions
|
@ -41,26 +41,27 @@
|
|||
* context).
|
||||
*/
|
||||
|
||||
/* Default WOPCM size 1MB. */
|
||||
#define GEN9_WOPCM_SIZE (1024 * 1024)
|
||||
/* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms */
|
||||
#define GEN11_WOPCM_SIZE SZ_2M
|
||||
#define GEN9_WOPCM_SIZE SZ_1M
|
||||
/* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */
|
||||
#define WOPCM_RESERVED_SIZE (16 * 1024)
|
||||
#define WOPCM_RESERVED_SIZE SZ_16K
|
||||
|
||||
/* 16KB reserved at the beginning of GuC WOPCM. */
|
||||
#define GUC_WOPCM_RESERVED (16 * 1024)
|
||||
#define GUC_WOPCM_RESERVED SZ_16K
|
||||
/* 8KB from GUC_WOPCM_RESERVED is reserved for GuC stack. */
|
||||
#define GUC_WOPCM_STACK_RESERVED (8 * 1024)
|
||||
#define GUC_WOPCM_STACK_RESERVED SZ_8K
|
||||
|
||||
/* GuC WOPCM Offset value needs to be aligned to 16KB. */
|
||||
#define GUC_WOPCM_OFFSET_ALIGNMENT (1UL << GUC_WOPCM_OFFSET_SHIFT)
|
||||
|
||||
/* 24KB at the end of WOPCM is reserved for RC6 CTX on BXT. */
|
||||
#define BXT_WOPCM_RC6_CTX_RESERVED (24 * 1024)
|
||||
#define BXT_WOPCM_RC6_CTX_RESERVED (SZ_16K + SZ_8K)
|
||||
/* 36KB WOPCM reserved at the end of WOPCM on CNL. */
|
||||
#define CNL_WOPCM_HW_CTX_RESERVED (36 * 1024)
|
||||
#define CNL_WOPCM_HW_CTX_RESERVED (SZ_32K + SZ_4K)
|
||||
|
||||
/* 128KB from GUC_WOPCM_RESERVED is reserved for FW on Gen9. */
|
||||
#define GEN9_GUC_FW_RESERVED (128 * 1024)
|
||||
#define GEN9_GUC_FW_RESERVED SZ_128K
|
||||
#define GEN9_GUC_WOPCM_OFFSET (GUC_WOPCM_RESERVED + GEN9_GUC_FW_RESERVED)
|
||||
|
||||
/**
|
||||
|
@ -71,7 +72,15 @@
|
|||
*/
|
||||
void intel_wopcm_init_early(struct intel_wopcm *wopcm)
|
||||
{
|
||||
wopcm->size = GEN9_WOPCM_SIZE;
|
||||
struct drm_i915_private *i915 = wopcm_to_i915(wopcm);
|
||||
|
||||
if (!HAS_GUC(i915))
|
||||
return;
|
||||
|
||||
if (INTEL_GEN(i915) >= 11)
|
||||
wopcm->size = GEN11_WOPCM_SIZE;
|
||||
else
|
||||
wopcm->size = GEN9_WOPCM_SIZE;
|
||||
|
||||
DRM_DEBUG_DRIVER("WOPCM size: %uKiB\n", wopcm->size / 1024);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue