drm/xe: Introduce xe_engine_is_idle()
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 10 Mar 2023 11:03:47 +0000 (12:03 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:30:13 +0000 (18:30 -0500)
commit155c9165542863c97b5284afa37e3d8e385a8815
tree4036dd40cff666f9f440d6a4bc47e7a64b8f5857
parent17a28ea23c4087cf4580744a70105ccc83efc769
drm/xe: Introduce xe_engine_is_idle()

Introduce xe_engine_is_idle, and replace the static function in
xe_migrate.c.
The latter had two flaws. First the seqno == 1 test might return a false
true value each time the seqno counter wrapped, Second, the
cur_seqno == next_seqno test would never return true.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_engine.c
drivers/gpu/drm/xe/xe_engine.h
drivers/gpu/drm/xe/xe_migrate.c