summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt
diff options
context:
space:
mode:
authorRamalingam C <ramalingam.c@intel.com>2022-04-05 20:38:37 +0530
committerRamalingam C <ramalingam.c@intel.com>2022-04-14 13:20:29 +0530
commita785d3a8affd11d19955464f376602dd711ad309 (patch)
tree94f268855039f7e02036e0feb0742567d0ff0b31 /drivers/gpu/drm/i915/gt
parent48760ffe923aeb2cc73865ea36b3509718d102e3 (diff)
drm/i915/selftest_migrate: Consider the possible roundup of size
Consider the possible round up happened at obj size alignment to min_page_size during the obj allocation. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Reviewed-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220405150840.29351-7-ramalingam.c@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt')
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_migrate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index cca3b0db83c9..1c2417ebeca0 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -152,6 +152,9 @@ static int clear(struct intel_migrate *migrate,
if (IS_ERR(obj))
return 0;
+ /* Consider the rounded up memory too */
+ sz = obj->base.size;
+
for_i915_gem_ww(&ww, err, true) {
err = i915_gem_object_lock(obj, &ww);
if (err)