diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2017-10-16 17:47:10 +0300 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2017-10-16 18:53:22 +0300 |
commit | 46f1e8b3de827057cdbeb9a78e6994b1f0386474 (patch) | |
tree | c9a8f297ab6ee2bdb91d3f8aa9e6ca98be82844f /drivers/gpu/drm/i915/intel_guc.c | |
parent | 1fd51d9d97059cb7dd0bf7a3b6f7cb609d485718 (diff) | |
download | linux-46f1e8b3de827057cdbeb9a78e6994b1f0386474.tar.xz |
drm/i915: Move intel_guc_wopcm_size to intel_guc.c
Function intel_guc_wopcm_size didn't fit well in the old place.
With this move upcoming cleanup will be simpler.
Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171016144724.17244-2-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c index 9e18c4fb9909..be1c9a7f4ff3 100644 --- a/drivers/gpu/drm/i915/intel_guc.c +++ b/drivers/gpu/drm/i915/intel_guc.c @@ -263,3 +263,14 @@ err: i915_gem_object_put(obj); return vma; } + +u32 intel_guc_wopcm_size(struct drm_i915_private *dev_priv) +{ + u32 wopcm_size = GUC_WOPCM_TOP; + + /* On BXT, the top of WOPCM is reserved for RC6 context */ + if (IS_GEN9_LP(dev_priv)) + wopcm_size -= BXT_GUC_WOPCM_RC6_RESERVED; + + return wopcm_size; +} |