1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2010-2015, Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  */
15 
16 #ifndef __VMEM_LOCAL_H_INCLUDED__
17 #define __VMEM_LOCAL_H_INCLUDED__
18 
19 #include "type_support.h"
20 #include "vmem_global.h"
21 
22 typedef u16 t_vmem_elem;
23 typedef s16 t_svmem_elem;
24 
25 #define VMEM_ARRAY(x, s)	t_vmem_elem x[(s) / ISP_NWAY][ISP_NWAY]
26 #define SVMEM_ARRAY(x, s)	t_svmem_elem x[(s) / ISP_NWAY][ISP_NWAY]
27 
28 void isp_vmem_load(
29     const isp_ID_t		ID,
30     const t_vmem_elem	*from,
31     t_vmem_elem		*to,
32     unsigned int elems); /* In t_vmem_elem */
33 
34 void isp_vmem_store(
35     const isp_ID_t		ID,
36     t_vmem_elem		*to,
37     const t_vmem_elem	*from,
38     unsigned int elems); /* In t_vmem_elem */
39 
40 void isp_vmem_2d_load(
41     const isp_ID_t		ID,
42     const t_vmem_elem	*from,
43     t_vmem_elem		*to,
44     unsigned int height,
45     unsigned int width,
46     unsigned int stride_to,  /* In t_vmem_elem */
47 
48     unsigned		stride_from /* In t_vmem_elem */);
49 
50 void isp_vmem_2d_store(
51     const isp_ID_t		ID,
52     t_vmem_elem		*to,
53     const t_vmem_elem	*from,
54     unsigned int height,
55     unsigned int width,
56     unsigned int stride_to,  /* In t_vmem_elem */
57 
58     unsigned		stride_from /* In t_vmem_elem */);
59 
60 #endif /* __VMEM_LOCAL_H_INCLUDED__ */
61