[PATCH 2/2] HAX: drm/i915: Calculate underlying page sizes rather than dma segment sizes.
Thomas Hellström
thomas.hellstrom at linux.intel.com
Thu Jun 10 14:10:42 UTC 2021
hugepages selftest breaks so let's see if this fixes it.
Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
drivers/gpu/drm/i915/i915_scatterlist.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_scatterlist.h b/drivers/gpu/drm/i915/i915_scatterlist.h
index 5acca45ea981..5daf3dbf7d44 100644
--- a/drivers/gpu/drm/i915/i915_scatterlist.h
+++ b/drivers/gpu/drm/i915/i915_scatterlist.h
@@ -116,10 +116,10 @@ static inline unsigned int i915_sg_dma_sizes(struct scatterlist *sg)
unsigned int page_sizes;
page_sizes = 0;
- while (sg && sg_dma_len(sg)) {
+ while (sg && sg->length) {
GEM_BUG_ON(sg->offset);
- GEM_BUG_ON(!IS_ALIGNED(sg_dma_len(sg), PAGE_SIZE));
- page_sizes |= sg_dma_len(sg);
+ GEM_BUG_ON(!IS_ALIGNED(sg->length, PAGE_SIZE));
+ page_sizes |= sg->length;
sg = __sg_next(sg);
}
--
2.31.1
More information about the Intel-gfx-trybot
mailing list