drm/i915: Be precise in types for i915_gem_busy
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Apr 2019 10:19:14 +0000 (11:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Apr 2019 15:21:00 +0000 (16:21 +0100)
commit6960d9cfc721d9e577631b9057c07eecea8bdc0f
treeac3670b14ef6f7bffd6b4046822376c9e410b87e
parent28d618e9ab86f26a31af0b235ced55beb3e343c8
drm/i915: Be precise in types for i915_gem_busy

Mixing u8 and -1u together leads to zero-extended integer expansion, and
comparing 0x000000ff against 0xffffffff, causing us to report a mixed
uabi-class request as not busy.

The input flag is a u8, and we want to generate a u32 uABI response,
mark our functions so.

Fixes: c8b502422bfe ("drm/i915: Remove last traces of exec-id (GEM_BUSY)")
Testcase: igt/gem_exec_balance/busy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190404101914.7231-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c