mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: use struct gk20a for create_gr_sysfs
API gr_gv11b_create_sysfs() and GR HAL create_gr_sysfs() right now receive linux specific struct device But since this function is called from/declared in common code, we need to remove linux dependency from it Hence update the API and GR HAL to receive struct gk20a pointer instead of device pointer Jira NVGPU-259 Change-Id: I65d717ad9f263f0397f8efa5761c64e55c7846eb Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1588465 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> 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
730ba218c1
commit
e5c3b05bb2
@@ -80,7 +80,7 @@ int gr_gv11b_alloc_buffer(struct vm_gk20a *vm, size_t size,
|
||||
/*zcull*/
|
||||
void gr_gv11b_program_zcull_mapping(struct gk20a *g, u32 zcull_num_entries,
|
||||
u32 *zcull_map_tiles);
|
||||
void gr_gv11b_create_sysfs(struct device *dev);
|
||||
void gr_gv11b_create_sysfs(struct gk20a *g);
|
||||
|
||||
bool gr_gv11b_is_valid_class(struct gk20a *g, u32 class_num);
|
||||
bool gr_gv11b_is_valid_gfx_class(struct gk20a *g, u32 class_num);
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "gp10b/platform_gp10b.h"
|
||||
#include "common/linux/platform_gp10b_tegra.h"
|
||||
|
||||
#include "common/linux/os_linux.h"
|
||||
#include "common/linux/platform_gk20a_tegra.h"
|
||||
#include "gr_gv11b.h"
|
||||
#include "nvgpu_gpuid_t19x.h"
|
||||
@@ -188,9 +189,9 @@ static struct device_attribute *dev_attr_mmu_hubtlb_ecc_uncorrected_err_count_ar
|
||||
static struct device_attribute *dev_attr_mmu_fillunit_ecc_corrected_err_count_array;
|
||||
static struct device_attribute *dev_attr_mmu_fillunit_ecc_uncorrected_err_count_array;
|
||||
|
||||
void gr_gv11b_create_sysfs(struct device *dev)
|
||||
void gr_gv11b_create_sysfs(struct gk20a *g)
|
||||
{
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
struct device *dev = dev_from_gk20a(g);
|
||||
int error = 0;
|
||||
/* This stat creation function is called on GR init. GR can get
|
||||
initialized multiple times but we only need to create the ECC
|
||||
@@ -199,7 +200,7 @@ void gr_gv11b_create_sysfs(struct device *dev)
|
||||
if (g->ecc.gr.t19x.sm_l1_tag_corrected_err_count.counters != NULL)
|
||||
return;
|
||||
|
||||
gr_gp10b_create_sysfs(dev);
|
||||
gr_gp10b_create_sysfs(g);
|
||||
|
||||
error |= gr_gp10b_ecc_stat_create(dev,
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user