]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/selftests: handle object rounding
authorMatthew Auld <matthew.auld@intel.com>
Mon, 6 Dec 2021 11:25:39 +0000 (11:25 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 8 Dec 2021 10:25:27 +0000 (10:25 +0000)
Ensure we account for any object rounding due to min_page_size
restrictions.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211206112539.3149779-4-matthew.auld@intel.com
drivers/gpu/drm/i915/gt/selftest_migrate.c

index 12ef2837c89b0d3d807c320046c97c8235d34a60..e21787301bbddc65bfbe01c515bb34ca82ee20d6 100644 (file)
@@ -49,6 +49,7 @@ static int copy(struct intel_migrate *migrate,
        if (IS_ERR(src))
                return 0;
 
+       sz = src->base.size;
        dst = i915_gem_object_create_internal(i915, sz);
        if (IS_ERR(dst))
                goto err_free_src;