• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Copyright (C) 2011-2018 ARM or its affiliates
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19 
20 #ifndef __DMA_WRITER__
21 #define __DMA_WRITER__
22 
23 #include "acamera_types.h"
24 #include "dma_writer_api.h"
25 #include "acamera_fw.h"
26 
27 
28 typedef struct _dma_pipe_state {
29 
30     uint16_t buf_num_rdi;
31     uint16_t buf_num_wri;
32     uint16_t buf_num_size;
33 
34     uint32_t cleared_bufs;
35     uint8_t initialized;
36 } dma_pipe_state;
37 
38 
39 typedef struct _dma_pipe {
40     dma_pipe_settings settings;
41     dma_pipe_state state;
42     dma_api api;
43     dma_type type;
44 } dma_pipe;
45 
46 
47 typedef struct _dma_handle {
48     dma_pipe pipe[dma_max];
49 } dma_handle;
50 
51 
52 /**
53  *   Get default settings for dis processor.
54  *
55  *   To be sure that all settings are correct you have to call this function before changing any parameters.
56  *   It sets all settings in their default value. After that it can be changed by caller.
57  *
58  *   @param settings - pointer to the settings structure.
59  *
60  *   @return 0 - success
61  *           1 - fail to set settings.
62  */
63 dma_error dma_writer_update_state( dma_pipe *pipe );
64 
65 
66 #endif
67