From 21605d09a58d0755e0e76c146a7d241fe0bb3517 Mon Sep 17 00:00:00 2001 From: Adeel Raza Date: Tue, 2 Feb 2016 13:30:04 -0800 Subject: gpu: nvgpu: add create_gr_sysfs() function pointer Add create_gr_sysfs() function pointer for creating gr specific sysfs nodes. Bug 1699676 Change-Id: I0a14d3676ebfcd5adebce673e46bdaad8d6aecf7 Signed-off-by: Adeel Raza Reviewed-on: http://git-master/r/1008658 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 24c062d2..01d1a167 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -206,6 +206,7 @@ struct gpu_ops { bool *post_event, struct channel_gk20a *fault_ch); int (*handle_tex_exception)(struct gk20a *g, u32 gpc, u32 tpc, bool *post_event); + void (*create_gr_sysfs)(struct platform_device *dev); } gr; const char *name; struct { diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 4d3f5068..9cf094db 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -4449,6 +4449,9 @@ static int gk20a_init_gr_setup_sw(struct gk20a *g) gr->remove_support = gk20a_remove_gr_support; gr->sw_ready = true; + if (g->ops.gr.create_gr_sysfs) + g->ops.gr.create_gr_sysfs(g->dev); + gk20a_dbg_fn("done"); return 0; -- cgit v1.2.2