Skip to content

Commit

Permalink
drm/i915/selftest_migrate: Consider the possible roundup of size
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ramalingam C committed Apr 14, 2022
1 parent 48760ff commit a785d3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/gt/selftest_migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a785d3a

Please sign in to comment.