mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drm/tegra: move debug support under CONFIG_DEBUG_FS
Move debug specific code portions in virt.c under CONFIG_DEBUG_FS config. Jira HOSTX-5885 Change-Id: Icd90deb7c556ce100c0ee61d69719bde902514d5 Signed-off-by: Santosh BS <santoshb@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295412 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -55,7 +55,9 @@ struct virt_engine {
|
|||||||
struct device *dev;
|
struct device *dev;
|
||||||
int connection_id;
|
int connection_id;
|
||||||
struct tegra_drm_client client;
|
struct tegra_drm_client client;
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
struct dentry *actmon_debugfs_dir;
|
struct dentry *actmon_debugfs_dir;
|
||||||
|
#endif
|
||||||
struct kobject kobj;
|
struct kobject kobj;
|
||||||
struct kobj_attribute powermode_attr;
|
struct kobj_attribute powermode_attr;
|
||||||
u32 powermode;
|
u32 powermode;
|
||||||
@@ -291,6 +293,7 @@ static int virt_engine_power_mode_change(struct virt_engine *virt, u32 ip_op_mod
|
|||||||
return virt_engine_transfer(&msg, sizeof(msg));
|
return virt_engine_transfer(&msg, sizeof(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
static int mrq_debug_open(struct tegra_bpmp *bpmp, const char *name,
|
static int mrq_debug_open(struct tegra_bpmp *bpmp, const char *name,
|
||||||
u32 *fd, u32 *len, bool write)
|
u32 *fd, u32 *len, bool write)
|
||||||
{
|
{
|
||||||
@@ -557,6 +560,7 @@ static void virt_engine_cleanup_actmon_debugfs(struct virt_engine *virt)
|
|||||||
{
|
{
|
||||||
debugfs_remove_recursive(virt->actmon_debugfs_dir);
|
debugfs_remove_recursive(virt->actmon_debugfs_dir);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static ssize_t virt_engine_powermode_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
|
static ssize_t virt_engine_powermode_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
@@ -802,7 +806,9 @@ static int virt_engine_probe(struct platform_device *pdev)
|
|||||||
goto cleanup_ivc;
|
goto cleanup_ivc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
virt_engine_setup_actmon_debugfs(virt);
|
virt_engine_setup_actmon_debugfs(virt);
|
||||||
|
#endif
|
||||||
virt_engine_sysfs_init(virt);
|
virt_engine_sysfs_init(virt);
|
||||||
|
|
||||||
#ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
#ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||||
@@ -850,7 +856,9 @@ static int virt_engine_remove(struct platform_device *pdev)
|
|||||||
tegra_soc_hwpm_ip_unregister(&hwpm_ip_ops);
|
tegra_soc_hwpm_ip_unregister(&hwpm_ip_ops);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
virt_engine_cleanup_actmon_debugfs(virt_engine);
|
virt_engine_cleanup_actmon_debugfs(virt_engine);
|
||||||
|
#endif
|
||||||
virt_engine_sysfs_exit(virt_engine);
|
virt_engine_sysfs_exit(virt_engine);
|
||||||
virt_engine_cleanup();
|
virt_engine_cleanup();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user