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#include "ia_css_rmgr.h"
17
18int ia_css_rmgr_init(void)
19{
20	int err = 0;
21
22	err = ia_css_rmgr_init_vbuf(vbuf_ref);
23	if (!err)
24		err = ia_css_rmgr_init_vbuf(vbuf_write);
25	if (!err)
26		err = ia_css_rmgr_init_vbuf(hmm_buffer_pool);
27	if (err)
28		ia_css_rmgr_uninit();
29	return err;
30}
31
32/*
33 * @brief Uninitialize resource pool (host)
34 */
35void ia_css_rmgr_uninit(void)
36{
37	ia_css_rmgr_uninit_vbuf(hmm_buffer_pool);
38	ia_css_rmgr_uninit_vbuf(vbuf_write);
39	ia_css_rmgr_uninit_vbuf(vbuf_ref);
40}
41