xref: /OK3568_Linux_fs/external/linux-rga/samples/im2d_slt/sources/slt_config.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (C) 2021 Rockchip Electronics Co., Ltd.
3  * Authors:
4  *  Cerf Yu <cerf.yu@rock-chips.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 /* im2d_slt config */
20 #define IM2D_SLT_THREAD_EN              1   /* Enable multi-threaded mode. */
21 #define IM2D_SLT_THREAD_MAX             10  /* Maximum number of threads. */
22 #define IM2D_SLT_WHILE_EN               1   /* Enable while mode, 1: while, 0 single. */
23 #define IM2D_SLT_WHILE_NUM              3   /* Number of while mode. */
24 
25 #define IM2D_SLT_DRM_BUFFER_EN          0   /* Enable use drm buffer. */
26 #define IM2D_SLT_GRAPHICBUFFER_EN       0   /* Enable use GraphicBuffer. */
27 #define IM2D_SLT_RK_DMA_HEAP_EN         1   /* Enable rk_dma_heap. Only rv1106. */
28 #define IM2D_SLT_BUFFER_CACHEABLE       0   /* Enable buffer cache. Only support GraphicBuffer. */
29 #define IM2D_SLT_BUFFER_PHY_EN          0   /* Enable physical memory. Only support drm buffer.*/
30 
31 #define IM2D_SLT_TEST_RGA2_EN           1   /* Enable rga2 case. */
32 #define IM2D_SLT_TEST_RGA3_0_EN         0   /* Enable rga3_core0 case. */
33 #define IM2D_SLT_TEST_RGA3_1_EN         0   /* Enable rga3_core1 case. */
34 #define IM2D_SLT_TEST_RGA3_0_FBC_EN     0   /* Enable rga3_core0 fbc_mode case. */
35 #define IM2D_SLT_TEST_RGA3_1_FBC_EN     0   /* Enable rga3_core1 fbc_mode case. */
36 
37 #define IM2D_SLT_DEFAULT_WIDTH          1280                        /* Default image width. */
38 #define IM2D_SLT_DEFAULT_HEIGHT         720                         /* Default image height. */
39 #if IM2D_SLT_GRAPHICBUFFER_EN
40 #define IM2D_SLT_DEFAULT_FORMAT         HAL_PIXEL_FORMAT_RGBA_8888  /* Default image format. */
41 #else
42 #define IM2D_SLT_DEFAULT_FORMAT         RK_FORMAT_RGBA_8888         /* Default image format. */
43 #endif
44 
45 #define IM2D_SLT_DEFAULT_INPUT_PATH     "/userdata"
46 #define IM2D_SLT_DEFAULT_OUTPUT_PATH    "/userdata"