Skip to content

Commit

Permalink
drm/xe: Only zap PTEs as needed
Browse files Browse the repository at this point in the history
If PTEs are already invalidated no need to invalidate again.

Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Himal Prasad Ghimiray <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
mbrost05 committed May 15, 2024
1 parent b31cfb4 commit c8ff26b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/xe/xe_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,9 @@ bool xe_pt_zap_ptes(struct xe_tile *tile, struct xe_vma *vma)
.tile = tile,
};
struct xe_pt *pt = xe_vma_vm(vma)->pt_root[tile->id];
u8 pt_mask = (vma->tile_present & ~vma->tile_invalidated);

if (!(vma->tile_present & BIT(tile->id)))
if (!(pt_mask & BIT(tile->id)))
return false;

(void)xe_pt_walk_shared(&pt->base, pt->level, xe_vma_start(vma),
Expand Down

0 comments on commit c8ff26b

Please sign in to comment.