mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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>
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2017 NVIDIA Corporation. All rights reserved.
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#include "debug_gr.h"
|
|
#include "os_linux.h"
|
|
|
|
#include <linux/debugfs.h>
|
|
|
|
static int gr_default_attrib_cb_size_show(struct seq_file *s, void *data)
|
|
{
|
|
struct gk20a *g = s->private;
|
|
|
|
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;
|
|
}
|
|
|