]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/device: Remove unused xe_device::usm::num_vm_in_*
authorFrancois Dugast <francois.dugast@intel.com>
Fri, 9 Aug 2024 15:51:36 +0000 (17:51 +0200)
committerMatthew Brost <matthew.brost@intel.com>
Sun, 18 Aug 2024 01:31:59 +0000 (18:31 -0700)
Those counters were used to keep track of the numbers VMs in fault mode
and in non-fault mode, to determine if the whole device was in fault mode
or not. This is no longer needed so remove those variables and their
usages.

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809155156.1955925-12-francois.dugast@intel.com
drivers/gpu/drm/xe/xe_device.h
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_vm.c

index 2c96f1b2aafd3f65128a244999470d25b4ee79de..f052c06a2d2f58bc414727e638cd29a53bd4b3f5 100644 (file)
@@ -139,16 +139,6 @@ static inline struct xe_force_wake *gt_to_fw(struct xe_gt *gt)
 
 void xe_device_assert_mem_access(struct xe_device *xe);
 
-static inline bool xe_device_in_fault_mode(struct xe_device *xe)
-{
-       return xe->usm.num_vm_in_fault_mode != 0;
-}
-
-static inline bool xe_device_in_non_fault_mode(struct xe_device *xe)
-{
-       return xe->usm.num_vm_in_non_fault_mode != 0;
-}
-
 static inline bool xe_device_has_flat_ccs(struct xe_device *xe)
 {
        return xe->info.has_flat_ccs;
index 16a24eadd94bdff9cdf2a6a5d252e46c57f6d3d8..fc89420d0ba6d916fcc405101630352500356aa1 100644 (file)
@@ -368,10 +368,6 @@ struct xe_device {
                struct xarray asid_to_vm;
                /** @usm.next_asid: next ASID, used to cyclical alloc asids */
                u32 next_asid;
-               /** @usm.num_vm_in_fault_mode: number of VM in fault mode */
-               u32 num_vm_in_fault_mode;
-               /** @usm.num_vm_in_non_fault_mode: number of VM in non-fault mode */
-               u32 num_vm_in_non_fault_mode;
                /** @usm.lock: protects UM state */
                struct mutex lock;
        } usm;
index cd542de2323469d3fe648b97782751e00c5bc832..3cff3ae576433a4d291ebf1c284d9cdbc28eafa4 100644 (file)
@@ -1501,13 +1501,6 @@ struct xe_vm *xe_vm_create(struct xe_device *xe, u32 flags)
        if (number_tiles > 1)
                vm->composite_fence_ctx = dma_fence_context_alloc(1);
 
-       mutex_lock(&xe->usm.lock);
-       if (flags & XE_VM_FLAG_FAULT_MODE)
-               xe->usm.num_vm_in_fault_mode++;
-       else if (!(flags & XE_VM_FLAG_MIGRATION))
-               xe->usm.num_vm_in_non_fault_mode++;
-       mutex_unlock(&xe->usm.lock);
-
        trace_xe_vm_create(vm);
 
        return vm;
@@ -1621,11 +1614,6 @@ void xe_vm_close_and_put(struct xe_vm *vm)
        up_write(&vm->lock);
 
        mutex_lock(&xe->usm.lock);
-       if (vm->flags & XE_VM_FLAG_FAULT_MODE)
-               xe->usm.num_vm_in_fault_mode--;
-       else if (!(vm->flags & XE_VM_FLAG_MIGRATION))
-               xe->usm.num_vm_in_non_fault_mode--;
-
        if (vm->usm.asid) {
                void *lookup;