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. v3: Rename files (Michal), remove blank line (Jani), fix sparse warns. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Tony Ye <tony.ye@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com> #v2 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200326181121.16869-6-daniele.ceraolospurio@intel.com
31 lines
618 B
C
31 lines
618 B
C
// SPDX-License-Identifier: MIT
|
|
/*
|
|
* Copyright © 2020 Intel Corporation
|
|
*/
|
|
|
|
#include <linux/debugfs.h>
|
|
|
|
#include "intel_guc_debugfs.h"
|
|
#include "intel_huc_debugfs.h"
|
|
#include "intel_uc.h"
|
|
#include "intel_uc_debugfs.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);
|
|
}
|