]> www.infradead.org Git - users/hch/misc.git/commit
drm/xe/guc: Allow CTB G2H processing without G2H IRQ
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 6 Jun 2024 13:06:39 +0000 (15:06 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 7 Jun 2024 10:24:30 +0000 (12:24 +0200)
commit09b286950f2911615694f4a1ff491efe9ed5eeba
tree58ee1cc66c1cf2669effb383a5407f8422226867
parent37e017311c650ba0502aec6ec531ed9bc84d70da
drm/xe/guc: Allow CTB G2H processing without G2H IRQ

During early initialization, in the xe_guc_min_load_for_hwconfig()
function, we are successfully enabling CTB communication, but it
will only allow us to send non-blocking H2G messages, as due to
not yet enabled IRQs, including G2H IRQs, we will not notice any
new G2H message sent by the GuC, including replies to our blocking
H2G request messages. And those successful replies are mandatory
for the VF drivers to continue normal operations.

As attempt to workaround this driver initialization ordering issue,
introduce special safe-mode CTB worker, that will periodically
trigger G2H processing, like original IRQ handler, in case no
MSI/MSIX IRQs were enabled on the driver yet. Once we detect that
IRQ were enabled, we will stop this worker.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240606130639.1504-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_guc_ct.c
drivers/gpu/drm/xe/xe_guc_ct_types.h