mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: add hal.gr.init hals to get global cb sizes
Remove below variables from struct gr_gk20a u32 bundle_cb_default_size; u32 min_gpm_fifo_depth; u32 bundle_cb_token_limit; u32 attrib_cb_default_size; u32 alpha_cb_default_size; u32 attrib_cb_gfxp_default_size; u32 attrib_cb_gfxp_size; u32 attrib_cb_size; u32 alpha_cb_size; Instead add below hals in hal.gr.init unit to get all of above sizes u32 (*get_bundle_cb_default_size)(struct gk20a *g); u32 (*get_min_gpm_fifo_depth)(struct gk20a *g); u32 (*get_bundle_cb_token_limit)(struct gk20a *g); u32 (*get_attrib_cb_default_size)(struct gk20a *g); u32 (*get_alpha_cb_default_size)(struct gk20a *g); u32 (*get_attrib_cb_gfxp_default_size)(struct gk20a *g); u32 (*get_attrib_cb_gfxp_size)(struct gk20a *g); u32 (*get_attrib_cb_size)(struct gk20a *g, u32 tpc_count); u32 (*get_alpha_cb_size)(struct gk20a *g, u32 tpc_count); u32 (*get_global_attr_cb_size)(struct gk20a *g, u32 max_tpc); Define these hals for all gm20b/gp10b/gv11b/gv100/tu104 chips Also add hal.gr.init support for gv100 chip Remove all accesses to variables from struct gr_gk20a and start using newly defined hals Remove below hals to initialize sizes since they are no more required g->ops.gr.bundle_cb_defaults(g); g->ops.gr.cb_size_default(g); g->ops.gr.calc_global_ctx_buffer_size(g); Also remove definitions of above hals from all the chip files Jira NVGPU-2961 Change-Id: I130b578ababf22328d68fe19df581e46aebeccc9 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2077214 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
7abb0324b4
commit
4c8aadf83c
@@ -17,14 +17,39 @@
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
int gr_gk20a_debugfs_init(struct gk20a *g)
|
||||
static int gr_default_attrib_cb_size_show(struct seq_file *s, void *data)
|
||||
{
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
struct gk20a *g = s->private;
|
||||
|
||||
l->debugfs_gr_default_attrib_cb_size =
|
||||
debugfs_create_u32("gr_default_attrib_cb_size",
|
||||
S_IRUGO|S_IWUSR, l->debugfs,
|
||||
&g->gr.attrib_cb_default_size);
|
||||
seq_printf(s, "%u\n", g->ops.gr.init.get_attrib_cb_default_size(g));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gr_default_attrib_cb_size_open(struct inode *inode,
|
||||
struct file *file)
|
||||
{
|
||||
return single_open(file, gr_default_attrib_cb_size_show,
|
||||
inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations gr_default_attrib_cb_size_fops= {
|
||||
.open = gr_default_attrib_cb_size_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
int gr_gk20a_debugfs_init(struct gk20a *g)
|
||||
{
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
struct dentry *d;
|
||||
|
||||
d = debugfs_create_file(
|
||||
"gr_default_attrib_cb_size", S_IRUGO, l->debugfs, g,
|
||||
&gr_default_attrib_cb_size_fops);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,6 @@ struct nvgpu_os_linux {
|
||||
struct dentry *debugfs_timeouts_enabled;
|
||||
struct dentry *debugfs_gr_idle_timeout_default;
|
||||
struct dentry *debugfs_disable_bigpage;
|
||||
struct dentry *debugfs_gr_default_attrib_cb_size;
|
||||
|
||||
struct dentry *debugfs_timeslice_low_priority_us;
|
||||
struct dentry *debugfs_timeslice_medium_priority_us;
|
||||
|
||||
Reference in New Issue
Block a user