mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 17:17:04 -04:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user