mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-05 11:53:41 +00:00
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
This commit is contained in:
parent
eb08104f90
commit
43d48379c9
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user