[Intel-gfx] [PATCH RFC 2/4] drm/i915: IOMMU based SVM implementation v13
Chris Wilson
chris at chris-wilson.co.uk
Mon Aug 15 12:05:57 UTC 2016
On Mon, Aug 15, 2016 at 02:48:05PM +0300, Mika Kuoppala wrote:
> @@ -891,6 +894,8 @@ struct i915_gem_context {
> unsigned long flags;
> #define CONTEXT_NO_ZEROMAP BIT(0)
> #define CONTEXT_NO_ERROR_CAPTURE BIT(1)
> +#define CONTEXT_SVM BIT(2)
> +
> unsigned hw_id;
> u32 user_handle;
>
> @@ -909,6 +914,9 @@ struct i915_gem_context {
> struct atomic_notifier_head status_notifier;
> bool execlists_force_single_submission;
>
> + u32 pasid; /* svm, 20 bits */
Doesn't this conflict with hw_id for execlists.
> + struct task_struct *task;
We don't need the task, we need the mm.
Holding the task is not sufficient.
> struct list_head link;
>
> u8 remap_slice;
> @@ -2001,6 +2009,8 @@ struct drm_i915_private {
>
> struct i915_runtime_pm pm;
>
> + bool svm_available;
No better home / community?
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7e08c774a1aa..45d67b54c018 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4304,6 +4304,13 @@ i915_gem_init_hw(struct drm_device *dev)
> }
> }
>
> + if (INTEL_GEN(dev) >= 8) {
> + if (intel_init_svm(dev))
init_hw ?
This looks more like one off early driver init.
> + DRM_DEBUG_DRIVER("Initialized Intel SVM support\n");
> + else
> + DRM_ERROR("Failed to enable Intel SVM support\n");
> + }
> +
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list