Skip to content

Commit e3e2e7f

Browse files
Thomas Hellströmrodrigovivi
authored andcommitted
drm/xe/hmm: Style- and include fixes
Add proper #ifndef around the xe_hmm.h header, proper spacing and since the documentation mostly follows kerneldoc format, make it kerneldoc. Also prepare for upcoming -stable fixes. Fixes: 81e058a ("drm/xe: Introduce helper to populate userptr") Cc: Oak Zeng <oak.zeng@intel.com> Cc: <stable@vger.kernel.org> # v6.10+ Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Acked-by: Matthew Brost <Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250304173342.22009-2-thomas.hellstrom@linux.intel.com (cherry picked from commit bbe2b06) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent ae482ec commit e3e2e7f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

drivers/gpu/drm/xe/xe_hmm.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ static u64 xe_npages_in_range(unsigned long start, unsigned long end)
1919
return (end - start) >> PAGE_SHIFT;
2020
}
2121

22-
/*
22+
/**
2323
* xe_mark_range_accessed() - mark a range is accessed, so core mm
2424
* have such information for memory eviction or write back to
2525
* hard disk
26-
*
2726
* @range: the range to mark
2827
* @write: if write to this range, we mark pages in this range
2928
* as dirty
@@ -43,11 +42,10 @@ static void xe_mark_range_accessed(struct hmm_range *range, bool write)
4342
}
4443
}
4544

46-
/*
45+
/**
4746
* xe_build_sg() - build a scatter gather table for all the physical pages/pfn
4847
* in a hmm_range. dma-map pages if necessary. dma-address is save in sg table
4948
* and will be used to program GPU page table later.
50-
*
5149
* @xe: the xe device who will access the dma-address in sg table
5250
* @range: the hmm range that we build the sg table from. range->hmm_pfns[]
5351
* has the pfn numbers of pages that back up this hmm address range.
@@ -112,9 +110,8 @@ static int xe_build_sg(struct xe_device *xe, struct hmm_range *range,
112110
return ret;
113111
}
114112

115-
/*
113+
/**
116114
* xe_hmm_userptr_free_sg() - Free the scatter gather table of userptr
117-
*
118115
* @uvma: the userptr vma which hold the scatter gather table
119116
*
120117
* With function xe_userptr_populate_range, we allocate storage of

drivers/gpu/drm/xe/xe_hmm.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
* Copyright © 2024 Intel Corporation
44
*/
55

6+
#ifndef _XE_HMM_H_
7+
#define _XE_HMM_H_
8+
69
#include <linux/types.h>
710

811
struct xe_userptr_vma;
912

1013
int xe_hmm_userptr_populate_range(struct xe_userptr_vma *uvma, bool is_mm_mmap_locked);
14+
1115
void xe_hmm_userptr_free_sg(struct xe_userptr_vma *uvma);
16+
#endif

0 commit comments

Comments
 (0)