From 5f6a2aa02b6927432c9f37e29c592e7efc4cb656 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 23 Nov 2016 16:41:14 +0200 Subject: gpu: nvgpu: fix setup_rop_mapping for gm20b+ gm20b_init_gr does not inherit the ops set by gk20a_init_gr_ops, and the gr.setup_rop_mapping HAL was not set there, so it was not set for chips that inherit from gm20b_init_gr and do not override it explicitly. Set the pointer in gm20b_init_gr, which other chips inherit, and delete the surrounding if condition from the call, making sure that future users always call it, because there is an implementation since the earliest supported chip. Bug 1833382 Change-Id: I7893c9aac7c5c49ce9a55031ea6baa9382a1b7ca Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1258960 Reviewed-by: Terje Bergstrom Reviewed-by: Automatic_Commit_Validation_User --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 +-- drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 0ebf2db9..3f5c4b4f 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -1377,8 +1377,7 @@ int gr_gk20a_init_fs_state(struct gk20a *g) } /* gr__setup_pd_mapping stubbed for gk20a */ - if (g->ops.gr.setup_rop_mapping) - g->ops.gr.setup_rop_mapping(g, gr); + g->ops.gr.setup_rop_mapping(g, gr); if (g->ops.gr.setup_alpha_beta_tables) g->ops.gr.setup_alpha_beta_tables(g, gr); diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index cff0774d..e71ca4a3 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -1586,6 +1586,7 @@ void gm20b_init_gr(struct gpu_ops *gops) gops->gr.is_ltcn_ltss_addr = gr_gm20b_is_ltcn_ltss_addr; gops->gr.split_lts_broadcast_addr = gr_gm20b_split_lts_broadcast_addr; gops->gr.split_ltc_broadcast_addr = gr_gm20b_split_ltc_broadcast_addr; + gops->gr.setup_rop_mapping = gr_gk20a_setup_rop_mapping; gops->gr.program_zcull_mapping = gr_gk20a_program_zcull_mapping; gops->gr.commit_global_timeslice = gr_gk20a_commit_global_timeslice; } -- cgit v1.2.2