Commit 97c8ef44 authored by Matthew Auld's avatar Matthew Auld

drm/i915/selftests: handle object rounding

Ensure we account for any object rounding due to min_page_size
restrictions.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: default avatarRamalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211206112539.3149779-4-matthew.auld@intel.com
parent 31d70749
...@@ -49,6 +49,7 @@ static int copy(struct intel_migrate *migrate, ...@@ -49,6 +49,7 @@ static int copy(struct intel_migrate *migrate,
if (IS_ERR(src)) if (IS_ERR(src))
return 0; return 0;
sz = src->base.size;
dst = i915_gem_object_create_internal(i915, sz); dst = i915_gem_object_create_internal(i915, sz);
if (IS_ERR(dst)) if (IS_ERR(dst))
goto err_free_src; goto err_free_src;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment