drm/xe: check pcode init status only on root gt of root tile
authorRiana Tauro <riana.tauro@intel.com>
Wed, 10 Apr 2024 08:50:04 +0000 (14:20 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 10 Apr 2024 16:32:15 +0000 (12:32 -0400)
commit933fd5ffaf87a60a019992d48e3a96b5c3403d9f
tree01db7dacf845a0b9b75a2ee22eb7abd080051ae7
parent3df49b2e71ba28bfb468df9752f23c270bf1f273
drm/xe: check pcode init status only on root gt of root tile

The root tile indicates the pcode initialization is complete
when all tiles have completed their initialization.
So the mailbox can be polled only on the root tile.
Check pcode init status only on root tile and move it to
device probe early as root tile is initialized there.
Also make similar changes in resume paths.

v2: add lock/unlocked version of pcode_mailbox_rw
    to allow pcode init to be called in device
    early probe (Rodrigo)

v3: add code description about using root tile
    change function names to xe_pcode_probe_early
    and xe_pcode_init (Rodrigo)

Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240410085005.1126343-2-riana.tauro@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_pcode.c
drivers/gpu/drm/xe/xe_pcode.h
drivers/gpu/drm/xe/xe_pm.c