diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-09-29 08:02:48 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:42:46 +0300 |
commit | 285230832eb794dfd1c9dc63d80367a714dbf75f (patch) | |
tree | 0bb33dd3c19232f70fe4ef138523ab5561c9310a /drivers/gpu/drm/xe/xe_vm.c | |
parent | f8ebadd0df248d7f0b5060fd8a0d956e773d9d78 (diff) | |
download | linux-285230832eb794dfd1c9dc63d80367a714dbf75f.tar.xz |
drm/xe/vm: Prefer xe_assert() over XE_WARN_ON()
When xelp_pte_encode_addr() was added in commit 23c8495efeed
("drm/xe/migrate: Do not hand-encode pte"), there was no xe pointer for
using xe_assert(). This is not the case anymore, so prefer it over
XE_WARN_ON().
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index b61ed51b503d..10ed72228946 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -17,6 +17,7 @@ #include <linux/mm.h> #include <linux/swap.h> +#include "xe_assert.h" #include "xe_bo.h" #include "xe_device.h" #include "xe_drm_client.h" @@ -1312,7 +1313,7 @@ static u64 xelp_pte_encode_addr(struct xe_device *xe, u64 addr, u64 pte; /* Avoid passing random bits directly as flags */ - XE_WARN_ON(flags & ~XE_PTE_PS64); + xe_assert(xe, !(flags & ~XE_PTE_PS64)); pte = addr; pte |= XE_PAGE_PRESENT | XE_PAGE_RW; |