Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] Incompatible pointer type in `xe_pt_stage_bind` when 
`CONFIG_DRM_XE_GPUSVM` is disabled, leading to a build failure.
--

commit ba41c31a99e11c5fd960b8101a85807f5290cd76
Author: Honglei Huang <[email protected]>

drm/gpusvm: keep a single DMA mapping inline for THP

This commit optimizes drm_gpusvm_get_pages() by inlining a single DMA
mapping entry for Transparent Huge Pages (THP), reducing memory overhead.
It updates the accessors, including xe_pt_stage_bind() paths, to safely
handle the new union containing the inline address.

> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
> index 5d990c1c3740a..96ea9735f34ce 100644
> --- a/drivers/gpu/drm/xe/xe_pt.c
> +++ b/drivers/gpu/drm/xe/xe_pt.c
> @@ -831,7 +831,7 @@ xe_pt_stage_bind(struct xe_tile *tile, struct xe_vma *vma,
>                       return -EAGAIN;
>               }
>               if (xe_svm_range_has_dma_mapping(range)) {
> -                     xe_res_first_dma(range->pages.dma_addr, 0,
> +                     
> xe_res_first_dma(drm_gpusvm_pages_first_dma(&range->pages), 0,

[Severity: Low]
Will this cause a build failure when compiling the driver with
CONFIG_DRM_XE_GPUSVM disabled?

When CONFIG_DRM_XE_GPUSVM is disabled, struct xe_svm_range uses an anonymous
struct for its pages field instead of struct drm_gpusvm_pages. Since
drm_gpusvm_pages_first_dma() expects a const struct drm_gpusvm_pages *,
passing &range->pages here appears to result in a compiler type mismatch
error.

>                                        xe_svm_range_size(range),
>                                        &curs);
>                       xe_svm_range_debug(range, "BIND PREPARE - MIXED");

[ ... ]

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=5

Reply via email to