From dd88aed5cc3088285c5d0b900aebf705f52178c5 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 15 Mar 2017 15:49:18 -0700 Subject: gpu: nvgpu: Split out pramin code Split out the pramin interface code in preparation for splitting out the mem_desc code. JIRA NVGPU-12 Change-Id: I3f03447ea213cc15669b0934fa706e7cb22599b7 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1323323 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/pramin.h | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/pramin.h (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/pramin.h b/drivers/gpu/nvgpu/include/nvgpu/pramin.h new file mode 100644 index 00000000..7e0df06b --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/pramin.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __NVGPU_PRAMIN_H__ +#define __NVGPU_PRAMIN_H__ + +#include + +struct gk20a; +struct mm_gk20a; +struct mem_desc; + +/* + * This typedef is for functions that get called during the access_batched() + * operation. + */ +typedef void (*pramin_access_batch_fn)(struct gk20a *g, u32 start, u32 words, + u32 **arg); + +/* + * Generally useful batch functions. + */ +void pramin_access_batch_rd_n(struct gk20a *g, u32 start, u32 words, u32 **arg); +void pramin_access_batch_wr_n(struct gk20a *g, u32 start, u32 words, u32 **arg); +void pramin_access_batch_set(struct gk20a *g, u32 start, u32 words, u32 **arg); + +void nvgpu_pramin_access_batched(struct gk20a *g, struct mem_desc *mem, + u32 offset, u32 size, + pramin_access_batch_fn loop, u32 **arg); + +void nvgpu_init_pramin(struct mm_gk20a *mm); + +#endif -- cgit v1.2.2