]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Add warn when level can not be zero.
authorNirmoy Das <nirmoy.das@intel.com>
Tue, 21 May 2024 10:36:23 +0000 (12:36 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Tue, 21 May 2024 20:09:20 +0000 (22:09 +0200)
At xe_pt_zap_ptes_entry() and xe_pt_stage_unbind_entry, the level cannot
be 0. Therefore, add an independent check for the level. Since the level
cannot be zero at this point, there is no need to check for `is_compact`,
so remove that instead.

Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240521103623.11645-1-nirmoy.das@intel.com
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
drivers/gpu/drm/xe/xe_pt.c

index 11dd0988ffda82bbee96619f9a9cd5f82d80edb3..cd60c009b6799113fa38c45102cfb0e200cc5229 100644 (file)
@@ -763,7 +763,7 @@ static int xe_pt_zap_ptes_entry(struct xe_ptw *parent, pgoff_t offset,
        pgoff_t end_offset;
 
        XE_WARN_ON(!*child);
-       XE_WARN_ON(!level && xe_child->is_compact);
+       XE_WARN_ON(!level);
 
        /*
         * Note that we're called from an entry callback, and we're dealing
@@ -1445,7 +1445,7 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset,
        struct xe_pt *xe_child = container_of(*child, typeof(*xe_child), base);
 
        XE_WARN_ON(!*child);
-       XE_WARN_ON(!level && xe_child->is_compact);
+       XE_WARN_ON(!level);
 
        xe_pt_check_kill(addr, next, level - 1, xe_child, action, walk);