summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-06-22 17:44:22 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-24 12:10:39 -0400
commit475af509e1a0433f79a00cfe3f0768cba46b58ea (patch)
treeaec9325ef14cff2dc063e2dd71752285ce7bddd8 /drivers/gpu/nvgpu/gk20a
parent41ec68376ff4291f9aa50df014439ce462a8e87f (diff)
gpu: nvgpu: vgpu: Add CE engine to engine list
Add CE engine to vgpu engine list. CE engine is defined differently for different GPUs, so we also add HAL for initializing the engine info. Bug 1780185 Change-Id: I5ae265551feac08d0c4d45402dd3277514e62b2d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1169720 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> Tested-by: Aingara Paramakuru <aparamakuru@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Lakshmanan M <lm@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c5
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
3 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 078a7158..04695d11 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -279,7 +279,7 @@ int gk20a_fifo_engine_enum_from_type(struct gk20a *g, u32 engine_type,
279 return ret; 279 return ret;
280} 280}
281 281
282static int init_engine_info(struct fifo_gk20a *f) 282int gk20a_fifo_init_engine_info(struct fifo_gk20a *f)
283{ 283{
284 struct gk20a *g = f->g; 284 struct gk20a *g = f->g;
285 struct device *d = dev_from_gk20a(g); 285 struct device *d = dev_from_gk20a(g);
@@ -796,7 +796,7 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g)
796 for (i = 0; i < f->num_pbdma; ++i) 796 for (i = 0; i < f->num_pbdma; ++i)
797 f->pbdma_map[i] = gk20a_readl(g, fifo_pbdma_map_r(i)); 797 f->pbdma_map[i] = gk20a_readl(g, fifo_pbdma_map_r(i));
798 798
799 init_engine_info(f); 799 g->ops.fifo.init_engine_info(f);
800 800
801 init_runlist(g, f); 801 init_runlist(g, f);
802 802
@@ -3082,4 +3082,5 @@ void gk20a_init_fifo(struct gpu_ops *gops)
3082 /* gk20a doesn't support device_info_data packet parsing */ 3082 /* gk20a doesn't support device_info_data packet parsing */
3083 gops->fifo.device_info_data_parse = NULL; 3083 gops->fifo.device_info_data_parse = NULL;
3084 gops->fifo.eng_runlist_base_size = fifo_eng_runlist_base__size_1_v; 3084 gops->fifo.eng_runlist_base_size = fifo_eng_runlist_base__size_1_v;
3085 gops->fifo.init_engine_info = gk20a_fifo_init_engine_info;
3085} 3086}
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index e6ae0bdc..3473bc78 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -250,4 +250,7 @@ bool gk20a_fifo_is_valid_runlist_id(struct gk20a *g, u32 runlist_id);
250 250
251int gk20a_fifo_update_runlist_ids(struct gk20a *g, u32 runlist_ids, u32 hw_chid, 251int gk20a_fifo_update_runlist_ids(struct gk20a *g, u32 runlist_ids, u32 hw_chid,
252 bool add, bool wait_for_finish); 252 bool add, bool wait_for_finish);
253
254int gk20a_fifo_init_engine_info(struct fifo_gk20a *f);
255
253#endif /*__GR_GK20A_H__*/ 256#endif /*__GR_GK20A_H__*/
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 74ffab61..997da125 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -352,6 +352,7 @@ struct gpu_ops {
352 struct channel_gk20a *ch); 352 struct channel_gk20a *ch);
353 int (*tsg_unbind_channel)(struct channel_gk20a *ch); 353 int (*tsg_unbind_channel)(struct channel_gk20a *ch);
354 u32 (*eng_runlist_base_size)(void); 354 u32 (*eng_runlist_base_size)(void);
355 int (*init_engine_info)(struct fifo_gk20a *f);
355 } fifo; 356 } fifo;
356 struct pmu_v { 357 struct pmu_v {
357 /*used for change of enum zbc update cmd id from ver 0 to ver1*/ 358 /*used for change of enum zbc update cmd id from ver 0 to ver1*/