[Intel-gfx] [PATCH v3 34/37] drm/i915: support basic object migration
Chris Wilson
chris at chris-wilson.co.uk
Sat Aug 10 11:45:37 UTC 2019
Quoting Matthew Auld (2019-08-09 23:26:40)
> We are going want to able to move objects between different regions
> like system memory and local memory. In the future everything should
> be just another region.
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
> Signed-off-by: CQ Tang <cq.tang at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_object.c | 140 ++++++++++++++++++
> drivers/gpu/drm/i915/gem/i915_gem_object.h | 8 +
> drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 +-
> .../drm/i915/selftests/intel_memory_region.c | 129 ++++++++++++++++
> 4 files changed, 278 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
> index 24f737b00e84..5982aeaaa2e3 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
> @@ -28,6 +28,8 @@
> #include "i915_gem_clflush.h"
> #include "i915_gem_context.h"
> #include "i915_gem_object.h"
> +#include "i915_gem_object_blt.h"
> +#include "i915_gem_region.h"
> #include "i915_globals.h"
> #include "i915_trace.h"
>
> @@ -170,6 +172,144 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head)
> atomic_dec(&i915->mm.free_count);
> }
>
> +
> +int i915_gem_object_prepare_move(struct drm_i915_gem_object *obj)
> +{
> + int err;
> +
> + lockdep_assert_held(&obj->base.dev->struct_mutex);
No, straight up no.
-Chris
More information about the Intel-gfx
mailing list