disp: msm: sde: provide rm status through debugfs node
Provide rm status through debugfs node. cat /d/dri/0/debug/rm_status. Change-Id: Ic1950b1881f0b57582701a342793aa06adb9da39 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
@@ -154,6 +154,7 @@ static int _sde_debugfs_init(struct sde_kms *sde_kms)
|
|||||||
SDE_ERROR("failed to init perf %d\n", rc);
|
SDE_ERROR("failed to init perf %d\n", rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
sde_rm_debugfs_init(&sde_kms->rm, debugfs_root);
|
||||||
|
|
||||||
if (sde_kms->catalog->qdss_count)
|
if (sde_kms->catalog->qdss_count)
|
||||||
debugfs_create_u32("qdss", 0600, debugfs_root,
|
debugfs_create_u32("qdss", 0600, debugfs_root,
|
||||||
|
@@ -101,6 +101,22 @@ static const struct sde_rm_topology_def g_top_table_v1[SDE_RM_TOPOLOGY_MAX] = {
|
|||||||
MSM_DISPLAY_COMPRESSION_DSC },
|
MSM_DISPLAY_COMPRESSION_DSC },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char sde_hw_blk_str[SDE_HW_BLK_MAX][SDE_HW_BLK_NAME_LEN] = {
|
||||||
|
"top",
|
||||||
|
"sspp",
|
||||||
|
"lm",
|
||||||
|
"dspp",
|
||||||
|
"ds",
|
||||||
|
"ctl",
|
||||||
|
"cdm",
|
||||||
|
"pingpong",
|
||||||
|
"intf",
|
||||||
|
"wb",
|
||||||
|
"dsc",
|
||||||
|
"vdc",
|
||||||
|
"merge_3d",
|
||||||
|
"qdss",
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct sde_rm_requirements - Reservation requirements parameter bundle
|
* struct sde_rm_requirements - Reservation requirements parameter bundle
|
||||||
@@ -724,6 +740,54 @@ fail:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_FS
|
||||||
|
static int _sde_rm_status_show(struct seq_file *s, void *data)
|
||||||
|
{
|
||||||
|
struct sde_rm *rm;
|
||||||
|
struct sde_rm_hw_blk *blk;
|
||||||
|
u32 type, allocated, unallocated;
|
||||||
|
|
||||||
|
if (!s || !s->private)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
rm = s->private;
|
||||||
|
for (type = SDE_HW_BLK_LM; type < SDE_HW_BLK_MAX; type++) {
|
||||||
|
allocated = 0;
|
||||||
|
unallocated = 0;
|
||||||
|
list_for_each_entry(blk, &rm->hw_blks[type], list) {
|
||||||
|
if (!blk->rsvp && !blk->rsvp_nxt)
|
||||||
|
unallocated++;
|
||||||
|
else
|
||||||
|
allocated++;
|
||||||
|
}
|
||||||
|
seq_printf(s, "type:%d blk:%s allocated:%d unallocated:%d\n",
|
||||||
|
type, sde_hw_blk_str[type], allocated, unallocated);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int _sde_rm_debugfs_status_open(struct inode *inode,
|
||||||
|
struct file *file)
|
||||||
|
{
|
||||||
|
return single_open(file, _sde_rm_status_show, inode->i_private);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sde_rm_debugfs_init(struct sde_rm *sde_rm, struct dentry *parent)
|
||||||
|
{
|
||||||
|
static const struct file_operations debugfs_rm_status_fops = {
|
||||||
|
.open = _sde_rm_debugfs_status_open,
|
||||||
|
.read = seq_read,
|
||||||
|
};
|
||||||
|
|
||||||
|
debugfs_create_file("rm_status", 0400, parent, sde_rm, &debugfs_rm_status_fops);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void sde_rm_debugfs_init(struct sde_rm *rm, struct dentry *parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int sde_rm_init(struct sde_rm *rm,
|
int sde_rm_init(struct sde_rm *rm,
|
||||||
struct sde_mdss_cfg *cat,
|
struct sde_mdss_cfg *cat,
|
||||||
void __iomem *mmio,
|
void __iomem *mmio,
|
||||||
|
@@ -215,6 +215,12 @@ struct sde_rm_hw_request {
|
|||||||
enum sde_rm_topology_name sde_rm_get_topology_name(struct sde_rm *rm,
|
enum sde_rm_topology_name sde_rm_get_topology_name(struct sde_rm *rm,
|
||||||
struct msm_display_topology topology);
|
struct msm_display_topology topology);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sde_rm_debugfs_init - setup debugfs node for rm module
|
||||||
|
* @rm: SDE resource manager handle
|
||||||
|
* @parent: debugfs parent directory node
|
||||||
|
*/
|
||||||
|
void sde_rm_debugfs_init(struct sde_rm *rm, struct dentry *parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sde_rm_init - Read hardware catalog and create reservation tracking objects
|
* sde_rm_init - Read hardware catalog and create reservation tracking objects
|
||||||
|
Reference in New Issue
Block a user