diff options
author | Fei Yang <fei.yang@intel.com> | 2024-01-16 14:37:09 -0800 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2024-01-18 14:43:44 -0800 |
commit | 43d48379c9399654059bd2af5898fc464641837c (patch) | |
tree | d96eb5ec81dbc905ef9e737e834fcb26b6389b59 /drivers/gpu | |
parent | eb08104f90fc474054211244d668d3fe1d84bccb (diff) |
drm/xe: correct the calculation of remaining size
In function write_pgtable, the calculation of chunk in the do-while
loop is wrong, we should always compare against remaining size instead
of the total size update->qwords.
Signed-off-by: Fei Yang <fei.yang@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240116223709.652585-2-fei.yang@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/xe/xe_migrate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c index 44725f978f3e..d5392cbbdb49 100644 --- a/drivers/gpu/drm/xe/xe_migrate.c +++ b/drivers/gpu/drm/xe/xe_migrate.c @@ -1116,7 +1116,7 @@ static void write_pgtable(struct xe_tile *tile, struct xe_bb *bb, u64 ppgtt_ofs, do { u64 addr = ppgtt_ofs + ofs * 8; - chunk = min(update->qwords, MAX_PTE_PER_SDI); + chunk = min(size, MAX_PTE_PER_SDI); /* Ensure populatefn can do memset64 by aligning bb->cs */ if (!(bb->len & 1)) |