From 628e2c79017b83032a840fb85e136d3216dec9c4 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Sun, 23 Sep 2018 14:26:26 +0530 Subject: gpu: nvgpu: falcon engine EMEM support -Added HAL copy_from_emem & copy_to_emem to struct nvgpu_falcon_engine_dependency_ops data struct to point to engine specific EMEM access functions. -Added function nvgpu_flcn_copy_from_emem() & nvgpu_flcn_copy_to_emem() at interface layer to access EMEM using flacon engine EMEM HAL's. JIRA NVGPU-1161 Change-Id: Ifb72a617277e73f25f1772c969791b642585e7fb Signed-off-by: Mahantesh Kumbar Reviewed-on: https://git-master.nvidia.com/r/1807336 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/falcon.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/falcon.h b/drivers/gpu/nvgpu/include/nvgpu/falcon.h index 9f8c97ea..cf15061d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/falcon.h +++ b/drivers/gpu/nvgpu/include/nvgpu/falcon.h @@ -219,6 +219,10 @@ struct nvgpu_falcon_engine_dependency_ops { int (*queue_tail)(struct gk20a *g, struct nvgpu_falcon_queue *queue, u32 *tail, bool set); void (*msgq_tail)(struct gk20a *g, u32 *tail, bool set); + int (*copy_from_emem)(struct nvgpu_falcon *flcn, u32 src, u8 *dst, + u32 size, u8 port); + int (*copy_to_emem)(struct nvgpu_falcon *flcn, u32 dst, u8 *src, + u32 size, u8 port); }; struct nvgpu_falcon_ops { @@ -283,6 +287,10 @@ bool nvgpu_flcn_get_mem_scrubbing_status(struct nvgpu_falcon *flcn); int nvgpu_flcn_mem_scrub_wait(struct nvgpu_falcon *flcn); bool nvgpu_flcn_get_cpu_halted_status(struct nvgpu_falcon *flcn); bool nvgpu_flcn_get_idle_status(struct nvgpu_falcon *flcn); +int nvgpu_flcn_copy_from_emem(struct nvgpu_falcon *flcn, + u32 src, u8 *dst, u32 size, u8 port); +int nvgpu_flcn_copy_to_emem(struct nvgpu_falcon *flcn, + u32 dst, u8 *src, u32 size, u8 port); int nvgpu_flcn_copy_from_dmem(struct nvgpu_falcon *flcn, u32 src, u8 *dst, u32 size, u8 port); int nvgpu_flcn_copy_to_dmem(struct nvgpu_falcon *flcn, -- cgit v1.2.2