summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pcode.h
diff options
context:
space:
mode:
authorRiana Tauro <riana.tauro@intel.com>2024-04-10 14:20:04 +0530
committerRodrigo Vivi <rodrigo.vivi@intel.com>2024-04-10 12:32:15 -0400
commit933fd5ffaf87a60a019992d48e3a96b5c3403d9f (patch)
tree01db7dacf845a0b9b75a2ee22eb7abd080051ae7 /drivers/gpu/drm/xe/xe_pcode.h
parent3df49b2e71ba28bfb468df9752f23c270bf1f273 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pcode.h')
-rw-r--r--drivers/gpu/drm/xe/xe_pcode.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_pcode.h b/drivers/gpu/drm/xe/xe_pcode.h
index 08cb1d047cba..3f54c6d2a57d 100644
--- a/drivers/gpu/drm/xe/xe_pcode.h
+++ b/drivers/gpu/drm/xe/xe_pcode.h
@@ -8,9 +8,11 @@
#include <linux/types.h>
struct xe_gt;
+struct xe_device;
-int xe_pcode_probe(struct xe_gt *gt);
-int xe_pcode_init(struct xe_gt *gt);
+void xe_pcode_init(struct xe_gt *gt);
+int xe_pcode_probe_early(struct xe_device *xe);
+int xe_pcode_ready(struct xe_device *xe, bool locked);
int xe_pcode_init_min_freq_table(struct xe_gt *gt, u32 min_gt_freq,
u32 max_gt_freq);
int xe_pcode_read(struct xe_gt *gt, u32 mbox, u32 *val, u32 *val1);