Re-org uC debugfs files and move them under GT
Subsystems (2)
v2 cover Re-org uC debugfs files and move them under GT
Rebased on top of Andi's patch. Note that some discussion is still ongoing on that patch.
Also dropped the patch that caused a const->non-const conversion and fixed a couple of bugs:
- keep printing HUC_STATUS register
- correcly set permissions for writable debugfs files
Andi Shyti (1):
drm/i915/gt: allow setting generic data pointer
Daniele Ceraolo Spurio (5):
drm/i915/guc: drop stage_pool debugfs
drm/i915/huc: make "support huc" reflect HW capabilities drm/i915/debugfs: move uC printers and update debugfs file names drm/i915/uc: Move uC debugfs to its own folder under GT drm/i915/uc: do not free err log on uc_fini
drivers/gpu/drm/i915/Makefile | 7 +- drivers/gpu/drm/i915/gt/debugfs_engines.c | 2 +- drivers/gpu/drm/i915/gt/debugfs_gt.c | 15 +- drivers/gpu/drm/i915/gt/debugfs_gt.h | 9 +- drivers/gpu/drm/i915/gt/debugfs_gt_pm.c | 14 +- drivers/gpu/drm/i915/gt/intel_gt.c | 3 +- drivers/gpu/drm/i915/gt/uc/debugfs_guc.c | 42 +++ drivers/gpu/drm/i915/gt/uc/debugfs_guc.h | 14 + drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c | 124 ++++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h | 15 + drivers/gpu/drm/i915/gt/uc/debugfs_huc.c | 36 +++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.h | 14 + drivers/gpu/drm/i915/gt/uc/debugfs_uc.c | 31 ++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.h | 14 + drivers/gpu/drm/i915/gt/uc/intel_guc.c | 46 ++- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 7 + drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 14 - drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 97 ++++++- drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 4 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 31 +- drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 + drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 17 -- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 1 + drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 25 +- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 3 +- drivers/gpu/drm/i915/i915_debugfs.c | 289 ------------------- 29 files changed, 526 insertions(+), 361 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.h
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/6 drm/i915/gt: allow setting generic data pointer
From: Andi Shyti <[email protected]>
When registering debugfs files the intel gt debugfs library forces a 'struct *gt' private data on the caller.
To be open to different usages make the new "intel_gt_debugfs_register_files()"[*] function more generic by converting the 'struct *gt' pointer to a 'void *' type.
I take the chance to rename the functions by using "intel_gt_" as prefix instead of "debugfs_", so that "debugfs_gt_register_files()" becomes "intel_gt_debugfs_register_files()".
--- drivers/gpu/drm/i915/gt/debugfs_engines.c | 2 +- drivers/gpu/drm/i915/gt/debugfs_gt.c | 11 +++++------ drivers/gpu/drm/i915/gt/debugfs_gt.h | 9 ++++----- drivers/gpu/drm/i915/gt/debugfs_gt_pm.c | 14 +++++++++----- 4 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/gt/debugfs_engines.c +1 -1
@@ -32,5 +32,5 @@ void debugfs_engines_register(struct intel_gt *gt, struct dentry *root) { "engines", &engines_fops }, }; -debugfs_gt_register_files (gt, root, files,ARRAY_SIZE (files)); +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), gt); }
drivers/gpu/drm/i915/gt/debugfs_gt.c +5 -6
@@ -26,15 +26,14 @@ void debugfs_gt_register(struct intel_gt *gt)debugfs_gt_pm_register (gt, root); } -void debugfs_gt_register_files (struct intel_gt *gt, -struct dentry *root, -const struct debugfs_gt_file *files, -unsigned long count) +void intel_gt_debugfs_register_files (struct dentry *root, +const struct debugfs_gt_file *files, +unsigned long count,void *data) {while (count--) { -if (!files->eval || files->eval (gt)) +if (!files->eval || files->eval (data))debugfs_create_file (files->name, -0444 , root, gt, +0444 , root, data, files->fops); files++;
drivers/gpu/drm/i915/gt/debugfs_gt.h +4 -5
@@ -28,12 +28,11 @@ void debugfs_gt_register(struct intel_gt *gt);struct debugfs_gt_file {const char *name;const struct file_operations *fops; -bool (*eval)(const struct intel_gt *gt); +bool (*eval)(void *data); }; -void debugfs_gt_register_files (struct intel_gt *gt, -struct dentry *root, -const struct debugfs_gt_file *files, -unsigned long count); +void intel_gt_debugfs_register_files (struct dentry *root, +const struct debugfs_gt_file *files, +unsigned long count,void *data);#endif /* DEBUGFS_GT_H */
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c +9 -5
@@ -506,9 +506,11 @@ static int llc_show(struct seq_file *m, void *data)return 0 ; } -static bool llc_eval (const struct intel_gt *gt) +static bool llc_eval (void *data) { -return HAS_LLC (gt->i915); +struct intel_gt *gt = data; + +return gt &&HAS_LLC (gt->i915); }DEFINE_GT_DEBUGFS_ATTRIBUTE (llc);
@@ -580,9 +582,11 @@ static int rps_boost_show(struct seq_file *m, void *data)return 0 ; } -static bool rps_eval (const struct intel_gt *gt) +static bool rps_eval (void *data) { -return HAS_RPS (gt->i915); +struct intel_gt *gt = data; + +return gt &&HAS_RPS (gt->i915); }DEFINE_GT_DEBUGFS_ATTRIBUTE (rps_boost);
@@ -597,5 +601,5 @@ void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root) { "rps_boost", &rps_boost_fops, rps_eval }, }; -debugfs_gt_register_files (gt, root, files,ARRAY_SIZE (files)); +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), gt); }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/6 drm/i915/guc: drop stage_pool debugfs
In reply to Daniele Ceraolo SpurioThe pool will be private to GuC in the new submission scheme, so we won't be able to print it and we can just drop the current legacy code.
--- drivers/gpu/drm/i915/i915_debugfs.c | 53 ----------------------------- 1 file changed, 53 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +0 -53
@@ -1356,58 +1356,6 @@ static int i915_guc_info(struct seq_file *m, void *data)return 0 ; } -static int i915_guc_stage_pool (struct seq_file *m,void *data) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_uc *uc = &dev_priv->gt.uc; -struct guc_stage_desc *desc = uc->guc.stage_desc_pool_vaddr; -int index; - -if (!intel_uc_uses_guc_submission (uc)) -return -ENODEV ; - -for (index =0 ; index <GUC_MAX_STAGE_DESCRIPTORS ; index++, desc++) { -struct intel_engine_cs *engine; - -if (!(desc->attribute &GUC_STAGE_DESC_ATTR_ACTIVE )) -continue ; - -seq_printf (m,"GuC stage descriptor %u:\n" , index); -seq_printf (m,"\tIndex: %u\n" , desc->stage_id); -seq_printf (m,"\tAttribute: 0x%x\n" , desc->attribute); -seq_printf (m,"\tPriority: %d\n" , desc->priority); -seq_printf (m,"\tDoorbell id: %d\n" , desc->db_id); -seq_printf (m,"\tEngines used: 0x%x\n" , - desc->engines_used); -seq_printf (m,"\tDoorbell trigger phy: 0x%llx, cpu: 0x%llx, uK: 0x%x\n" , - desc->db_trigger_phy, - desc->db_trigger_cpu, - desc->db_trigger_uk); -seq_printf (m,"\tProcess descriptor: 0x%x\n" , - desc->process_desc); -seq_printf (m,"\tWorkqueue address: 0x%x, size: 0x%x\n" , - desc->wq_addr, desc->wq_size); -seq_putc (m,'\n' ); - -for_each_uabi_engine (engine, dev_priv) { -u32 guc_engine_id = engine->guc_id; -struct guc_execlist_context *lrc = - &desc->lrc[guc_engine_id]; - -seq_printf (m,"\t%s LRC:\n" , engine->name); -seq_printf (m,"\t\tContext desc: 0x%x\n" , - lrc->context_desc); -seq_printf (m,"\t\tContext id: 0x%x\n" , lrc->context_id); -seq_printf (m,"\t\tLRCA: 0x%x\n" , lrc->ring_lrca); -seq_printf (m,"\t\tRing begin: 0x%x\n" , lrc->ring_begin); -seq_printf (m,"\t\tRing end: 0x%x\n" , lrc->ring_end); -seq_putc (m,'\n' ); - } - } - -return 0 ; -} -static int i915_guc_log_dump (struct seq_file *m,void *data) {struct drm_info_node *node = m->private;
@@ -2143,7 +2091,6 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_guc_load_status", i915_guc_load_status_info, 0}, {"i915_guc_log_dump", i915_guc_log_dump, 0}, {"i915_guc_load_err_log_dump", i915_guc_log_dump, 0, (void *)1}, - {"i915_guc_stage_pool", i915_guc_stage_pool, 0}, {"i915_huc_load_status", i915_huc_load_status_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0},
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/guc: drop stage_pool debugfs
Hi Daniele,
Quoted 7 lines · Daniele Ceraolo Spurio
The pool will be private to GuC in the new submission scheme, so we won't be able to print it and we can just drop the current legacy code.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 3/6 drm/i915/huc: make "support huc" reflect HW capabilities
In reply to Daniele Ceraolo SpurioWe currently initialize HuC support based on GuC being enabled in modparam; this means that huc_is_supported() can return false on HW that does have a HuC when enable_guc=0. The rationale for this behavior is that HuC requires GuC for authentication and therefore is not supported by itself. However, we do not allow defining HuC fw wthout GuC fw and selecting HuC in modparam implicitly selects GuC as well, so we can't actually hit a scenario where HuC is selected alone. Therefore, we can flip the support check to reflect the HW capabilities and fw availability, which is more intuitive and will make it cleaner to log HuC the difference between not supported in HW and not selected.
Removing the difference between GuC and HuC also allows us to simplify the init_early, since we don't need to differentiate the support based on the type of uC.
--- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 14 ------------- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 17 --------------- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 25 +++++++++++++++-------- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 3 +-- 8 files changed, 20 insertions(+), 45 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +1 -1
@@ -169,7 +169,7 @@ void intel_guc_init_early(struct intel_guc *guc) {struct drm_i915_private *i915 =guc_to_gt (guc)->i915; -intel_guc_fw_init_early (guc); +intel_uc_fw_init_early (&guc->fw,INTEL_UC_FW_TYPE_GUC );intel_guc_ct_init_early (&guc->ct);intel_guc_log_init_early (&guc->log);intel_guc_submission_init_early (guc);
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c +0 -14
@@ -13,20 +13,6 @@#include "intel_guc_fw.h" #include "i915_drv.h" -/** -* intel_guc_fw_init_early() - initializes GuC firmware struct -* @guc: intel_guc struct -* -* On platforms with GuC selects firmware for uploading -*/ -void intel_guc_fw_init_early (struct intel_guc *guc) -{ -struct drm_i915_private *i915 =guc_to_gt (guc)->i915; - -intel_uc_fw_init_early (&guc->fw,INTEL_UC_FW_TYPE_GUC ,HAS_GT_UC (i915), -INTEL_INFO (i915)->platform,INTEL_REVID (i915)); -} -static void guc_prepare_xfer (struct intel_uncore *uncore) { u32 shim_flags = GUC_DISABLE_SRAM_INIT_TO_ZEROES |
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h +0 -1
@@ -8,7 +8,6 @@struct intel_guc ; -void intel_guc_fw_init_early (struct intel_guc *guc);int intel_guc_fw_upload (struct intel_guc *guc);#endif
drivers/gpu/drm/i915/gt/uc/intel_huc.c +1 -1
@@ -41,7 +41,7 @@ void intel_huc_init_early(struct intel_huc *huc) {struct drm_i915_private *i915 =huc_to_gt (huc)->i915; -intel_huc_fw_init_early (huc); +intel_uc_fw_init_early (&huc->fw,INTEL_UC_FW_TYPE_HUC );if (INTEL_GEN (i915) >=11 ) { huc->status.reg =GEN11_HUC_KERNEL_LOAD_INFO ;
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0 -17
@@ -7,23 +7,6 @@#include "intel_huc_fw.h" #include "i915_drv.h" -/** -* intel_huc_fw_init_early() - initializes HuC firmware struct -* @huc: intel_huc struct -* -* On platforms with HuC selects firmware for uploading -*/ -void intel_huc_fw_init_early (struct intel_huc *huc) -{ -struct intel_gt *gt =huc_to_gt (huc); -struct intel_uc *uc = >->uc; -struct drm_i915_private *i915 = gt->i915; - -intel_uc_fw_init_early (&huc->fw,INTEL_UC_FW_TYPE_HUC , -intel_uc_wants_guc (uc), -INTEL_INFO (i915)->platform,INTEL_REVID (i915)); -} -/** * intel_huc_fw_upload() - load HuC uCode to device * @huc: intel_huc structure
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h +0 -1
@@ -8,7 +8,6 @@struct intel_huc ; -void intel_huc_fw_init_early (struct intel_huc *huc);int intel_huc_fw_upload (struct intel_huc *huc);#endif
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +17 -8
@@ -11,16 +11,22 @@#include "intel_uc_fw_abi.h" #include "i915_drv.h" -static inline struct intel_gt *__uc_fw_to_gt (struct intel_uc_fw *uc_fw) +static inline struct intel_gt * +____uc_fw_to_gt (struct intel_uc_fw *uc_fw,enum intel_uc_fw_type type) { -GEM_BUG_ON (uc_fw->status ==INTEL_UC_FIRMWARE_UNINITIALIZED ); -if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) +if (type ==INTEL_UC_FW_TYPE_GUC ) return container_of(uc_fw, struct intel_gt, uc.guc.fw); -GEM_BUG_ON (uc_fw->type !=INTEL_UC_FW_TYPE_HUC ); +GEM_BUG_ON (type !=INTEL_UC_FW_TYPE_HUC ); return container_of(uc_fw, struct intel_gt, uc.huc.fw); } +static inline struct intel_gt *__uc_fw_to_gt (struct intel_uc_fw *uc_fw) +{ +GEM_BUG_ON (uc_fw->status ==INTEL_UC_FIRMWARE_UNINITIALIZED ); +return ____uc_fw_to_gt (uc_fw, uc_fw->type); +} +#ifdef CONFIG_DRM_I915_DEBUG_GUC void intel_uc_fw_change_status (struct intel_uc_fw *uc_fw,enum intel_uc_fw_status status)
@@ -195,9 +201,10 @@ static void __uc_fw_user_override(struct intel_uc_fw *uc_fw)* firmware to fetch and load. */ void intel_uc_fw_init_early (struct intel_uc_fw *uc_fw, -enum intel_uc_fw_type type,bool supported, -enum intel_platform platform,u8 rev) +enum intel_uc_fw_type type) { +struct drm_i915_private *i915 =____uc_fw_to_gt (uc_fw, type)->i915; +/* * we use FIRMWARE_UNINITIALIZED to detect checks against uc_fw->status * before we're looked at the HW caps to see if we have uc support
@@ -208,8 +215,10 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw, uc_fw->type = type; -if (supported) { -__uc_fw_auto_select (uc_fw, platform, rev); +if (HAS_GT_UC (i915)) { +__uc_fw_auto_select (uc_fw, +INTEL_INFO (i915)->platform, +INTEL_REVID (i915));__uc_fw_user_override (uc_fw); }
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1 -2
@@ -239,8 +239,7 @@ static inline u32 intel_uc_fw_get_upload_size(struct intel_uc_fw *uc_fw) }void intel_uc_fw_init_early (struct intel_uc_fw *uc_fw, -enum intel_uc_fw_type type,bool supported, -enum intel_platform platform,u8 rev); +enum intel_uc_fw_type type);int intel_uc_fw_fetch (struct intel_uc_fw *uc_fw);void intel_uc_fw_cleanup_fetch (struct intel_uc_fw *uc_fw);int intel_uc_fw_upload (struct intel_uc_fw *uc_fw,u32 offset,u32 dma_flags);
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 3/6] drm/i915/huc: make "support huc" reflect HW capabilities
Hi Daniele,
Quoted 11 lines · Daniele Ceraolo Spurio
We currently initialize HuC support based on GuC being enabled in modparam; this means that
huc_is_supported()can return false on HW that does have a HuC when enable_guc=0. The rationale for this behavior is that HuC requires GuC for authentication and therefore is not supported by itself. However, we do not allow defining HuC fw wthout GuC fw and selecting HuC in modparam implicitly selects GuC as well, so we can't actually hit a scenario where HuC is selected alone. Therefore, we can flip the support check to reflect the HW capabilities and fw availability, which is more intuitive and will make it cleaner to log HuC the difference between not supported in HW and not selected.
Quoted 8 lines
Removing the difference between GuC and HuC also allows us to simplify the
init_early, since we don't need to differentiate the support based on the type of uC.Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>
Looks good to me,
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 3/6] drm/i915/huc: make "support huc" reflect HW capabilities
In reply to Daniele Ceraolo SpurioQuoted 11 lines · Daniele Ceraolo Spurio
We currently initialize HuC support based on GuC being enabled in modparam; this means that
huc_is_supported()can return false on HW that does have a HuC when enable_guc=0. The rationale for this behavior is that HuC requires GuC for authentication and therefore is not supported by itself. However, we do not allow defining HuC fw wthout GuC fw and selecting HuC in modparam implicitly selects GuC as well, so we can't actually hit a scenario where HuC is selected alone. Therefore, we can flip the support check to reflect the HW capabilities and fw availability, which is more intuitive and will make it cleaner to log HuC the difference between not supported in HW and not selected.
Quoted 8 lines
Removing the difference between GuC and HuC also allows us to simplify the
init_early, since we don't need to differentiate the support based on the type of uC.Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>
Looks plausible to me.
Quoted 176 lines
--- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 14 ------------- drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 17 --------------- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h | 1 - drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 25 +++++++++++++++-------- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 3 +-- 8 files changed, 20 insertions(+), 45 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc.c +1
-1@@ -169,7 +169,7 @@ void intel_guc_init_early(struct intel_guc *guc) {struct drm_i915_private *i915 =guc_to_gt (guc)->i915; -intel_guc_fw_init_early (guc); +intel_uc_fw_init_early (&guc->fw,INTEL_UC_FW_TYPE_GUC );intel_guc_ct_init_early (&guc->ct);intel_guc_log_init_early (&guc->log);intel_guc_submission_init_early (guc);drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c +0
-14@@ -13,20 +13,6 @@#include "intel_guc_fw.h" #include "i915_drv.h" -/** -* intel_guc_fw_init_early() - initializes GuC firmware struct -* @guc: intel_guc struct -* -* On platforms with GuC selects firmware for uploading -*/ -void intel_guc_fw_init_early (struct intel_guc *guc) -{ -struct drm_i915_private *i915 =guc_to_gt (guc)->i915; - -intel_uc_fw_init_early (&guc->fw,INTEL_UC_FW_TYPE_GUC ,HAS_GT_UC (i915), -INTEL_INFO (i915)->platform,INTEL_REVID (i915)); -} -static void guc_prepare_xfer (struct intel_uncore *uncore) { u32 shim_flags = GUC_DISABLE_SRAM_INIT_TO_ZEROES |drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h +0
-1@@ -8,7 +8,6 @@struct intel_guc ; -void intel_guc_fw_init_early (struct intel_guc *guc);int intel_guc_fw_upload (struct intel_guc *guc);#endif drivers/gpu/drm/i915/gt/uc/intel_huc.c +1
-1@@ -41,7 +41,7 @@ void intel_huc_init_early(struct intel_huc *huc) {struct drm_i915_private *i915 =huc_to_gt (huc)->i915; -intel_huc_fw_init_early (huc); +intel_uc_fw_init_early (&huc->fw,INTEL_UC_FW_TYPE_HUC );if (INTEL_GEN (i915) >=11 ) { huc->status.reg =GEN11_HUC_KERNEL_LOAD_INFO ;drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-17@@ -7,23 +7,6 @@#include "intel_huc_fw.h" #include "i915_drv.h" -/** -* intel_huc_fw_init_early() - initializes HuC firmware struct -* @huc: intel_huc struct -* -* On platforms with HuC selects firmware for uploading -*/ -void intel_huc_fw_init_early (struct intel_huc *huc) -{ -struct intel_gt *gt =huc_to_gt (huc); -struct intel_uc *uc = >->uc; -struct drm_i915_private *i915 = gt->i915; - -intel_uc_fw_init_early (&huc->fw,INTEL_UC_FW_TYPE_HUC , -intel_uc_wants_guc (uc), -INTEL_INFO (i915)->platform,INTEL_REVID (i915)); -} -/** * intel_huc_fw_upload() - load HuC uCode to device * @huc: intel_huc structure drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h +0
-1@@ -8,7 +8,6 @@struct intel_huc ; -void intel_huc_fw_init_early (struct intel_huc *huc);int intel_huc_fw_upload (struct intel_huc *huc);#endif drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +17
-8@@ -11,16 +11,22 @@#include "intel_uc_fw_abi.h" #include "i915_drv.h" -static inline struct intel_gt *__uc_fw_to_gt (struct intel_uc_fw *uc_fw) +static inline struct intel_gt * +____uc_fw_to_gt (struct intel_uc_fw *uc_fw,enum intel_uc_fw_type type) { -GEM_BUG_ON (uc_fw->status ==INTEL_UC_FIRMWARE_UNINITIALIZED ); -if (uc_fw->type ==INTEL_UC_FW_TYPE_GUC ) +if (type ==INTEL_UC_FW_TYPE_GUC ) return container_of(uc_fw, struct intel_gt, uc.guc.fw); -GEM_BUG_ON (uc_fw->type !=INTEL_UC_FW_TYPE_HUC ); +GEM_BUG_ON (type !=INTEL_UC_FW_TYPE_HUC ); return container_of(uc_fw, struct intel_gt, uc.huc.fw); } +static inline struct intel_gt *__uc_fw_to_gt (struct intel_uc_fw *uc_fw) +{ +GEM_BUG_ON (uc_fw->status ==INTEL_UC_FIRMWARE_UNINITIALIZED ); +return ____uc_fw_to_gt (uc_fw, uc_fw->type); +} +#ifdef CONFIG_DRM_I915_DEBUG_GUC void intel_uc_fw_change_status (struct intel_uc_fw *uc_fw,enum intel_uc_fw_status status)@@ -195,9 +201,10 @@ static void __uc_fw_user_override(struct intel_uc_fw *uc_fw)* firmware to fetch and load. */ void intel_uc_fw_init_early (struct intel_uc_fw *uc_fw, -enum intel_uc_fw_type type,bool supported, -enum intel_platform platform,u8 rev) +enum intel_uc_fw_type type) { +struct drm_i915_private *i915 =____uc_fw_to_gt (uc_fw, type)->i915; +/* * we use FIRMWARE_UNINITIALIZED to detect checks against uc_fw->status * before we're looked at the HW caps to see if we have uc support @@ -208,8 +215,10 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw, uc_fw->type = type; -if (supported) { -__uc_fw_auto_select (uc_fw, platform, rev); +if (HAS_GT_UC (i915)) { +__uc_fw_auto_select (uc_fw, +INTEL_INFO (i915)->platform, +INTEL_REVID (i915));__uc_fw_user_override (uc_fw); }drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +0
-0
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h static inline u32 intel_uc_fw_get_upload_size(struct intel_uc_fw *uc_fw) · line 245
Quoted 9 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h +1
-2@@ -239,8 +239,7 @@ static inline u32 intel_uc_fw_get_upload_size(struct intel_uc_fw *uc_fw) }void intel_uc_fw_init_early (struct intel_uc_fw *uc_fw, -enum intel_uc_fw_type type,bool supported, -enum intel_platform platform,u8 rev); +enum intel_uc_fw_type type);int intel_uc_fw_fetch (struct intel_uc_fw *uc_fw);void intel_uc_fw_cleanup_fetch (struct intel_uc_fw *uc_fw);int intel_uc_fw_upload (struct intel_uc_fw *uc_fw,u32 offset,u32 dma_flags);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 4/6 drm/i915/debugfs: move uC printers and update debugfs file names
In reply to Daniele Ceraolo SpurioMove the printers to the respective files for clarity. The guc_load_status debugfs has been squashed in the guc_info one, has having separate ones wasn't very useful. The HuC debugfs has been renamed huc_info to match.
v2: keep printing HUC_STATUS2 (Tony), avoid const->non-const
container_of (Jani)
--- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 44 +++++++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 + drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 92 +++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 4 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 29 +++++ drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 + drivers/gpu/drm/i915/i915_debugfs.c | 131 +++------------------ 7 files changed, 189 insertions(+), 115 deletions(-)
drivers/gpu/drm/i915/gt/uc/intel_guc.c +44 -0
@@ -723,3 +723,47 @@ int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size,return 0 ; } + +/** +* intel_guc_load_status - dump information about GuC load status +* @guc: the GuC +* @p: the &drm_printer +* +* Pretty printer for GuC load status. +*/ +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p) +{ +struct intel_gt *gt =guc_to_gt (guc); +struct intel_uncore *uncore = gt->uncore; +intel_wakeref_t wakeref; + +if (!intel_guc_is_supported (guc)) { +drm_printf (p,"GuC not supported\n" ); +return ; + } + +if (!intel_guc_is_wanted (guc)) { +drm_printf (p,"GuC disabled\n" ); +return ; + } + +intel_uc_fw_dump (&guc->fw, p); + + with_intel_runtime_pm(uncore->rpm, wakeref) { +u32 status =intel_uncore_read (uncore,GUC_STATUS ); +u32 i; + +drm_printf (p,"\nGuC status 0x%08x:\n" , status); +drm_printf (p,"\tBootrom status = 0x%x\n" , + (status &GS_BOOTROM_MASK ) >>GS_BOOTROM_SHIFT ); +drm_printf (p,"\tuKernel status = 0x%x\n" , + (status &GS_UKERNEL_MASK ) >>GS_UKERNEL_SHIFT ); +drm_printf (p,"\tMIA Core status = 0x%x\n" , + (status &GS_MIA_MASK ) >>GS_MIA_SHIFT ); +drm_puts (p,"\nScratch registers:\n" ); +for (i =0 ; i <16 ; i++) { +drm_printf (p,"\t%2d: \t0x%x\n" , + i,intel_uncore_read (uncore,SOFT_SCRATCH (i))); + } + } +}
drivers/gpu/drm/i915/gt/uc/intel_guc.h +2 -0
@@ -190,4 +190,6 @@ static inline void intel_guc_disable_msg(struct intel_guc *guc, u32 mask)int intel_guc_reset_engine (struct intel_guc *guc,struct intel_engine_cs *engine); +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p); +#endif
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +92 -0
95 lines not on this page · raw message
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h +4 -0
@@ -79,4 +79,8 @@ static inline u32 intel_guc_log_get_level(struct intel_guc_log *log) return log->level; } +void intel_guc_log_info (struct intel_guc_log *log,struct drm_printer *p); +int intel_guc_log_dump (struct intel_guc_log *log,struct drm_printer *p, +bool dump_load_err); +#endif
drivers/gpu/drm/i915/gt/uc/intel_huc.c +29 -0
@@ -218,3 +218,32 @@ int intel_huc_check_status(struct intel_huc *huc)return (status & huc->status.mask) == huc->status.value; } + +/** +* intel_huc_load_status - dump information about HuC load status +* @huc: the HuC +* @p: the &drm_printer +* +* Pretty printer for HuC load status. +*/ +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p) +{ +struct intel_gt *gt =huc_to_gt (huc); +intel_wakeref_t wakeref; + +if (!intel_huc_is_supported (huc)) { +drm_printf (p,"HuC not supported\n" ); +return ; + } + +if (!intel_huc_is_wanted (huc)) { +drm_printf (p,"HuC disabled\n" ); +return ; + } + +intel_uc_fw_dump (&huc->fw, p); + + with_intel_runtime_pm(gt->uncore->rpm, wakeref) +drm_printf (p,"\nHuC status 0x%08x:\n" , +intel_uncore_read (gt->uncore,HUC_STATUS2 )); +}
drivers/gpu/drm/i915/gt/uc/intel_huc.h +2 -0
@@ -57,4 +57,6 @@ static inline bool intel_huc_is_authenticated(struct intel_huc *huc) return intel_uc_fw_is_running(&huc->fw); } +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p); +#endif
drivers/gpu/drm/i915/i915_debugfs.c +16 -115
170 lines not on this page · raw message
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names
Quoted 277 lines · Daniele Ceraolo Spurio
Move the printers to the respective files for clarity. The
guc_load_statusdebugfs has been squashed in theguc_infoone, has having separate ones wasn't very useful. The HuC debugfs has been renamedhuc_infoto match.v2: keep printing
HUC_STATUS2(Tony), avoid const->non-const
container_of(Jani)Suggested-by Michal Wajdeczko <[email protected]>Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Cc Tony Ye <[email protected]>Cc Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 44 +++++++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 + drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 92 +++++++++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 4 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 29 +++++ drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 + drivers/gpu/drm/i915/i915_debugfs.c | 131 +++------------------ 7 files changed, 189 insertions(+), 115 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc.c +44
-0@@ -723,3 +723,47 @@ int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size,return 0 ; } + +/** +* intel_guc_load_status - dump information about GuC load status +* @guc: the GuC +* @p: the &drm_printer +* +* Pretty printer for GuC load status. +*/ +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p) +{ +struct intel_gt *gt =guc_to_gt (guc); +struct intel_uncore *uncore = gt->uncore; +intel_wakeref_t wakeref; + +if (!intel_guc_is_supported (guc)) { +drm_printf (p,"GuC not supported\n" ); +return ; + } + +if (!intel_guc_is_wanted (guc)) { +drm_printf (p,"GuC disabled\n" ); +return ; + } + +intel_uc_fw_dump (&guc->fw, p); + + with_intel_runtime_pm(uncore->rpm, wakeref) { +u32 status =intel_uncore_read (uncore,GUC_STATUS ); +u32 i; + +drm_printf (p,"\nGuC status 0x%08x:\n" , status); +drm_printf (p,"\tBootrom status = 0x%x\n" , + (status &GS_BOOTROM_MASK ) >>GS_BOOTROM_SHIFT ); +drm_printf (p,"\tuKernel status = 0x%x\n" , + (status &GS_UKERNEL_MASK ) >>GS_UKERNEL_SHIFT ); +drm_printf (p,"\tMIA Core status = 0x%x\n" , + (status &GS_MIA_MASK ) >>GS_MIA_SHIFT ); +drm_puts (p,"\nScratch registers:\n" ); +for (i =0 ; i <16 ; i++) { +drm_printf (p,"\t%2d: \t0x%x\n" , + i,intel_uncore_read (uncore,SOFT_SCRATCH (i))); + } + } +}drivers/gpu/drm/i915/gt/uc/intel_guc.h +2
-0@@ -190,4 +190,6 @@ static inline void intel_guc_disable_msg(struct intel_guc *guc, u32 mask)int intel_guc_reset_engine (struct intel_guc *guc,struct intel_engine_cs *engine); +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p); +#endif drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +92
-0@@ -672,3 +672,95 @@ void intel_guc_log_handle_flush_event(struct intel_guc_log *log) {queue_work (system_highpri_wq, &log->relay.flush_work); } + +static const char * +stringify_guc_log_type (enum guc_log_buffer_type type) +{ +switch (type) { +case GUC_ISR_LOG_BUFFER : +return "ISR" ; +case GUC_DPC_LOG_BUFFER : +return "DPC" ; +case GUC_CRASH_DUMP_LOG_BUFFER : +return "CRASH" ; +default : +MISSING_CASE (type); + } + +return "" ; +} + +/** +* intel_guc_log_info - dump information about GuC log relay +* @guc: the GuC +* @p: the &drm_printer +* +* Pretty printer for GuC log info +*/ +void intel_guc_log_info (struct intel_guc_log *log,struct drm_printer *p) +{ +enum guc_log_buffer_type type; + +if (!intel_guc_log_relay_created (log)) { +drm_puts (p,"GuC log relay not created\n" ); +return ; + } + +drm_puts (p,"GuC logging stats:\n" ); + +drm_printf (p,"\tRelay full count: %u\n" , log->relay.full_count); + +for (type =GUC_ISR_LOG_BUFFER ; type <GUC_MAX_LOG_BUFFER ; type++) { +drm_printf (p,"\t%s:\tflush count %10u, overflow count %10u\n" , +stringify_guc_log_type (type), + log->stats[type].flush, + log->stats[type].sampled_overflow); + } +} + +/** +* intel_guc_log_dump - dump the contents of the GuC log +* @log: the GuC log +* @p: the &drm_printer +* @dump_load_err: dump the log saved on GuC load error +* +* Pretty printer for the GuC log +*/ +int intel_guc_log_dump (struct intel_guc_log *log,struct drm_printer *p, +bool dump_load_err) +{ +struct intel_guc *guc =log_to_guc (log); + struct intel_uc *uc = container_of(guc, struct intel_uc, guc); +struct drm_i915_gem_object *obj =NULL ; +u32 *map; +int i =0 ; + +if (!intel_guc_is_supported (guc)) +return -ENODEV ; + +if (dump_load_err) + obj = uc->load_err_log; +else if (guc->log.vma) + obj = guc->log.vma->obj; + +if (!obj) +return 0 ; + + map =i915_gem_object_pin_map (obj,I915_MAP_WC ); +if (IS_ERR (map)) { +DRM_DEBUG ("Failed to pin object\n" ); +drm_puts (p,"(log data unaccessible)\n" ); +return PTR_ERR (map); + } + +for (i =0 ; i < obj->base.size /sizeof (u32); i +=4 ) +drm_printf (p,"0x%08x 0x%08x 0x%08x 0x%08x\n" , + *(map + i), *(map + i +1 ), + *(map + i +2 ), *(map + i +3 )); + +drm_puts (p,"\n" ); + +i915_gem_object_unpin_map (obj); + +return 0 ; +}drivers/gpu/drm/i915/gt/uc/intel_guc_log.h +4
-0@@ -79,4 +79,8 @@ static inline u32 intel_guc_log_get_level(struct intel_guc_log *log) return log->level; } +void intel_guc_log_info (struct intel_guc_log *log,struct drm_printer *p); +int intel_guc_log_dump (struct intel_guc_log *log,struct drm_printer *p, +bool dump_load_err); +#endif drivers/gpu/drm/i915/gt/uc/intel_huc.c +29
-0@@ -218,3 +218,32 @@ int intel_huc_check_status(struct intel_huc *huc)return (status & huc->status.mask) == huc->status.value; } + +/** +* intel_huc_load_status - dump information about HuC load status +* @huc: the HuC +* @p: the &drm_printer +* +* Pretty printer for HuC load status. +*/ +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p) +{ +struct intel_gt *gt =huc_to_gt (huc); +intel_wakeref_t wakeref; + +if (!intel_huc_is_supported (huc)) { +drm_printf (p,"HuC not supported\n" ); +return ; + } + +if (!intel_huc_is_wanted (huc)) { +drm_printf (p,"HuC disabled\n" ); +return ; + } + +intel_uc_fw_dump (&huc->fw, p); + + with_intel_runtime_pm(gt->uncore->rpm, wakeref) +drm_printf (p,"\nHuC status 0x%08x:\n" , +intel_uncore_read (gt->uncore,HUC_STATUS2 )); +}drivers/gpu/drm/i915/gt/uc/intel_huc.h +2
-0@@ -57,4 +57,6 @@ static inline bool intel_huc_is_authenticated(struct intel_huc *huc) return intel_uc_fw_is_running(&huc->fw); } +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p); +#endif drivers/gpu/drm/i915/i915_debugfs.c +1
-17@@ -1251,105 +1251,32 @@ static int i915_llc(struct seq_file *m, void *data)return 0 ; } -static int i915_huc_load_status_info (struct seq_file *m,void *data) +static int i915_huc_info (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv =node_to_i915 (m->private); -intel_wakeref_t wakeref; -struct drm_printer p; - -if (!HAS_GT_UC (dev_priv)) -return -ENODEV ; - - p =drm_seq_file_printer (m); -intel_uc_fw_dump (&dev_priv->gt.uc.huc.fw, &p); - - with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) -seq_printf (m,"\nHuC status 0x%08x:\n" ,I915_READ (HUC_STATUS2 )); - -return 0 ; -} - -static int i915_guc_load_status_info (struct seq_file *m,void *data)
drivers/gpu/drm/i915/i915_debugfs.c static int i915_llc(struct seq_file *m, void *data) · line 1261
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-5-{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -intel_wakeref_t wakeref; -struct drm_printer p; +struct intel_huc *huc = &dev_priv->gt.uc.huc; +struct drm_printer p =drm_seq_file_printer (m); -if (!HAS_GT_UC (dev_priv)) +if (!intel_huc_is_supported (huc))return -ENODEV ;
Isn't this test duplicated inside intel_huc_load_status() with a print of 'HuC not supported'? So no need to fail the call here?
Quoted 66 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-59- p =drm_seq_file_printer (m); -intel_uc_fw_dump (&dev_priv->gt.uc.guc.fw, &p); - - with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) { -u32 tmp =I915_READ (GUC_STATUS ); -u32 i; - -seq_printf (m,"\nGuC status 0x%08x:\n" , tmp); -seq_printf (m,"\tBootrom status = 0x%x\n" , - (tmp &GS_BOOTROM_MASK ) >>GS_BOOTROM_SHIFT ); -seq_printf (m,"\tuKernel status = 0x%x\n" , - (tmp &GS_UKERNEL_MASK ) >>GS_UKERNEL_SHIFT ); -seq_printf (m,"\tMIA Core status = 0x%x\n" , - (tmp &GS_MIA_MASK ) >>GS_MIA_SHIFT ); -seq_puts (m,"\nScratch registers:\n" ); -for (i =0 ; i <16 ; i++) { -seq_printf (m,"\t%2d: \t0x%x\n" , - i,I915_READ (SOFT_SCRATCH (i))); - } - } +intel_huc_load_status (huc, &p);return 0 ; } -static const char * -stringify_guc_log_type (enum guc_log_buffer_type type) -{ -switch (type) { -case GUC_ISR_LOG_BUFFER : -return "ISR" ; -case GUC_DPC_LOG_BUFFER : -return "DPC" ; -case GUC_CRASH_DUMP_LOG_BUFFER : -return "CRASH" ; -default : -MISSING_CASE (type); - } - -return "" ; -} - -static void i915_guc_log_info (struct seq_file *m,struct intel_guc_log *log) -{ -enum guc_log_buffer_type type; - -if (!intel_guc_log_relay_created (log)) { -seq_puts (m,"GuC log relay not created\n" ); -return ; - } - -seq_puts (m,"GuC logging stats:\n" ); - -seq_printf (m,"\tRelay full count: %u\n" , - log->relay.full_count); - -for (type =GUC_ISR_LOG_BUFFER ; type <GUC_MAX_LOG_BUFFER ; type++) { -seq_printf (m,"\t%s:\tflush count %10u, overflow count %10u\n" , -stringify_guc_log_type (type), - log->stats[type].flush, - log->stats[type].sampled_overflow); - } -} -static int i915_guc_info (struct seq_file *m,void *data)
drivers/gpu/drm/i915/i915_debugfs.c static int i915_llc(struct seq_file *m, void *data) · line 1276
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-2{struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_uc *uc = &dev_priv->gt.uc; +struct intel_guc *guc = &dev_priv->gt.uc.guc; +struct drm_printer p =drm_seq_file_printer (m); -if (!intel_uc_uses_guc (uc)) +if (!intel_guc_is_supported (guc))return -ENODEV ;
As above. No need to bail if the dump call below is trying to return a useful message in the not supported case.
John.
Quoted 53 lines
drivers/gpu/drm/i915/i915_debugfs.c +7
-30-i915_guc_log_info (m, &uc->guc.log); +intel_guc_load_status (guc, &p); +drm_puts (&p,"\n" ); +intel_guc_log_info (&guc->log, &p);/* Add more as required ... */ @@ -1360,39 +1287,14 @@ static int i915_guc_log_dump(struct seq_file *m, void *data) {struct drm_info_node *node = m->private;struct drm_i915_private *dev_priv =node_to_i915 (node); +struct intel_guc *guc = &dev_priv->gt.uc.guc;bool dump_load_err = !!node->info_ent->data; -struct drm_i915_gem_object *obj =NULL ; -u32 *log; -int i =0 ; +struct drm_printer p =drm_seq_file_printer (m); -if (!HAS_GT_UC (dev_priv)) +if (!intel_guc_is_supported (guc))return -ENODEV ; -if (dump_load_err) - obj = dev_priv->gt.uc.load_err_log; -else if (dev_priv->gt.uc.guc.log.vma) - obj = dev_priv->gt.uc.guc.log.vma->obj; - -if (!obj) -return 0 ; - - log =i915_gem_object_pin_map (obj,I915_MAP_WC ); -if (IS_ERR (log)) { -DRM_DEBUG ("Failed to pin object\n" ); -seq_puts (m,"(log data unaccessible)\n" ); -return PTR_ERR (log); - } - -for (i =0 ; i < obj->base.size /sizeof (u32); i +=4 ) -seq_printf (m,"0x%08x 0x%08x 0x%08x 0x%08x\n" , - *(log + i), *(log + i +1 ), - *(log + i +2 ), *(log + i +3 )); - -seq_putc (m,'\n' ); - -i915_gem_object_unpin_map (obj); - -return 0 ; +return intel_guc_log_dump (&guc->log, &p, dump_load_err); }static int i915_guc_log_level_get (void *data,u64 *val)@@ -2088,10 +1990,9 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
drivers/gpu/drm/i915/i915_debugfs.c static const struct drm_info_list i915_debugfs_list[] = { · line 1998
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-2{"i915_gem_interrupt", i915_interrupt_info, 0}, {"i915_guc_info", i915_guc_info, 0}, - {"i915_guc_load_status", i915_guc_load_status_info, 0}, {"i915_guc_log_dump", i915_guc_log_dump, 0}, {"i915_guc_load_err_log_dump", i915_guc_log_dump, 0, (void *)1}, - {"i915_huc_load_status", i915_huc_load_status_info, 0}, + {"i915_huc_info", i915_huc_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0}, {"i915_context_status", i915_context_status, 0},
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names
Quoted 284 lines · John Harrison
Quoted 283 lines · Daniele Ceraolo Spurio
Move the printers to the respective files for clarity. The
guc_load_statusdebugfs has been squashed in theguc_infoone, has having separate ones wasn't very useful. The HuC debugfs has been renamedhuc_infoto match.v2: keep printing
HUC_STATUS2(Tony), avoid const->non-constcontainer_of(Jani)Suggested-by Michal Wajdeczko <[email protected]>Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Cc Tony Ye <[email protected]>Cc Jani Nikula <[email protected]>---
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 44 +++++++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +drivers/gpu/drm/i915/gt/uc/intel_guc_log.c| 92 +++++++++++++++drivers/gpu/drm/i915/gt/uc/intel_guc_log.h| 4 + drivers/gpu/drm/i915/gt/uc/intel_huc.c | 29 +++++ drivers/gpu/drm/i915/gt/uc/intel_huc.h | 2 + drivers/gpu/drm/i915/i915_debugfs.c | 131 +++------------------7 files changed, 189 insertions(+), 115 deletions(-)drivers/gpu/drm/i915/gt/uc/intel_guc.c +44
-0@@ -723,3 +723,47 @@ int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size, return 0; } + +/** +* intel_guc_load_status - dump information about GuC load status +* @guc: the GuC +* @p: the &drm_printer +* +* Pretty printer for GuC load status. +*/ +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p) +{ + struct intel_gt *gt = guc_to_gt(guc); + struct intel_uncore *uncore = gt->uncore; + intel_wakeref_t wakeref; + + if (!intel_guc_is_supported(guc)) { + drm_printf(p, "GuC not supported\n"); + return; + } + + if (!intel_guc_is_wanted(guc)) { + drm_printf(p, "GuC disabled\n"); + return; + } + + intel_uc_fw_dump(&guc->fw, p); + + with_intel_runtime_pm(uncore->rpm, wakeref) { + u32 status = intel_uncore_read(uncore, GUC_STATUS); + u32 i; + + drm_printf(p, "\nGuC status 0x%08x:\n", status); + drm_printf(p, "\tBootrom status = 0x%x\n", + (status & GS_BOOTROM_MASK) >> GS_BOOTROM_SHIFT); + drm_printf(p, "\tuKernel status = 0x%x\n", + (status & GS_UKERNEL_MASK) >> GS_UKERNEL_SHIFT); + drm_printf(p, "\tMIA Core status = 0x%x\n", + (status & GS_MIA_MASK) >> GS_MIA_SHIFT); + drm_puts(p, "\nScratch registers:\n"); + for (i = 0; i < 16; i++) { + drm_printf(p, "\t%2d: \t0x%x\n", + i, intel_uncore_read(uncore, SOFT_SCRATCH(i))); + } + } +}drivers/gpu/drm/i915/gt/uc/intel_guc.h +2
-0@@ -190,4 +190,6 @@ static inline void intel_guc_disable_msg(struct intel_guc *guc, u32 mask) int intel_guc_reset_engine(struct intel_guc *guc, struct intel_engine_cs *engine); +void intel_guc_load_status (struct intel_guc *guc,struct drm_printer *p); +#endif
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +0
-0@@ -672,3 +672,95 @@ void intel_guc_log_handle_flush_event(struct intel_guc_log *log) { queue_work(system_highpri_wq, &log->relay.flush_work);}
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +26
-0+ +static const char * +stringify_guc_log_type (enum guc_log_buffer_type type) +{ + switch (type) { + case GUC_ISR_LOG_BUFFER: + return "ISR"; + case GUC_DPC_LOG_BUFFER: + return "DPC"; + case GUC_CRASH_DUMP_LOG_BUFFER: + return "CRASH"; + default: + MISSING_CASE(type); + } + + return ""; +} + +/** +* intel_guc_log_info - dump information about GuC log relay +* @guc: the GuC +* @p: the &drm_printer +* +* Pretty printer for GuC log info +*/ +void intel_guc_log_info(struct intel_guc_log *log, struct drm_printer*p)
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +66
-0+{ + enum guc_log_buffer_type type; + + if (!intel_guc_log_relay_created(log)) { + drm_puts(p, "GuC log relay not created\n"); + return; + } + + drm_puts(p, "GuC logging stats:\n"); + + drm_printf(p, "\tRelay full count: %u\n", log->relay.full_count); + + for (type = GUC_ISR_LOG_BUFFER; type < GUC_MAX_LOG_BUFFER; type++) { + drm_printf(p, "\t%s:\tflush count %10u, overflow count %10u\n", + stringify_guc_log_type(type), + log->stats[type].flush, + log->stats[type].sampled_overflow); + } +} + +/** +* intel_guc_log_dump - dump the contents of the GuC log +* @log: the GuC log +* @p: the &drm_printer +* @dump_load_err: dump the log saved on GuC load error +* +* Pretty printer for the GuC log +*/ +int intel_guc_log_dump (struct intel_guc_log *log,struct drm_printer *p, + bool dump_load_err) +{ + struct intel_guc *guc = log_to_guc(log); + struct intel_uc *uc = container_of(guc, struct intel_uc, guc); + struct drm_i915_gem_object *obj = NULL; + u32 *map; + int i = 0; + + if (!intel_guc_is_supported(guc)) + return -ENODEV; + + if (dump_load_err) + obj = uc->load_err_log; + else if (guc->log.vma) + obj = guc->log.vma->obj; + + if (!obj) + return 0; + + map = i915_gem_object_pin_map(obj, I915_MAP_WC); + if (IS_ERR(map)) { + DRM_DEBUG("Failed to pin object\n"); + drm_puts(p, "(log data unaccessible)\n"); + return PTR_ERR(map); + } + + for (i = 0; i < obj->base.size / sizeof(u32); i += 4) + drm_printf(p, "0x%08x 0x%08x 0x%08x 0x%08x\n", + *(map + i), *(map + i + 1), + *(map + i + 2), *(map + i + 3)); + + drm_puts(p, "\n"); + + i915_gem_object_unpin_map(obj); + + return 0; +}drivers/gpu/drm/i915/gt/uc/intel_guc_log.h +4
-0@@ -79,4 +79,8 @@ static inline u32 intel_guc_log_get_level(struct intel_guc_log *log) return log->level; } +void intel_guc_log_info (struct intel_guc_log *log,struct drm_printer *p); +int intel_guc_log_dump (struct intel_guc_log *log,struct drm_printer *p, + bool dump_load_err); +#endif
drivers/gpu/drm/i915/gt/uc/intel_huc.c +29
-0@@ -218,3 +218,32 @@ int intel_huc_check_status(struct intel_huc *huc) return (status & huc->status.mask) == huc->status.value; } + +/** +* intel_huc_load_status - dump information about HuC load status +* @huc: the HuC +* @p: the &drm_printer +* +* Pretty printer for HuC load status. +*/ +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p) +{ + struct intel_gt *gt = huc_to_gt(huc); + intel_wakeref_t wakeref; + + if (!intel_huc_is_supported(huc)) { + drm_printf(p, "HuC not supported\n"); + return; + } + + if (!intel_huc_is_wanted(huc)) { + drm_printf(p, "HuC disabled\n"); + return; + } + + intel_uc_fw_dump(&huc->fw, p); + + with_intel_runtime_pm(gt->uncore->rpm, wakeref) + drm_printf(p, "\nHuC status 0x%08x:\n", + intel_uncore_read(gt->uncore, HUC_STATUS2)); +}drivers/gpu/drm/i915/gt/uc/intel_huc.h +2
-0@@ -57,4 +57,6 @@ static inline bool intel_huc_is_authenticated(struct intel_huc *huc) return intel_uc_fw_is_running(&huc->fw); } +void intel_huc_load_status (struct intel_huc *huc,struct drm_printer *p); +#endif
drivers/gpu/drm/i915/i915_debugfs.c +1
-19@@ -1251,105 +1251,32 @@ static int i915_llc(struct seq_file *m, void *data) return 0; } -static int i915_huc_load_status_info (struct seq_file *m,void *data) +static int i915_huc_info (struct seq_file *m,void *data) { struct drm_i915_private *dev_priv = node_to_i915(m->private); - intel_wakeref_t wakeref; - struct drm_printer p; - - if (!HAS_GT_UC(dev_priv)) - return -ENODEV; - - p = drm_seq_file_printer(m); - intel_uc_fw_dump(&dev_priv->gt.uc.huc.fw, &p); - - with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) - seq_printf(m, "\nHuC status 0x%08x:\n", I915_READ(HUC_STATUS2)); - - return 0; -} - -static int i915_guc_load_status_info (struct seq_file *m,void *data) -{ - struct drm_i915_private *dev_priv = node_to_i915(m->private);
Quoted 9 lines
drivers/gpu/drm/i915/i915_debugfs.c static int i915_llc(struct seq_file *m, void *data) · line 1261
Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-3- intel_wakeref_t wakeref; - struct drm_printer p; + struct intel_huc *huc = &dev_priv->gt.uc.huc; + struct drm_printer p = drm_seq_file_printer(m); - if (!HAS_GT_UC(dev_priv)) + if (!intel_huc_is_supported(huc)) return -ENODEV;Isn't this test duplicated inside
intel_huc_load_status()with a print of 'HuC not supported'? So no need to fail the call here?
intel_huc_load_status is now a generic printer which can be called from other places, so it needs to print useful messages in all cases. From the debugfs POV, I didn't want to change the legacy behavior of returning -ENODEV on platforms that don't support the blob, which IMO is a clear eough indication of the lack of support. Note that in the next patch the code is changed so that the debgufs files are not even created if there is no uC support on the platforms (this is in line with what we do for other GT features).
Daniele
Quoted 128 lines
Quoted 62 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-58- p = drm_seq_file_printer(m); - intel_uc_fw_dump(&dev_priv->gt.uc.guc.fw, &p); - - with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) { - u32 tmp = I915_READ(GUC_STATUS); - u32 i; - - seq_printf(m, "\nGuC status 0x%08x:\n", tmp); - seq_printf(m, "\tBootrom status = 0x%x\n", - (tmp & GS_BOOTROM_MASK) >> GS_BOOTROM_SHIFT); - seq_printf(m, "\tuKernel status = 0x%x\n", - (tmp & GS_UKERNEL_MASK) >> GS_UKERNEL_SHIFT); - seq_printf(m, "\tMIA Core status = 0x%x\n", - (tmp & GS_MIA_MASK) >> GS_MIA_SHIFT); - seq_puts(m, "\nScratch registers:\n"); - for (i = 0; i < 16; i++) { - seq_printf(m, "\t%2d: \t0x%x\n", - i, I915_READ(SOFT_SCRATCH(i))); - } - } + intel_huc_load_status(huc, &p); return 0; } -static const char * -stringify_guc_log_type (enum guc_log_buffer_type type) -{ - switch (type) { - case GUC_ISR_LOG_BUFFER: - return "ISR"; - case GUC_DPC_LOG_BUFFER: - return "DPC"; - case GUC_CRASH_DUMP_LOG_BUFFER: - return "CRASH"; - default: - MISSING_CASE(type); - } - - return ""; -} - -static void i915_guc_log_info (struct seq_file *m,struct intel_guc_log *log) -{ - enum guc_log_buffer_type type; - - if (!intel_guc_log_relay_created(log)) { - seq_puts(m, "GuC log relay not created\n"); - return; - } - - seq_puts(m, "GuC logging stats:\n"); - - seq_printf(m, "\tRelay full count: %u\n", - log->relay.full_count); - - for (type = GUC_ISR_LOG_BUFFER; type < GUC_MAX_LOG_BUFFER; type++) { - seq_printf(m, "\t%s:\tflush count %10u, overflow count %10u\n", - stringify_guc_log_type(type), - log->stats[type].flush, - log->stats[type].sampled_overflow); - } -}drivers/gpu/drm/i915/i915_debugfs.c static int i915_llc(struct seq_file *m, void *data) · line 1275
Quoted 10 lines
drivers/gpu/drm/i915/i915_debugfs.c +3
-3- static int i915_guc_info(struct seq_file *m, void *data) { struct drm_i915_private *dev_priv = node_to_i915(m->private); - struct intel_uc *uc = &dev_priv->gt.uc; + struct intel_guc *guc = &dev_priv->gt.uc.guc; + struct drm_printer p = drm_seq_file_printer(m); - if (!intel_uc_uses_guc(uc)) + if (!intel_guc_is_supported(guc)) return -ENODEV;As above. No need to bail if the dump call below is trying to return a useful message in the not supported case.
John.
Quoted 52 lines
drivers/gpu/drm/i915/i915_debugfs.c +7
-30- i915_guc_log_info(m, &uc->guc.log); + intel_guc_load_status(guc, &p); + drm_puts(&p, "\n"); + intel_guc_log_info(&guc->log, &p); /* Add more as required ... */@@ -1360,39 +1287,14 @@ static int i915_guc_log_dump(struct seq_file *m, void *data) { struct drm_info_node *node = m->private; struct drm_i915_private *dev_priv = node_to_i915(node); + struct intel_guc *guc = &dev_priv->gt.uc.guc; bool dump_load_err = !!node->info_ent->data; - struct drm_i915_gem_object *obj = NULL; - u32 *log; - int i = 0; + struct drm_printer p = drm_seq_file_printer(m); - if (!HAS_GT_UC(dev_priv)) + if (!intel_guc_is_supported(guc)) return -ENODEV; - if (dump_load_err) - obj = dev_priv->gt.uc.load_err_log; - else if (dev_priv->gt.uc.guc.log.vma) - obj = dev_priv->gt.uc.guc.log.vma->obj; - - if (!obj) - return 0; - - log = i915_gem_object_pin_map(obj, I915_MAP_WC); - if (IS_ERR(log)) { - DRM_DEBUG("Failed to pin object\n"); - seq_puts(m, "(log data unaccessible)\n"); - return PTR_ERR(log); - } - - for (i = 0; i < obj->base.size / sizeof(u32); i += 4) - seq_printf(m, "0x%08x 0x%08x 0x%08x 0x%08x\n", - *(log + i), *(log + i + 1), - *(log + i + 2), *(log + i + 3)); - - seq_putc(m, '\n'); - - i915_gem_object_unpin_map(obj); - - return 0; + return intel_guc_log_dump(&guc->log, &p, dump_load_err); } static int i915_guc_log_level_get(void *data, u64 *val)@@ -2088,10 +1990,9 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0}, {"i915_gem_interrupt", i915_interrupt_info, 0}, {"i915_guc_info", i915_guc_info, 0},
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +1
-2- {"i915_guc_load_status", i915_guc_load_status_info, 0}, {"i915_guc_log_dump", i915_guc_log_dump, 0}, {"i915_guc_load_err_log_dump", i915_guc_log_dump, 0, (void *)1}, - {"i915_huc_load_status", i915_huc_load_status_info, 0}, + {"i915_huc_info", i915_huc_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0},{"
i915_context_status",i915_context_status, 0},
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
John Harrison
Reviewed-byRe: [Intel-gfx] [PATCH v2 4/6] drm/i915/debugfs: move uC printers and update debugfs file names
Quoted 52 lines · Daniele Ceraolo Spurio
Quoted 41 lines · John Harrison
Quoted 40 lines · Daniele Ceraolo Spurio
Move the printers to the respective files for clarity. The
guc_load_statusdebugfs has been squashed in theguc_infoone, has having separate ones wasn't very useful. The HuC debugfs has been renamedhuc_infoto match.v2: keep printing
HUC_STATUS2(Tony), avoid const->non-constcontainer_of(Jani)Suggested-by Michal Wajdeczko <[email protected]>Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Cc Tony Ye <[email protected]>Cc Jani Nikula <[email protected]>---
<snip>+static int
i915_huc_info(struct seq_file *m, void *data){
structdrm_i915_private*dev_priv=node_to_i915(m->private); -intel_wakeref_twakeref;
- structdrm_printerp;drivers/gpu/drm/i915/i915_debugfs.c +0
-9- - if (!HAS_GT_UC(dev_priv)) - return -ENODEV; - - p = drm_seq_file_printer(m); - intel_uc_fw_dump(&dev_priv->gt.uc.huc.fw, &p); - - with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) - seq_printf(m, "\nHuC status 0x%08x:\n",
I915_READ(HUC_STATUS2));drivers/gpu/drm/i915/i915_debugfs.c +0
-7- - return 0; -} - -static int i915_guc_load_status_info (struct seq_file *m,void *data) -{ - struct drm_i915_private *dev_priv = node_to_i915(m->private);Quoted 9 lines
Quoted 7 lines
-
intel_wakeref_twakeref;
- structdrm_printerp;
+ structintel_huc*huc =&dev_priv->gt.uc.huc; + structdrm_printerp =drm_seq_file_printer(m); - if (!HAS_GT_UC(dev_priv))
+ if (!intel_huc_is_supported(huc)) return-ENODEV;Isn't this test duplicated inside
intel_huc_load_status()with a print of 'HuC not supported'? So no need to fail the call here?
Quoted 4 lines
intel_huc_load_statusis now a generic printer which can be called from other places, so it needs to print useful messages in all cases. From the debugfs POV, I didn't want to change the legacy behavior of returning-ENODEVon platforms that don't support the blob, which IMO is a clear eough indication of the lack of support. Note that in the next patch the code is changed so that the debgufs files are not even created if there is no uC support on the platforms (this is in line with what we do for other GT features).Daniele
Okay. That makes sense.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 5/6 drm/i915/uc: Move uC debugfs to its own folder under GT
In reply to Daniele Ceraolo SpuriouC is a component of the GT, so it makes sense for the uC debugfs files to be in the GT folder. A subfolder has been used to keep the same structure we have for the code.
v2: use intel_* prefix (Jani), rebase on new gt_debugfs_register_files,
fix permissions for writable debugfs files.
--- drivers/gpu/drm/i915/Makefile | 7 +- drivers/gpu/drm/i915/gt/debugfs_gt.c | 6 +- drivers/gpu/drm/i915/gt/uc/debugfs_guc.c | 42 ++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c | 124 +++++++++++++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h | 15 ++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.c | 36 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.c | 31 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 5 + drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 5 - drivers/gpu/drm/i915/i915_debugfs.c | 137 ------------------- 13 files changed, 306 insertions(+), 144 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.h
drivers/gpu/drm/i915/Makefile +6 -1
@@ -166,7 +166,12 @@ i915-y += \ intel_wopcm.o # general-purpose microcontroller (GuC) support -i915-y += gt/uc/intel_uc.o \ +i915-y += \ + gt/uc/debugfs_guc.o \ + gt/uc/debugfs_guc_log.o \ + gt/uc/debugfs_huc.o \ + gt/uc/debugfs_uc.o \ + gt/uc/intel_uc.o \ gt/uc/intel_uc_fw.o \ gt/uc/intel_guc.o \ gt/uc/intel_guc_ads.o \
drivers/gpu/drm/i915/gt/debugfs_gt.c +5 -1
@@ -9,6 +9,7 @@#include "debugfs_engines.h" #include "debugfs_gt.h" #include "debugfs_gt_pm.h" +#include "uc/debugfs_uc.h" #include "i915_drv.h" void debugfs_gt_register (struct intel_gt *gt)
@@ -24,6 +25,8 @@ void debugfs_gt_register(struct intel_gt *gt)debugfs_engines_register (gt, root);debugfs_gt_pm_register (gt, root); + +intel_uc_debugfs_register (>->uc, root); } void intel_gt_debugfs_register_files(struct dentry *root,
@@ -31,9 +34,10 @@ void intel_gt_debugfs_register_files(struct dentry *root, unsigned long count, void *data) {while (count--) { +umode_t mode = files->fops->write ?0644 :0444 ;if (!files->eval || files->eval (data))debugfs_create_file (files->name, -0444 , root, data, + mode, root, data, files->fops); files++;
drivers/gpu/drm/i915/gt/uc/debugfs_guc.c new file +42 -0
42 lines not on this page · raw message
drivers/gpu/drm/i915/gt/uc/debugfs_guc.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_H +#define DEBUGFS_GUC_H + +struct intel_guc ; +struct dentry ; + +void intel_guc_debugfs_register (struct intel_guc *guc,struct dentry *root); + +#endif /* DEBUGFS_GUC_H */
drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c new file +124 -0
124 lines not on this page · raw message
drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h new file +15 -0
@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_LOG_H +#define DEBUGFS_GUC_LOG_H + +struct intel_guc_log ; +struct dentry ; + +void intel_guc_log_debugfs_register (struct intel_guc_log *log, +struct dentry *root); + +#endif /* DEBUGFS_GUC_LOG_H */
drivers/gpu/drm/i915/gt/uc/debugfs_huc.c new file +36 -0
@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "intel_huc.h" + +static int huc_info_show (struct seq_file *m,void *data) +{ +struct intel_huc *huc = m->private; +struct drm_printer p =drm_seq_file_printer (m); + +if (!intel_huc_is_supported (huc)) +return -ENODEV ; + +intel_huc_load_status (huc, &p); + +return 0 ; +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (huc_info); + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"huc_info" , &huc_info_fops,NULL }, + }; + +if (!intel_huc_is_supported (huc)) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), huc); +}
drivers/gpu/drm/i915/gt/uc/debugfs_huc.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_HUC_H +#define DEBUGFS_HUC_H + +struct intel_huc ; +struct dentry ; + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root); + +#endif /* DEBUGFS_HUC_H */
drivers/gpu/drm/i915/gt/uc/debugfs_uc.c new file +31 -0
@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <linux/debugfs.h> + +#include "debugfs_guc.h" +#include "debugfs_huc.h" +#include "debugfs_uc.h" +#include "intel_uc.h" + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root) +{ +struct dentry *root; + +if (!gt_root) +return ; + +/* GuC and HuC go always in pair, no need to check both */ +if (!intel_uc_supports_guc (uc)) +return ; + + root =debugfs_create_dir ("uc" , gt_root); +if (IS_ERR (root)) +return ; + +intel_guc_debugfs_register (&uc->guc, root); +intel_huc_debugfs_register (&uc->huc, root); +}
drivers/gpu/drm/i915/gt/uc/debugfs_uc.h new file +14 -0
@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_UC_H +#define DEBUGFS_UC_H + +struct intel_uc ; +struct dentry ; + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root); + +#endif /* DEBUGFS_UC_H */
drivers/gpu/drm/i915/gt/uc/intel_guc.h +5 -0
@@ -74,6 +74,11 @@ struct intel_guc {struct mutex send_mutex; }; +static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) +{ + return container_of(log, struct intel_guc, log); +} +static inline int intel_guc_send (struct intel_guc *guc,const u32 *action,u32 len) {
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +0 -5
@@ -55,11 +55,6 @@ static int guc_action_control_log(struct intel_guc *guc, bool enable,return intel_guc_send (guc, action,ARRAY_SIZE (action)); } -static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) -{ - return container_of(log, struct intel_guc, log); -} -static void guc_log_enable_flush_events (struct intel_guc_log *log) { intel_guc_enable_msg(log_to_guc(log),
drivers/gpu/drm/i915/i915_debugfs.c +0 -137
161 lines not on this page · raw message
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH v2 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT
Quoted 95 lines · Daniele Ceraolo Spurio
uC is a component of the GT, so it makes sense for the uC debugfs files to be in the GT folder. A subfolder has been used to keep the same structure we have for the code.
v2: use intel_* prefix (Jani), rebase on new
gt_debugfs_register_files,
fix permissions for writable debugfs files.Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Andi Shyti <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Cc Tony Ye <[email protected]>Cc Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/Makefile | 7 +- drivers/gpu/drm/i915/gt/debugfs_gt.c | 6 +- drivers/gpu/drm/i915/gt/uc/debugfs_guc.c | 42 ++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c | 124 +++++++++++++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h | 15 ++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.c | 36 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.c | 31 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 5 + drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 5 - drivers/gpu/drm/i915/i915_debugfs.c | 137 ------------------- 13 files changed, 306 insertions(+), 144 deletions(-) create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_huc.h create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.c create mode 100644 drivers/gpu/drm/i915/gt/uc/debugfs_uc.hdrivers/gpu/drm/i915/Makefile +6
-1@@ -166,7 +166,12 @@ i915-y += \ intel_wopcm.o # general-purpose microcontroller (GuC) support -i915-y += gt/uc/intel_uc.o \ +i915-y += \ + gt/uc/debugfs_guc.o \ + gt/uc/debugfs_guc_log.o \ + gt/uc/debugfs_huc.o \ + gt/uc/debugfs_uc.o \ + gt/uc/intel_uc.o \ gt/uc/intel_uc_fw.o \ gt/uc/intel_guc.o \ gt/uc/intel_guc_ads.o \drivers/gpu/drm/i915/gt/debugfs_gt.c +5
-1@@ -9,6 +9,7 @@#include "debugfs_engines.h" #include "debugfs_gt.h" #include "debugfs_gt_pm.h" +#include "uc/debugfs_uc.h" #include "i915_drv.h" void debugfs_gt_register (struct intel_gt *gt)@@ -24,6 +25,8 @@ void debugfs_gt_register(struct intel_gt *gt)debugfs_engines_register (gt, root);debugfs_gt_pm_register (gt, root); + +intel_uc_debugfs_register (>->uc, root); } void intel_gt_debugfs_register_files(struct dentry *root,@@ -31,9 +34,10 @@ void intel_gt_debugfs_register_files(struct dentry *root, unsigned long count, void *data) {while (count--) { +umode_t mode = files->fops->write ?0644 :0444 ;if (!files->eval || files->eval (data))debugfs_create_file (files->name, -0444 , root, data, + mode, root, data, files->fops); files++;drivers/gpu/drm/i915/gt/uc/debugfs_guc.c new file +0
-0
drivers/gpu/drm/i915/gt/uc/debugfs_guc.c line 2
Quoted 2 lines
drivers/gpu/drm/i915/gt/uc/debugfs_guc.c new file +2
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +
Unnecessary blank line, ditto for other .c files.
Quoted 531 lines
drivers/gpu/drm/i915/gt/uc/debugfs_guc.c new file +40
-0+/* +* Copyright © 2020 Intel Corporation +*/ + +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "debugfs_guc_log.h" +#include "intel_guc.h" + +static int guc_info_show (struct seq_file *m,void *data) +{ +struct intel_guc *guc = m->private; +struct drm_printer p =drm_seq_file_printer (m); + +if (!intel_guc_is_supported (guc)) +return -ENODEV ; + +intel_guc_load_status (guc, &p); +drm_puts (&p,"\n" ); +intel_guc_log_info (&guc->log, &p); + +/* Add more as required ... */ + +return 0 ; +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_info); + +void intel_guc_debugfs_register (struct intel_guc *guc,struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"guc_info" , &guc_info_fops,NULL }, + }; + +if (!intel_guc_is_supported (guc)) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), guc); +intel_guc_log_debugfs_register (&guc->log, root); +}drivers/gpu/drm/i915/gt/uc/debugfs_guc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_H +#define DEBUGFS_GUC_H + +struct intel_guc ; +struct dentry ; + +void intel_guc_debugfs_register (struct intel_guc *guc,struct dentry *root); + +#endif /* DEBUGFS_GUC_H */ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c new file +124
-0@@ -0,0 +1,124 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <linux/fs.h> +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "intel_guc.h" +#include "intel_guc_log.h" + +static int guc_log_dump_show (struct seq_file *m,void *data) +{ +struct drm_printer p =drm_seq_file_printer (m); + +return intel_guc_log_dump (m->private, &p, false); +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_log_dump); + +static int guc_load_err_log_dump_show (struct seq_file *m,void *data) +{ +struct drm_printer p =drm_seq_file_printer (m); + +return intel_guc_log_dump (m->private, &p, true); +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_load_err_log_dump); + +static int guc_log_level_get (void *data,u64 *val) +{ +struct intel_guc_log *log = data; + +if (!intel_guc_is_used (log_to_guc (log))) +return -ENODEV ; + + *val =intel_guc_log_get_level (log); + +return 0 ; +} + +static int guc_log_level_set (void *data,u64 val) +{ +struct intel_guc_log *log = data; + +if (!intel_guc_is_used (log_to_guc (log))) +return -ENODEV ; + +return intel_guc_log_set_level (log, val); +} + +DEFINE_SIMPLE_ATTRIBUTE (guc_log_level_fops, + guc_log_level_get, guc_log_level_set, +"%lld\n" ); + +static int guc_log_relay_open (struct inode *inode,struct file *file) +{ +struct intel_guc_log *log = inode->i_private; + +if (!intel_guc_is_ready (log_to_guc (log))) +return -ENODEV ; + + file->private_data = log; + +return intel_guc_log_relay_open (log); +} + +static ssize_t +guc_log_relay_write (struct file *filp, +const char __user *ubuf, +size_t cnt, +loff_t *ppos) +{ +struct intel_guc_log *log = filp->private_data; +int val; +int ret; + + ret =kstrtoint_from_user (ubuf, cnt,0 , &val); +if (ret <0 ) +return ret; + +/* +* Enable and start the guc log relay on value of 1. +* Flush log relay for any other value. +*/ +if (val ==1 ) + ret =intel_guc_log_relay_start (log); +else +intel_guc_log_relay_flush (log); + +return ret ?: cnt; +} + +static int guc_log_relay_release (struct inode *inode,struct file *file) +{ +struct intel_guc_log *log = inode->i_private; + +intel_guc_log_relay_close (log); +return 0 ; +} + +static const struct file_operations guc_log_relay_fops = { + .owner =THIS_MODULE , + .open = guc_log_relay_open, + .write = guc_log_relay_write, + .release = guc_log_relay_release, +}; + +void intel_guc_log_debugfs_register (struct intel_guc_log *log, +struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"guc_log_dump" , &guc_log_dump_fops,NULL }, + {"guc_load_err_log_dump" , &guc_load_err_log_dump_fops,NULL }, + {"guc_log_level" , &guc_log_level_fops,NULL }, + {"guc_log_relay" , &guc_log_relay_fops,NULL }, + }; + +if (!intel_guc_is_supported (log_to_guc (log))) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), log); +} +drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_LOG_H +#define DEBUGFS_GUC_LOG_H + +struct intel_guc_log ; +struct dentry ; + +void intel_guc_log_debugfs_register (struct intel_guc_log *log, +struct dentry *root); + +#endif /* DEBUGFS_GUC_LOG_H */ drivers/gpu/drm/i915/gt/uc/debugfs_huc.c new file +36
-0@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "intel_huc.h" + +static int huc_info_show (struct seq_file *m,void *data) +{ +struct intel_huc *huc = m->private; +struct drm_printer p =drm_seq_file_printer (m); + +if (!intel_huc_is_supported (huc)) +return -ENODEV ; + +intel_huc_load_status (huc, &p); + +return 0 ; +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (huc_info); + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"huc_info" , &huc_info_fops,NULL }, + }; + +if (!intel_huc_is_supported (huc)) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), huc); +}drivers/gpu/drm/i915/gt/uc/debugfs_huc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_HUC_H +#define DEBUGFS_HUC_H + +struct intel_huc ; +struct dentry ; + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root); + +#endif /* DEBUGFS_HUC_H */ drivers/gpu/drm/i915/gt/uc/debugfs_uc.c new file +31
-0@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <linux/debugfs.h> + +#include "debugfs_guc.h" +#include "debugfs_huc.h" +#include "debugfs_uc.h" +#include "intel_uc.h" + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root) +{ +struct dentry *root; + +if (!gt_root) +return ; + +/* GuC and HuC go always in pair, no need to check both */ +if (!intel_uc_supports_guc (uc)) +return ; + + root =debugfs_create_dir ("uc" , gt_root); +if (IS_ERR (root)) +return ; + +intel_guc_debugfs_register (&uc->guc, root); +intel_huc_debugfs_register (&uc->huc, root); +}drivers/gpu/drm/i915/gt/uc/debugfs_uc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_UC_H +#define DEBUGFS_UC_H + +struct intel_uc ; +struct dentry ; + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root); + +#endif /* DEBUGFS_UC_H */ drivers/gpu/drm/i915/gt/uc/intel_guc.h +5
-0@@ -74,6 +74,11 @@ struct intel_guc {struct mutex send_mutex; }; +static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) +{ + return container_of(log, struct intel_guc, log); +} +static inline int intel_guc_send (struct intel_guc *guc,const u32 *action,u32 len) {drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +0
-5@@ -55,11 +55,6 @@ static int guc_action_control_log(struct intel_guc *guc, bool enable,return intel_guc_send (guc, action,ARRAY_SIZE (action)); } -static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) -{ - return container_of(log, struct intel_guc, log); -} -static void guc_log_enable_flush_events (struct intel_guc_log *log) { intel_guc_enable_msg(log_to_guc(log),drivers/gpu/drm/i915/i915_debugfs.c +0
-137@@ -37,7 +37,6 @@#include "gt/intel_reset.h" #include "gt/intel_rc6.h" #include "gt/intel_rps.h" -#include "gt/uc/intel_guc_submission.h" #include "i915_debugfs.h" #include "i915_debugfs_params.h" @@ -1251,136 +1250,6 @@ static int i915_llc(struct seq_file *m, void *data)return 0 ; } -static int i915_huc_info (struct seq_file *m,void *data) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_huc *huc = &dev_priv->gt.uc.huc; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_huc_is_supported (huc)) -return -ENODEV ; - -intel_huc_load_status (huc, &p); - -return 0 ; -} - -static int i915_guc_info (struct seq_file *m,void *data) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_guc *guc = &dev_priv->gt.uc.guc; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_guc_is_supported (guc)) -return -ENODEV ; - -intel_guc_load_status (guc, &p); -drm_puts (&p,"\n" ); -intel_guc_log_info (&guc->log, &p); - -/* Add more as required ... */ - -return 0 ; -} - -static int i915_guc_log_dump (struct seq_file *m,void *data) -{ -struct drm_info_node *node = m->private; -struct drm_i915_private *dev_priv =node_to_i915 (node); -struct intel_guc *guc = &dev_priv->gt.uc.guc; -bool dump_load_err = !!node->info_ent->data; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_guc_is_supported (guc)) -return -ENODEV ; - -return intel_guc_log_dump (&guc->log, &p, dump_load_err); -} - -static int i915_guc_log_level_get (void *data,u64 *val) -{ -struct drm_i915_private *dev_priv = data; -struct intel_uc *uc = &dev_priv->gt.uc; - -if (!intel_uc_uses_guc (uc)) -return -ENODEV ; - - *val =intel_guc_log_get_level (&uc->guc.log); - -return 0 ; -} - -static int i915_guc_log_level_set (void *data,u64 val) -{ -struct drm_i915_private *dev_priv = data; -struct intel_uc *uc = &dev_priv->gt.uc; - -if (!intel_uc_uses_guc (uc)) -return -ENODEV ; - -return intel_guc_log_set_level (&uc->guc.log, val); -} - -DEFINE_SIMPLE_ATTRIBUTE (i915_guc_log_level_fops, - i915_guc_log_level_get, i915_guc_log_level_set, -"%lld\n" ); - -static int i915_guc_log_relay_open (struct inode *inode,struct file *file) -{ -struct drm_i915_private *i915 = inode->i_private; -struct intel_guc *guc = &i915->gt.uc.guc; -struct intel_guc_log *log = &guc->log; - -if (!intel_guc_is_ready (guc)) -return -ENODEV ; - - file->private_data = log; - -return intel_guc_log_relay_open (log); -} - -static ssize_t -i915_guc_log_relay_write (struct file *filp, -const char __user *ubuf, -size_t cnt, -loff_t *ppos) -{ -struct intel_guc_log *log = filp->private_data; -int val; -int ret; - - ret =kstrtoint_from_user (ubuf, cnt,0 , &val); -if (ret <0 ) -return ret; - -/* -* Enable and start the guc log relay on value of 1. -* Flush log relay for any other value. -*/ -if (val ==1 ) - ret =intel_guc_log_relay_start (log); -else -intel_guc_log_relay_flush (log); - -return ret ?: cnt; -} - -static int i915_guc_log_relay_release (struct inode *inode,struct file *file) -{ -struct drm_i915_private *i915 = inode->i_private; -struct intel_guc *guc = &i915->gt.uc.guc; - -intel_guc_log_relay_close (&guc->log); -return 0 ; -} - -static const struct file_operations i915_guc_log_relay_fops = { - .owner =THIS_MODULE , - .open = i915_guc_log_relay_open, - .write = i915_guc_log_relay_write, - .release = i915_guc_log_relay_release, -}; -static int i915_runtime_pm_status (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);@@ -1989,10 +1858,6 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_gem_objects", i915_gem_object_info, 0}, {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0}, {"i915_gem_interrupt", i915_interrupt_info, 0}, - {"i915_guc_info", i915_guc_info, 0}, - {"i915_guc_log_dump", i915_guc_log_dump, 0}, - {"i915_guc_load_err_log_dump", i915_guc_log_dump, 0, (void *)1}, - {"i915_huc_info", i915_huc_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0}, {"i915_context_status", i915_context_status, 0},@@ -2020,8 +1885,6 @@ static const struct i915_debugfs_files { {"i915_error_state", &i915_error_state_fops}, {"i915_gpu_info", &i915_gpu_info_fops}, #endif - {"i915_guc_log_level", &i915_guc_log_level_fops}, - {"i915_guc_log_relay", &i915_guc_log_relay_fops}, }; int i915_debugfs_register(struct drm_i915_private *dev_priv)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT
In reply to Daniele Ceraolo SpurioHi Daniele,
Quoted 11 lines
void
debugfs_gt_register(struct intel_gt *gt)drivers/gpu/drm/i915/gt/debugfs_gt.c +2
-0@@ -24,6 +25,8 @@ void debugfs_gt_register(struct intel_gt *gt)debugfs_engines_register (gt, root);debugfs_gt_pm_register (gt, root); + +intel_uc_debugfs_register (>->uc, root); } void intel_gt_debugfs_register_files(struct dentry *root,
drivers/gpu/drm/i915/gt/debugfs_gt.c void intel_gt_debugfs_register_files(struct dentry *root, · line 41
Quoted 9 lines
drivers/gpu/drm/i915/gt/debugfs_gt.c +2
-1@@ -31,9 +34,10 @@ void intel_gt_debugfs_register_files(struct dentry *root, unsigned long count, void *data) {while (count--) { +umode_t mode = files->fops->write ?0644 :0444 ;if (!files->eval || files->eval (data))debugfs_create_file (files->name, -0444 , root, data, + mode, root, data, files->fops);
perhaps at some point we could send this to the debugfs framework as multifile creation.
in any case,
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 5/6] drm/i915/uc: Move uC debugfs to its own folder under GT
In reply to Daniele Ceraolo SpurioQuoted 43 lines · Daniele Ceraolo Spurio
uC is a component of the GT, so it makes sense for the uC debugfs files to be in the GT folder. A subfolder has been used to keep the same structure we have for the code.
v2: use intel_* prefix (Jani), rebase on new
gt_debugfs_register_files,
fix permissions for writable debugfs files.Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Andi Shyti <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Cc Tony Ye <[email protected]>Cc Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/Makefile | 7 +- drivers/gpu/drm/i915/gt/debugfs_gt.c | 6 +- drivers/gpu/drm/i915/gt/uc/debugfs_guc.c | 42 ++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c | 124 +++++++++++++++++ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h | 15 ++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.c | 36 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_huc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.c | 31 +++++ drivers/gpu/drm/i915/gt/uc/debugfs_uc.h | 14 ++ drivers/gpu/drm/i915/gt/uc/intel_guc.h | 5 + drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 5 - drivers/gpu/drm/i915/i915_debugfs.c | 137 ------------------- 13 files changed, 306 insertions(+), 144 deletions(-)create mode 100644
drivers/gpu/drm/i915/gt/uc/debugfs_guc.ccreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_guc.hcreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.ccreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.hcreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_huc.ccreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_huc.hcreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_uc.ccreate mode 100644drivers/gpu/drm/i915/gt/uc/debugfs_uc.hdrivers/gpu/drm/i915/Makefile +0
-0
drivers/gpu/drm/i915/Makefile i915-y += \ · line 173
Quoted 9 lines
drivers/gpu/drm/i915/Makefile +5
-1@@ -166,7 +166,12 @@ i915-y += \ intel_wopcm.o # general-purpose microcontroller (GuC) support -i915-y += gt/uc/intel_uc.o \ +i915-y += \ + gt/uc/debugfs_guc.o \ + gt/uc/debugfs_guc_log.o \ + gt/uc/debugfs_huc.o \ + gt/uc/debugfs_uc.o \
In an IM discussion Michal suggested to rename those files to intel_uc_debugfs, intel_guc_debugfs etc. This would be different from the files under gt/. Before I do it, does anyone have a problem with the renaming?
Daniele
Quoted 569 lines
drivers/gpu/drm/i915/Makefile +1
-0+ gt/uc/intel_uc.o \ gt/uc/intel_uc_fw.o \ gt/uc/intel_guc.o \ gt/uc/intel_guc_ads.o \drivers/gpu/drm/i915/gt/debugfs_gt.c +5
-1@@ -9,6 +9,7 @@#include "debugfs_engines.h" #include "debugfs_gt.h" #include "debugfs_gt_pm.h" +#include "uc/debugfs_uc.h" #include "i915_drv.h" void debugfs_gt_register (struct intel_gt *gt)@@ -24,6 +25,8 @@ void debugfs_gt_register(struct intel_gt *gt)debugfs_engines_register (gt, root);debugfs_gt_pm_register (gt, root); + +intel_uc_debugfs_register (>->uc, root); } void intel_gt_debugfs_register_files(struct dentry *root,@@ -31,9 +34,10 @@ void intel_gt_debugfs_register_files(struct dentry *root, unsigned long count, void *data) {while (count--) { +umode_t mode = files->fops->write ?0644 :0444 ;if (!files->eval || files->eval (data))debugfs_create_file (files->name, -0444 , root, data, + mode, root, data, files->fops); files++;drivers/gpu/drm/i915/gt/uc/debugfs_guc.c new file +42
-0@@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "debugfs_guc_log.h" +#include "intel_guc.h" + +static int guc_info_show (struct seq_file *m,void *data) +{ +struct intel_guc *guc = m->private; +struct drm_printer p =drm_seq_file_printer (m); + +if (!intel_guc_is_supported (guc)) +return -ENODEV ; + +intel_guc_load_status (guc, &p); +drm_puts (&p,"\n" ); +intel_guc_log_info (&guc->log, &p); + +/* Add more as required ... */ + +return 0 ; +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_info); + +void intel_guc_debugfs_register (struct intel_guc *guc,struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"guc_info" , &guc_info_fops,NULL }, + }; + +if (!intel_guc_is_supported (guc)) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), guc); +intel_guc_log_debugfs_register (&guc->log, root); +}drivers/gpu/drm/i915/gt/uc/debugfs_guc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_H +#define DEBUGFS_GUC_H + +struct intel_guc ; +struct dentry ; + +void intel_guc_debugfs_register (struct intel_guc *guc,struct dentry *root); + +#endif /* DEBUGFS_GUC_H */ drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c new file +124
-0@@ -0,0 +1,124 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <linux/fs.h> +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "intel_guc.h" +#include "intel_guc_log.h" + +static int guc_log_dump_show (struct seq_file *m,void *data) +{ +struct drm_printer p =drm_seq_file_printer (m); + +return intel_guc_log_dump (m->private, &p, false); +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_log_dump); + +static int guc_load_err_log_dump_show (struct seq_file *m,void *data) +{ +struct drm_printer p =drm_seq_file_printer (m); + +return intel_guc_log_dump (m->private, &p, true); +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (guc_load_err_log_dump); + +static int guc_log_level_get (void *data,u64 *val) +{ +struct intel_guc_log *log = data; + +if (!intel_guc_is_used (log_to_guc (log))) +return -ENODEV ; + + *val =intel_guc_log_get_level (log); + +return 0 ; +} + +static int guc_log_level_set (void *data,u64 val) +{ +struct intel_guc_log *log = data; + +if (!intel_guc_is_used (log_to_guc (log))) +return -ENODEV ; + +return intel_guc_log_set_level (log, val); +} + +DEFINE_SIMPLE_ATTRIBUTE (guc_log_level_fops, + guc_log_level_get, guc_log_level_set, +"%lld\n" ); + +static int guc_log_relay_open (struct inode *inode,struct file *file) +{ +struct intel_guc_log *log = inode->i_private; + +if (!intel_guc_is_ready (log_to_guc (log))) +return -ENODEV ; + + file->private_data = log; + +return intel_guc_log_relay_open (log); +} + +static ssize_t +guc_log_relay_write (struct file *filp, +const char __user *ubuf, +size_t cnt, +loff_t *ppos) +{ +struct intel_guc_log *log = filp->private_data; +int val; +int ret; + + ret =kstrtoint_from_user (ubuf, cnt,0 , &val); +if (ret <0 ) +return ret; + +/* +* Enable and start the guc log relay on value of 1. +* Flush log relay for any other value. +*/ +if (val ==1 ) + ret =intel_guc_log_relay_start (log); +else +intel_guc_log_relay_flush (log); + +return ret ?: cnt; +} + +static int guc_log_relay_release (struct inode *inode,struct file *file) +{ +struct intel_guc_log *log = inode->i_private; + +intel_guc_log_relay_close (log); +return 0 ; +} + +static const struct file_operations guc_log_relay_fops = { + .owner =THIS_MODULE , + .open = guc_log_relay_open, + .write = guc_log_relay_write, + .release = guc_log_relay_release, +}; + +void intel_guc_log_debugfs_register (struct intel_guc_log *log, +struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"guc_log_dump" , &guc_log_dump_fops,NULL }, + {"guc_load_err_log_dump" , &guc_load_err_log_dump_fops,NULL }, + {"guc_log_level" , &guc_log_level_fops,NULL }, + {"guc_log_relay" , &guc_log_relay_fops,NULL }, + }; + +if (!intel_guc_is_supported (log_to_guc (log))) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), log); +} +drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.h new file +15
-0@@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_GUC_LOG_H +#define DEBUGFS_GUC_LOG_H + +struct intel_guc_log ; +struct dentry ; + +void intel_guc_log_debugfs_register (struct intel_guc_log *log, +struct dentry *root); + +#endif /* DEBUGFS_GUC_LOG_H */ drivers/gpu/drm/i915/gt/uc/debugfs_huc.c new file +36
-0@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <drm/drm_print.h> + +#include "gt/debugfs_gt.h" +#include "intel_huc.h" + +static int huc_info_show (struct seq_file *m,void *data) +{ +struct intel_huc *huc = m->private; +struct drm_printer p =drm_seq_file_printer (m); + +if (!intel_huc_is_supported (huc)) +return -ENODEV ; + +intel_huc_load_status (huc, &p); + +return 0 ; +} +DEFINE_GT_DEBUGFS_ATTRIBUTE (huc_info); + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root) +{ +static const struct debugfs_gt_file files[] = { + {"huc_info" , &huc_info_fops,NULL }, + }; + +if (!intel_huc_is_supported (huc)) +return ; + +intel_gt_debugfs_register_files (root, files,ARRAY_SIZE (files), huc); +}drivers/gpu/drm/i915/gt/uc/debugfs_huc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_HUC_H +#define DEBUGFS_HUC_H + +struct intel_huc ; +struct dentry ; + +void intel_huc_debugfs_register (struct intel_huc *huc,struct dentry *root); + +#endif /* DEBUGFS_HUC_H */ drivers/gpu/drm/i915/gt/uc/debugfs_uc.c new file +31
-0@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +/* +* Copyright © 2020 Intel Corporation +*/ + +#include <linux/debugfs.h> + +#include "debugfs_guc.h" +#include "debugfs_huc.h" +#include "debugfs_uc.h" +#include "intel_uc.h" + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root) +{ +struct dentry *root; + +if (!gt_root) +return ; + +/* GuC and HuC go always in pair, no need to check both */ +if (!intel_uc_supports_guc (uc)) +return ; + + root =debugfs_create_dir ("uc" , gt_root); +if (IS_ERR (root)) +return ; + +intel_guc_debugfs_register (&uc->guc, root); +intel_huc_debugfs_register (&uc->huc, root); +}drivers/gpu/drm/i915/gt/uc/debugfs_uc.h new file +14
-0@@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright © 2020 Intel Corporation +*/ + +#ifndef DEBUGFS_UC_H +#define DEBUGFS_UC_H + +struct intel_uc ; +struct dentry ; + +void intel_uc_debugfs_register (struct intel_uc *uc,struct dentry *gt_root); + +#endif /* DEBUGFS_UC_H */ drivers/gpu/drm/i915/gt/uc/intel_guc.h +5
-0@@ -74,6 +74,11 @@ struct intel_guc {struct mutex send_mutex; }; +static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) +{ + return container_of(log, struct intel_guc, log); +} +static inline int intel_guc_send (struct intel_guc *guc,const u32 *action,u32 len) {drivers/gpu/drm/i915/gt/uc/intel_guc_log.c +0
-5@@ -55,11 +55,6 @@ static int guc_action_control_log(struct intel_guc *guc, bool enable,return intel_guc_send (guc, action,ARRAY_SIZE (action)); } -static inline struct intel_guc *log_to_guc (struct intel_guc_log *log) -{ - return container_of(log, struct intel_guc, log); -} -static void guc_log_enable_flush_events (struct intel_guc_log *log) { intel_guc_enable_msg(log_to_guc(log),drivers/gpu/drm/i915/i915_debugfs.c +0
-135@@ -37,7 +37,6 @@#include "gt/intel_reset.h" #include "gt/intel_rc6.h" #include "gt/intel_rps.h" -#include "gt/uc/intel_guc_submission.h" #include "i915_debugfs.h" #include "i915_debugfs_params.h" @@ -1251,136 +1250,6 @@ static int i915_llc(struct seq_file *m, void *data)return 0 ; } -static int i915_huc_info (struct seq_file *m,void *data) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_huc *huc = &dev_priv->gt.uc.huc; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_huc_is_supported (huc)) -return -ENODEV ; - -intel_huc_load_status (huc, &p); - -return 0 ; -} - -static int i915_guc_info (struct seq_file *m,void *data) -{ -struct drm_i915_private *dev_priv =node_to_i915 (m->private); -struct intel_guc *guc = &dev_priv->gt.uc.guc; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_guc_is_supported (guc)) -return -ENODEV ; - -intel_guc_load_status (guc, &p); -drm_puts (&p,"\n" ); -intel_guc_log_info (&guc->log, &p); - -/* Add more as required ... */ - -return 0 ; -} - -static int i915_guc_log_dump (struct seq_file *m,void *data) -{ -struct drm_info_node *node = m->private; -struct drm_i915_private *dev_priv =node_to_i915 (node); -struct intel_guc *guc = &dev_priv->gt.uc.guc; -bool dump_load_err = !!node->info_ent->data; -struct drm_printer p =drm_seq_file_printer (m); - -if (!intel_guc_is_supported (guc)) -return -ENODEV ; - -return intel_guc_log_dump (&guc->log, &p, dump_load_err); -} - -static int i915_guc_log_level_get (void *data,u64 *val) -{ -struct drm_i915_private *dev_priv = data; -struct intel_uc *uc = &dev_priv->gt.uc; - -if (!intel_uc_uses_guc (uc)) -return -ENODEV ; - - *val =intel_guc_log_get_level (&uc->guc.log); - -return 0 ; -} - -static int i915_guc_log_level_set (void *data,u64 val) -{ -struct drm_i915_private *dev_priv = data; -struct intel_uc *uc = &dev_priv->gt.uc; - -if (!intel_uc_uses_guc (uc)) -return -ENODEV ; - -return intel_guc_log_set_level (&uc->guc.log, val); -} - -DEFINE_SIMPLE_ATTRIBUTE (i915_guc_log_level_fops, - i915_guc_log_level_get, i915_guc_log_level_set, -"%lld\n" ); - -static int i915_guc_log_relay_open (struct inode *inode,struct file *file) -{ -struct drm_i915_private *i915 = inode->i_private; -struct intel_guc *guc = &i915->gt.uc.guc; -struct intel_guc_log *log = &guc->log; - -if (!intel_guc_is_ready (guc)) -return -ENODEV ; - - file->private_data = log; - -return intel_guc_log_relay_open (log); -} - -static ssize_t -i915_guc_log_relay_write (struct file *filp, -const char __user *ubuf, -size_t cnt, -loff_t *ppos) -{ -struct intel_guc_log *log = filp->private_data; -int val; -int ret; - - ret =kstrtoint_from_user (ubuf, cnt,0 , &val); -if (ret <0 ) -return ret; - -/* -* Enable and start the guc log relay on value of 1. -* Flush log relay for any other value. -*/ -if (val ==1 ) - ret =intel_guc_log_relay_start (log); -else -intel_guc_log_relay_flush (log); - -return ret ?: cnt; -} - -static int i915_guc_log_relay_release (struct inode *inode,struct file *file) -{ -struct drm_i915_private *i915 = inode->i_private; -struct intel_guc *guc = &i915->gt.uc.guc; - -intel_guc_log_relay_close (&guc->log); -return 0 ; -} - -static const struct file_operations i915_guc_log_relay_fops = { - .owner =THIS_MODULE , - .open = i915_guc_log_relay_open, - .write = i915_guc_log_relay_write, - .release = i915_guc_log_relay_release, -}; -static int i915_runtime_pm_status (struct seq_file *m,void *unused) {struct drm_i915_private *dev_priv =node_to_i915 (m->private);@@ -1989,10 +1858,6 @@ static const struct drm_info_list i915_debugfs_list[] = { {"i915_gem_objects", i915_gem_object_info, 0}, {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0}, {"i915_gem_interrupt", i915_interrupt_info, 0}, - {"i915_guc_info", i915_guc_info, 0}, - {"i915_guc_log_dump", i915_guc_log_dump, 0}, - {"i915_guc_load_err_log_dump", i915_guc_log_dump, 0, (void *)1}, - {"i915_huc_info", i915_huc_info, 0}, {"i915_frequency_info", i915_frequency_info, 0}, {"i915_ring_freq_table", i915_ring_freq_table, 0}, {"i915_context_status", i915_context_status, 0},
drivers/gpu/drm/i915/i915_debugfs.c static const struct i915_debugfs_files { · line 1890
Quoted 8 lines
drivers/gpu/drm/i915/i915_debugfs.c +0
-2@@ -2020,8 +1885,6 @@ static const struct i915_debugfs_files { {"i915_error_state", &i915_error_state_fops}, {"i915_gpu_info", &i915_gpu_info_fops}, #endif - {"i915_guc_log_level", &i915_guc_log_level_fops}, - {"i915_guc_log_relay", &i915_guc_log_relay_fops}, }; int i915_debugfs_register(struct drm_i915_private *dev_priv)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 6/6 drm/i915/uc: do not free err log on uc_fini
In reply to Daniele Ceraolo Spuriowe do call uc_fini if there is an issue while loading the GuC, so we can't delete in there the logs we need to debug the load failure. Moving the log free to driver remove ensures the logs stick around ong enough for us to dump them.
--- drivers/gpu/drm/i915/gt/intel_gt.c | 3 +-- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +++++++-- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_gt.c +1 -2
@@ -635,8 +635,7 @@ void intel_gt_driver_remove(struct intel_gt *gt) {__intel_gt_disable (gt); -intel_uc_fini_hw (>->uc); -intel_uc_fini (>->uc); +intel_uc_driver_remove (>->uc);intel_engines_release (gt); }
drivers/gpu/drm/i915/gt/uc/intel_uc.c +7 -2
@@ -131,6 +131,13 @@ static void __uc_free_load_err_log(struct intel_uc *uc)i915_gem_object_put (log); } +void intel_uc_driver_remove (struct intel_uc *uc) +{ +intel_uc_fini_hw (uc); +intel_uc_fini (uc); +__uc_free_load_err_log (uc); +} +static inline bool guc_communication_enabled (struct intel_guc *guc) {return intel_guc_ct_enabled (&guc->ct);
@@ -311,8 +318,6 @@ static void __uc_fini(struct intel_uc *uc) {intel_huc_fini (&uc->huc);intel_guc_fini (&uc->guc); - -__uc_free_load_err_log (uc); }static int __uc_sanitize (struct intel_uc *uc)
drivers/gpu/drm/i915/gt/uc/intel_uc.h +1 -0
@@ -34,6 +34,7 @@ struct intel_uc {void intel_uc_init_early (struct intel_uc *uc);void intel_uc_driver_late_release (struct intel_uc *uc); +void intel_uc_driver_remove (struct intel_uc *uc);void intel_uc_init_mmio (struct intel_uc *uc);void intel_uc_reset_prepare (struct intel_uc *uc);void intel_uc_suspend (struct intel_uc *uc);
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini
Quoted 4 lines · Daniele Ceraolo Spurio
we do call
uc_finiif there is an issue while loading the GuC, so we can't delete in there the logs we need to debug the load failure. Moving the log free to driver remove ensures the logs stick around ong enough for us to dump them.
I think this could be worded better and has a couple of typos.
Otherwise it looks plausible.
Quoted 54 lines
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>--- drivers/gpu/drm/i915/gt/intel_gt.c | 3 +-- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +++++++-- drivers/gpu/drm/i915/gt/uc/intel_uc.h | 1 + 3 files changed, 9 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/gt/intel_gt.c +1
-2@@ -635,8 +635,7 @@ void intel_gt_driver_remove(struct intel_gt *gt) {__intel_gt_disable (gt); -intel_uc_fini_hw (>->uc); -intel_uc_fini (>->uc); +intel_uc_driver_remove (>->uc);intel_engines_release (gt); }drivers/gpu/drm/i915/gt/uc/intel_uc.c +7
-2@@ -131,6 +131,13 @@ static void __uc_free_load_err_log(struct intel_uc *uc)i915_gem_object_put (log); } +void intel_uc_driver_remove (struct intel_uc *uc) +{ +intel_uc_fini_hw (uc); +intel_uc_fini (uc); +__uc_free_load_err_log (uc); +} +static inline bool guc_communication_enabled (struct intel_guc *guc) {return intel_guc_ct_enabled (&guc->ct);@@ -311,8 +318,6 @@ static void __uc_fini(struct intel_uc *uc) {intel_huc_fini (&uc->huc);intel_guc_fini (&uc->guc); - -__uc_free_load_err_log (uc); }static int __uc_sanitize (struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc.h +0
-0
drivers/gpu/drm/i915/gt/uc/intel_uc.h struct intel_uc { · line 40
Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_uc.h +1
-0@@ -34,6 +34,7 @@ struct intel_uc {void intel_uc_init_early (struct intel_uc *uc);void intel_uc_driver_late_release (struct intel_uc *uc); +void intel_uc_driver_remove (struct intel_uc *uc);void intel_uc_init_mmio (struct intel_uc *uc);void intel_uc_reset_prepare (struct intel_uc *uc);void intel_uc_suspend (struct intel_uc *uc);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini
Quoted 7 lines · John Harrison
Quoted 4 lines · Daniele Ceraolo Spurio
we do call
uc_finiif there is an issue while loading the GuC, so we can't delete in there the logs we need to debug the load failure. Moving the log free to driver remove ensures the logs stick around ong enough for us to dump them.I think this could be worded better and has a couple of typos.
How about:
"We need to keep the GuC error logs around to debug the load failure, so we can't clean them in the error unwind, which includes uc_fini(). Moving the cleanup to driver remove ensures that the logs stick around long enough for us to dump them."
?
Daniele
Quoted 52 lines
Otherwise it looks plausible.
Reviewed-by John Harrison <[email protected]>Quoted 49 lines
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>---
drivers/gpu/drm/i915/gt/intel_gt.c | 3 +--drivers/gpu/drm/i915/gt/uc/intel_uc.c| 9 +++++++--drivers/gpu/drm/i915/gt/uc/intel_uc.h| 1 +3 files changed, 9 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/gt/intel_gt.c +1
-2@@ -635,8 +635,7 @@ void intel_gt_driver_remove(struct intel_gt *gt) { __intel_gt_disable(gt); - intel_uc_fini_hw(>->uc); - intel_uc_fini(>->uc); + intel_uc_driver_remove(>->uc); intel_engines_release(gt); }drivers/gpu/drm/i915/gt/uc/intel_uc.c +7
-2@@ -131,6 +131,13 @@ static void __uc_free_load_err_log(struct intel_uc *uc) i915_gem_object_put(log); } +void intel_uc_driver_remove (struct intel_uc *uc) +{ + intel_uc_fini_hw(uc); + intel_uc_fini(uc); + __uc_free_load_err_log(uc); +} + static inline bool guc_communication_enabled(struct intel_guc *guc) { return intel_guc_ct_enabled(&guc->ct);@@ -311,8 +318,6 @@ static void __uc_fini(struct intel_uc *uc) { intel_huc_fini(&uc->huc); intel_guc_fini(&uc->guc); - - __uc_free_load_err_log(uc); } static int __uc_sanitize(struct intel_uc *uc)drivers/gpu/drm/i915/gt/uc/intel_uc.h +0
-1--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.h
Quoted 9 lines
drivers/gpu/drm/i915/gt/uc/intel_uc.h struct intel_uc { · line 39
Quoted 8 lines
+++
b/drivers/gpu/drm/i915/gt/uc/intel_uc.hdrivers/gpu/drm/i915/gt/uc/intel_uc.h +1
-0@@ -34,6 +34,7 @@ struct intel_uc { void intel_uc_init_early(struct intel_uc *uc); void intel_uc_driver_late_release(struct intel_uc *uc); +void intel_uc_driver_remove (struct intel_uc *uc); void intel_uc_init_mmio(struct intel_uc *uc); void intel_uc_reset_prepare(struct intel_uc *uc); void intel_uc_suspend(struct intel_uc *uc);
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
John Harrison
Reviewed-byRe: [Intel-gfx] [PATCH v2 6/6] drm/i915/uc: do not free err log on uc_fini
Quoted 9 lines · Daniele Ceraolo Spurio
Quoted 7 lines · John Harrison
Quoted 4 lines · Daniele Ceraolo Spurio
we do call
uc_finiif there is an issue while loading the GuC, so we can't delete in there the logs we need to debug the load failure. Moving the log free to driver remove ensures the logs stick around ong enough for us to dump them.I think this could be worded better and has a couple of typos.
Quoted 8 lines
How about:
"We need to keep the GuC error logs around to debug the load failure, so we can't clean them in the error unwind, which includes
uc_fini(). Moving the cleanup to driver remove ensures that the logs stick around long enough for us to dump them."?
Daniele
Sounds good to me :).
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Re-org uC debugfs files and move them under GT (rev2)
In reply to Daniele Ceraolo Spurio== Series Details ==
== Series Details ==
Series: Re-org uC debugfs files and move them under GT (rev2)
URL : https://patchwork.freedesktop.org/series/74051/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip aafc4bae71e6 drm/i915/gt: allow setting generic data pointer c507de64233a drm/i915/guc: drop stage_pool debugfs e2f026753f0c drm/i915/huc: make "support huc" reflect HW capabilities eb62f33d1e3e drm/i915/debugfs: move uC printers and update debugfs file names 80d6283445a8 drm/i915/uc: Move uC debugfs to its own folder under GT -:73: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #73: new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 512 lines checked 740eb468d044 drm/i915/uc: do not free err log on uc_fini
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Re-org uC debugfs files and move them under GT (rev2)
In reply to Daniele Ceraolo Spurio== Series Details ==
== Series Details ==
Series: Re-org uC debugfs files and move them under GT (rev2)
URL : https://patchwork.freedesktop.org/series/74051/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915/gt: allow setting generic data pointer Okay!
Commit: drm/i915/guc: drop stage_pool debugfs
Okay!
Commit: drm/i915/huc: make "support huc" reflect HW capabilities Okay!
Commit: drm/i915/debugfs: move uC printers and update debugfs file names Okay!
Commit: drm/i915/uc: Move uC debugfs to its own folder under GT+drivers/gpu/drm/i915/gt/uc/debugfs_guc.c:31:6: warning: symbol 'intel_guc_debugfs_register' was not declared. Should it be static? +drivers/gpu/drm/i915/gt/uc/debugfs_guc_log.c:109:6: warning: symbol 'intel_guc_log_debugfs_register' was not declared. Should it be static? +drivers/gpu/drm/i915/gt/uc/debugfs_huc.c:26:6: warning: symbol 'intel_huc_debugfs_register' was not declared. Should it be static?
Commit: drm/i915/uc: do not free err log on uc_fini Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for Re-org uC debugfs files and move them under GT (rev2)
In reply to Daniele Ceraolo Spurio== Series Details ==
== Series Details ==
Series: Re-org uC debugfs files and move them under GT (rev2)
URL : https://patchwork.freedesktop.org/series/74051/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8125 -> Patchwork_16944
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/index.html
Known issues
------------
Here are the changes found in Patchwork_16944 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@blt:
- fi-bsw-n3050: [PASS][1] -> [INCOMPLETE][2] ([i915#392])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-bsw-n3050/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-bsw-n3050/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bxt-dsi: [PASS][3] -> [INCOMPLETE][4] ([fdo#103927])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-bxt-dsi/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-bxt-dsi/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gem_contexts:
- fi-cfl-8700k: [PASS][5] -> [DMESG-FAIL][6] ([i915#730])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- fi-apl-guc: [INCOMPLETE][7] ([fdo#103927]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-apl-guc/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-apl-guc/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@hangcheck:
- fi-apl-guc: [DMESG-WARN][9] ([i915#1430]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-apl-guc/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-apl-guc/igt@i915_selftest@[email protected]
#### Warnings ####
* igt@gem_exec_suspend@basic-s4-devices:
- fi-tgl-y: [FAIL][11] ([CI#94]) -> [INCOMPLETE][12] ([CI#94] / [i915#460])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-tgl-y/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-tgl-y/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][13] ([fdo#111407]) -> [FAIL][14] ([i915#323])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/fi-kbl-7500u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/fi-kbl-7500u/igt@[email protected]
[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[i915#1430]: https://gitlab.freedesktop.org/drm/intel/issues/1430
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#392]: https://gitlab.freedesktop.org/drm/intel/issues/392
[i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
[i915#730]: https://gitlab.freedesktop.org/drm/intel/issues/730
Participating hosts (46 -> 41)
------------------------------
Additional (1): fi-skl-6770hq
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bsw-kefka fi-byt-clapper
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8125 -> Patchwork_16944
CI-20190529: 20190529
CI_DRM_8125: 8fc697c3de927ae930efead8fd43032c6e5f5094 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5505: 8973d811f3fdfb4ace4aabab2095ce0309881648 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16944: 740eb468d0446ff06077ca885ea2ef570b737ba8 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
740eb468d044 drm/i915/uc: do not free err log on uc_fini 80d6283445a8 drm/i915/uc: Move uC debugfs to its own folder under GT eb62f33d1e3e drm/i915/debugfs: move uC printers and update debugfs file names e2f026753f0c drm/i915/huc: make "support huc" reflect HW capabilities c507de64233a drm/i915/guc: drop stage_pool debugfsaafc4bae71e6 drm/i915/gt: allow setting generic data pointer
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for Re-org uC debugfs files and move them under GT (rev2)
In reply to Daniele Ceraolo Spurio== Series Details ==
== Series Details ==
Series: Re-org uC debugfs files and move them under GT (rev2)
URL : https://patchwork.freedesktop.org/series/74051/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8125_full -> Patchwork_16944_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_16944_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-kbl: [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-kbl3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-kbl2/igt@[email protected]
* igt@gem_ctx_persistence@close-replace-race:
- shard-iclb: [PASS][3] -> [INCOMPLETE][4] ([i915#1402])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb3/igt@[email protected]
* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb5/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@implicit-read-write-bsd1:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276] / [i915#677]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb5/igt@[email protected]
* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109276]) +16 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb8/igt@[email protected]
* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [PASS][11] -> [SKIP][12] ([i915#677]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#112146]) +7 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb6/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@[email protected]
* igt@gem_exec_whisper@basic-contexts-forked-all:
- shard-snb: [PASS][15] -> [INCOMPLETE][16] ([i915#82])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-snb5/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-snb5/igt@[email protected]
* igt@gem_exec_whisper@basic-fds-forked:
- shard-tglb: [PASS][17] -> [TIMEOUT][18] ([i915#1408])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-tglb6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-tglb3/igt@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-skl: [PASS][19] -> [INCOMPLETE][20] ([i915#69])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl3/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][21] -> [DMESG-WARN][22] ([i915#180])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl8/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl6/igt@[email protected]
* igt@i915_pm_rps@waitboost:
- shard-tglb: [PASS][23] -> [FAIL][24] ([i915#413])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-tglb1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-tglb2/igt@[email protected]
- shard-iclb: [PASS][25] -> [FAIL][26] ([i915#413])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@[email protected]
* igt@i915_selftest@live@execlists:
- shard-apl: [PASS][27] -> [INCOMPLETE][28] ([fdo#103927] / [i915#656])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl6/igt@i915_selftest@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl4/igt@i915_selftest@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-256x256-random:
- shard-skl: [PASS][29] -> [FAIL][30] ([i915#54])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl4/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl10/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [PASS][31] -> [FAIL][32] ([i915#72])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-glk3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-glk2/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-toggle:
- shard-hsw: [PASS][33] -> [FAIL][34] ([IGT#5])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-hsw7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-hsw5/igt@[email protected]
* igt@kms_flip@flip-vs-dpms-off-vs-modeset:
- shard-hsw: [PASS][35] -> [INCOMPLETE][36] ([i915#61])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-hsw4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-hsw7/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: [PASS][37] -> [FAIL][38] ([i915#34])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl9/igt@[email protected]
* igt@kms_flip_tiling@flip-x-tiled:
- shard-skl: [PASS][39] -> [FAIL][40] ([fdo#108145] / [i915#699])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl10/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt:
- shard-skl: [PASS][41] -> [FAIL][42] ([i915#49])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl9/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl4/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-mmap-gtt.html
* igt@kms_hdr@bpc-switch:
- shard-skl: [PASS][43] -> [FAIL][44] ([i915#1188])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl10/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl5/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][45] -> [FAIL][46] ([fdo#108145]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl10/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [PASS][47] -> [SKIP][48] ([fdo#109441]) +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb5/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@perf_pmu@busy-accuracy-98-vcs1:
- shard-iclb: [PASS][49] -> [SKIP][50] ([fdo#112080]) +16 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb7/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@vcs0-s3:
- shard-skl: [INCOMPLETE][51] ([i915#146] / [i915#69]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl5/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl6/igt@[email protected]
* igt@gem_ctx_persistence@close-replace-race:
- shard-tglb: [INCOMPLETE][53] ([i915#1402]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-tglb5/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-tglb2/igt@[email protected]
- shard-kbl: [INCOMPLETE][55] ([i915#1402]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-kbl4/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-kbl4/igt@[email protected]
- shard-apl: [INCOMPLETE][57] ([fdo#103927] / [i915#1402]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl3/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl1/igt@[email protected]
* igt@gem_exec_parallel@vcs1-fds:
- shard-iclb: [SKIP][59] ([fdo#112080]) -> [PASS][60] +15 similar issues
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@implicit-read-write-bsd2:
- shard-iclb: [SKIP][61] ([fdo#109276] / [i915#677]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb8/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@preempt-other-chain-bsd:
- shard-iclb: [SKIP][63] ([fdo#112146]) -> [PASS][64] +4 similar issues
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb4/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb6/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- shard-kbl: [DMESG-WARN][65] ([i915#180]) -> [PASS][66] +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-kbl6/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-kbl3/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][67] ([i915#644]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-glk4/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-glk8/igt@[email protected]
* igt@i915_pm_dc@dc5-dpms:
- shard-iclb: [FAIL][69] ([i915#447]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb3/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb6/igt@[email protected]
* igt@i915_selftest@live@execlists:
- shard-skl: [INCOMPLETE][71] ([i915#1430] / [i915#656]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl5/igt@i915_selftest@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl2/igt@i915_selftest@[email protected]
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-apl: [DMESG-WARN][73] ([i915#180]) -> [PASS][74] +5 similar issues
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl6/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl2/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-skl: [INCOMPLETE][75] ([i915#300]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl4/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl6/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][77] ([i915#61]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-hsw2/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-hsw1/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][79] ([i915#1188]) -> [PASS][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl2/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][81] ([fdo#108145] / [i915#265]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl9/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl4/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-glk: [FAIL][83] ([i915#899]) -> [PASS][84] +1 similar issue
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-glk5/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-glk9/igt@[email protected]
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][85] ([fdo#109441]) -> [PASS][86] +2 similar issues
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb5/igt@kms_psr@psr2_primary_mmap_cpu.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@perf@gen8-unprivileged-single-ctx-counters:
- shard-skl: [TIMEOUT][87] ([fdo#111732]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-skl6/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-skl7/igt@[email protected]
* igt@prime_busy@hang-bsd2:
- shard-iclb: [SKIP][89] ([fdo#109276]) -> [PASS][90] +29 similar issues
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-iclb8/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-iclb4/igt@[email protected]
#### Warnings ####
* igt@gem_linear_blits@normal:
- shard-apl: [TIMEOUT][91] ([fdo#111732] / [i915#1322]) -> [TIMEOUT][92] ([i915#1322])
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl4/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl3/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [FAIL][93] ([i915#46]) -> [FAIL][94] ([i915#79])
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-glk9/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-glk7/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: ([FAIL][95], [FAIL][96]) ([i915#1389] / [i915#1402] / [i915#92]) -> [FAIL][97] ([i915#92])
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-kbl4/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-kbl4/igt@[email protected]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-kbl6/igt@[email protected]
- shard-apl: ([FAIL][98], [FAIL][99]) ([fdo#103927] / [i915#1402]) -> ([FAIL][100], [FAIL][101]) ([fdo#103927] / [i915#529])
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl8/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8125/shard-apl3/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl8/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/shard-apl4/igt@[email protected]
[IGT#5]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/5
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1322]: https://gitlab.freedesktop.org/drm/intel/issues/1322
[i915#1389]: https://gitlab.freedesktop.org/drm/intel/issues/1389
[i915#1402]: https://gitlab.freedesktop.org/drm/intel/issues/1402
[i915#1408]: https://gitlab.freedesktop.org/drm/intel/issues/1408
[i915#1430]: https://gitlab.freedesktop.org/drm/intel/issues/1430
[i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#447]: https://gitlab.freedesktop.org/drm/intel/issues/447
[i915#46]: https://gitlab.freedesktop.org/drm/intel/issues/46
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#529]: https://gitlab.freedesktop.org/drm/intel/issues/529
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8125 -> Patchwork_16944
CI-20190529: 20190529
CI_DRM_8125: 8fc697c3de927ae930efead8fd43032c6e5f5094 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5505: 8973d811f3fdfb4ace4aabab2095ce0309881648 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16944: 740eb468d0446ff06077ca885ea2ef570b737ba8 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16944/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Daniele,
Quoted 16 lines · Daniele Ceraolo Spurio
Rebased on top of Andi's patch. Note that some discussion is still ongoing on that patch.
Also dropped the patch that caused a const->non-const conversion and fixed a couple of bugs:
- keep printingHUC_STATUSregister
- correcly set permissions for writable debugfs filesCc Andi Shyti <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Andi Shyti (1):
drm/i915/gt: allow setting generic data pointer
Quoted 6 lines
Daniele Ceraolo Spurio (5):
drm/i915/guc: dropstage_pooldebugfs
drm/i915/huc: make "support huc" reflect HW capabilities drm/i915/debugfs: move uC printers and update debugfs file names drm/i915/uc: Move uC debugfs to its own folder under GT drm/i915/uc: do not free err log onuc_fini
is this series getting in at some point or shall I take this series over?
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 26 lines · Andi Shyti
Hi Daniele,
Quoted 16 lines · Daniele Ceraolo Spurio
Rebased on top of Andi's patch. Note that some discussion is still ongoing on that patch.
Also dropped the patch that caused a const->non-const conversion and fixed a couple of bugs:
- keep printingHUC_STATUSregister
- correcly set permissions for writable debugfs filesCc Andi Shyti <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc John Harrison <[email protected]>Cc Matthew Brost <[email protected]>Andi Shyti (1):
drm/i915/gt: allow setting generic data pointerQuoted 6 lines
Daniele Ceraolo Spurio (5):
drm/i915/guc: dropstage_pooldebugfs
drm/i915/huc: make "support huc" reflect HW capabilities drm/i915/debugfs: move uC printers and update debugfs file names drm/i915/uc: Move uC debugfs to its own folder under GT drm/i915/uc: do not free err log onuc_fini
Quoted 3 lines
is this series getting in at some point or shall I take this series over?
I've been waiting for a review of the changes on the GuC side (and I've already sent a ping twice). I'm ok if you want to take over and integrate these in your series in the meantime, just keep in mind that I might have to update them if there are negative comments.
Daniele
Quoted 2 lines
Andi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx