1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (C) Rockchip Electronics Co., Ltd. 4 * 5 * Author: Huang Lee <Putin.li@rock-chips.com> 6 */ 7 8 #ifndef __LINUX_RGA_HW_CONFIG_H_ 9 #define __LINUX_RGA_HW_CONFIG_H_ 10 11 #include "rga_drv.h" 12 13 struct rga_rect { 14 int w; 15 int h; 16 }; 17 18 struct rga_win_data { 19 const char *name; 20 const uint32_t *raster_formats; 21 const uint32_t *fbc_formats; 22 const uint32_t *tile_formats; 23 uint32_t num_of_raster_formats; 24 uint32_t num_of_fbc_formats; 25 uint32_t num_of_tile_formats; 26 27 const unsigned int supported_rotations; 28 const unsigned int scale_up_mode; 29 const unsigned int scale_down_mode; 30 const unsigned int rd_mode; 31 32 }; 33 34 struct rga_hw_data { 35 uint32_t version; 36 uint32_t feature; 37 38 uint32_t csc_r2y_mode; 39 uint32_t csc_y2r_mode; 40 41 struct rga_rect max_input; 42 struct rga_rect max_output; 43 struct rga_rect min_input; 44 struct rga_rect min_output; 45 46 unsigned int max_upscale_factor; 47 unsigned int max_downscale_factor; 48 49 const struct rga_win_data *win; 50 unsigned int win_size; 51 }; 52 53 extern const struct rga_hw_data rga3_data; 54 extern const struct rga_hw_data rga2e_data; 55 56 void user_format_convert(uint32_t *df, uint32_t sf); 57 58 #endif /* __LINUX_RGA_HW_CONFIG_H_ */ 59