diff options
author | 2019-06-21 08:08:11 +0100 | |
---|---|---|
committer | 2019-06-21 13:49:00 +0100 | |
commit | db56f974941b75b2c96e577100e7abe64b03d9b9 (patch) | |
tree | ab454eed8d7bc9833b612b12801e4f1e616f7a27 /drivers/gpu/drm/i915/gt/intel_gt.h | |
parent | drm/i915: Rename i915_timeline to intel_timeline and move under gt (diff) | |
download | wireguard-linux-db56f974941b75b2c96e577100e7abe64b03d9b9.tar.xz wireguard-linux-db56f974941b75b2c96e577100e7abe64b03d9b9.zip |
drm/i915: Eliminate dual personality of i915_scratch_offset
Scratch vma lives under gt but the API used to work on i915. Make this
consistent by renaming the function to intel_gt_scratch_offset and make
it take struct intel_gt.
v2:
* Move to intel_gt. (Chris)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621070811.7006-33-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_gt.h')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gt.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h index 29cd15be6a01..cf3c6cecc8ee 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.h +++ b/drivers/gpu/drm/i915/gt/intel_gt.h @@ -21,4 +21,12 @@ void intel_gt_clear_error_registers(struct intel_gt *gt, void intel_gt_flush_ggtt_writes(struct intel_gt *gt); void intel_gt_chipset_flush(struct intel_gt *gt); +int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size); +void intel_gt_fini_scratch(struct intel_gt *gt); + +static inline u32 intel_gt_scratch_offset(const struct intel_gt *gt) +{ + return i915_ggtt_offset(gt->scratch); +} + #endif /* __INTEL_GT_H__ */ |