mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: use struct gk20a for create_gr_sysfs
API gr_gp10b_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: I7effa16407d47a2ab5f9562ec4a4dec975a32d6c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1588464 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
00b255cf43
commit
0aa4cea63b
@@ -31,6 +31,8 @@
|
||||
#include <nvgpu/hashtable.h>
|
||||
#include <nvgpu/nvhost.h>
|
||||
|
||||
#include "os_linux.h"
|
||||
|
||||
#include "clk.h"
|
||||
|
||||
#include "gk20a/platform_gk20a.h"
|
||||
@@ -610,10 +612,10 @@ void gp10b_ecc_stat_remove(struct device *dev,
|
||||
nvgpu_kfree(g, dev_attr_array);
|
||||
}
|
||||
|
||||
void gr_gp10b_create_sysfs(struct device *dev)
|
||||
void gr_gp10b_create_sysfs(struct gk20a *g)
|
||||
{
|
||||
int error = 0;
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
struct device *dev = dev_from_gk20a(g);
|
||||
|
||||
/* This stat creation function is called on GR init. GR can get
|
||||
initialized multiple times but we only need to create the ECC
|
||||
|
||||
@@ -356,7 +356,7 @@ struct gpu_ops {
|
||||
u32 gpc_exception);
|
||||
void (*enable_gpc_exceptions)(struct gk20a *g);
|
||||
void (*enable_exceptions)(struct gk20a *g);
|
||||
void (*create_gr_sysfs)(struct device *dev);
|
||||
void (*create_gr_sysfs)(struct gk20a *g);
|
||||
u32 (*get_lrf_tex_ltc_dram_override)(struct gk20a *g);
|
||||
int (*record_sm_error_state)(struct gk20a *g,
|
||||
u32 gpc, u32 tpc);
|
||||
|
||||
@@ -4865,7 +4865,7 @@ static int gk20a_init_gr_setup_sw(struct gk20a *g)
|
||||
gr->sw_ready = true;
|
||||
|
||||
if (g->ops.gr.create_gr_sysfs)
|
||||
g->ops.gr.create_gr_sysfs(dev_from_gk20a(g));
|
||||
g->ops.gr.create_gr_sysfs(g);
|
||||
|
||||
gk20a_dbg_fn("done");
|
||||
return 0;
|
||||
|
||||
@@ -56,7 +56,7 @@ enum {
|
||||
int gr_gp10b_init_fs_state(struct gk20a *g);
|
||||
int gr_gp10b_alloc_buffer(struct vm_gk20a *vm, size_t size,
|
||||
struct nvgpu_mem *mem);
|
||||
void gr_gp10b_create_sysfs(struct device *dev);
|
||||
void gr_gp10b_create_sysfs(struct gk20a *g);
|
||||
int gr_gp10b_handle_fecs_error(struct gk20a *g,
|
||||
struct channel_gk20a *__ch,
|
||||
struct gr_gk20a_isr_data *isr_data);
|
||||
|
||||
Reference in New Issue
Block a user