]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/gt: add a macro for mock gt wakeref special value and use it
authorJani Nikula <jani.nikula@intel.com>
Wed, 18 Sep 2024 17:35:46 +0000 (20:35 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 30 Sep 2024 14:54:11 +0000 (17:54 +0300)
commit61dabe8234cbf1d0948f35601e055126cc1f7790
treeb324fac36fba7ee917d805320a1b62bcaba4edc2
parentc45c7b2475f7f47654377620533fa95b508a11a9
drm/i915/gt: add a macro for mock gt wakeref special value and use it

Add a dedicated macro for the special mock gt wakeref value, with a cast
to intel_wakeref_t, instead of assuming you can assign or compare the
wakeref to -ENODEV directly.

Arguably the whole thing is a hack that should not exist, but at least
make it slightly less hacky.

Side note: If this value were to ever end up in
intel_ref_tracker_free(), it would wreak havoc.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1da887a6b4fe1ec45355571ea7b56d91fadf0af2.1726680898.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gt/intel_gt_pm.h
drivers/gpu/drm/i915/gt/intel_tlb.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c