drm/xe: Add memirq report page address helpers
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 25 Sep 2024 08:44:45 +0000 (10:44 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Sun, 6 Oct 2024 12:24:28 +0000 (14:24 +0200)
commit95336cfd5b2ce81f839614dd897e26cffd5204e0
treec32b118156fb5275832e550d62a1cdeb7a6377d6
parent93d93813422758f6c99289de446b19184019ef5a
drm/xe: Add memirq report page address helpers

Both xe_memirq_{source,status}_ptr functions are now strictly for
obtaining an address of the memory based interrupt report pages
used by the HW engines. When initializing the GuC that does not
require special per instance page preparation, we don't need to
abuse these public functions and pass a NULL instead of valid hwe
pointer. Also, without further fixes, this actually may lead to
NPD crash once the hw_reports_to_instance_zero() will be true.

Add internal helpers that will provide report page addresses based
solely on the instance number, which will be always 0 for both GuCs.

Fixes: ef6103d20f97 ("drm/xe: memirq infra changes for MSI-X")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Ilia Levi <ilia.levi@intel.com>
Reviewed-by: Ilia Levi <ilia.levi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240925084445.1495-1-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_memirq.c