diff mbox series

[v2,6/8] drm/i915/selftests: handle object rounding

Message ID 20211203122426.2859679-7-matthew.auld@intel.com (mailing list archive)
State New, archived
Headers show
Series DG2 accelerated migration/clearing support | expand

Commit Message

Matthew Auld Dec. 3, 2021, 12:24 p.m. UTC
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>
---
 drivers/gpu/drm/i915/gt/selftest_migrate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ramalingam C Dec. 3, 2021, 5:40 p.m. UTC | #1
On 2021-12-03 at 12:24:24 +0000, Matthew Auld wrote:
> Ensure we account for any object rounding due to min_page_size
> restrictions.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>

> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/selftest_migrate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
> index 12ef2837c89b..e21787301bbd 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
> @@ -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;
> -- 
> 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/selftest_migrate.c b/drivers/gpu/drm/i915/gt/selftest_migrate.c
index 12ef2837c89b..e21787301bbd 100644
--- a/drivers/gpu/drm/i915/gt/selftest_migrate.c
+++ b/drivers/gpu/drm/i915/gt/selftest_migrate.c
@@ -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;