summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorYury Norov <ynorov@nvidia.com>2026-03-01 20:11:58 -0500
committerYury Norov <ynorov@nvidia.com>2026-04-09 13:28:05 -0400
commitac679a6e0fccab0e30ea04c97a3a0713b8b722ae (patch)
tree920c8801154a23c350e2518e6d6245acdf72508a /drivers/gpu
parent82e68aa4a6b16aa060d5044116dac957631cf6f0 (diff)
downloadlwn-ac679a6e0fccab0e30ea04c97a3a0713b8b722ae.tar.gz
lwn-ac679a6e0fccab0e30ea04c97a3a0713b8b722ae.zip
drm/xe: switch xe_pagefault_queue_init() to using bitmap_weighted_or()
The function calls bitmap_or() immediately followed by bitmap_weight(). Switch to using the dedicated bitmap_weighted_or() and save one bitmap traverse. Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Yury Norov <ynorov@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/xe/xe_pagefault.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
index 6bee53d6ffc3..c4ce3cfe2164 100644
--- a/drivers/gpu/drm/xe/xe_pagefault.c
+++ b/drivers/gpu/drm/xe/xe_pagefault.c
@@ -285,10 +285,9 @@ static int xe_pagefault_queue_init(struct xe_device *xe,
xe_dss_mask_t all_dss;
int num_dss, num_eus;
- bitmap_or(all_dss, gt->fuse_topo.g_dss_mask,
+ num_dss = bitmap_weighted_or(all_dss, gt->fuse_topo.g_dss_mask,
gt->fuse_topo.c_dss_mask, XE_MAX_DSS_FUSE_BITS);
- num_dss = bitmap_weight(all_dss, XE_MAX_DSS_FUSE_BITS);
num_eus = bitmap_weight(gt->fuse_topo.eu_mask_per_dss,
XE_MAX_EU_FUSE_BITS) * num_dss;