1*3f68c01bSZhan Liu /* Copyright 2016 Advanced Micro Devices, Inc. 2*3f68c01bSZhan Liu * 3*3f68c01bSZhan Liu * Permission is hereby granted, free of charge, to any person obtaining a 4*3f68c01bSZhan Liu * copy of this software and associated documentation files (the "Software"), 5*3f68c01bSZhan Liu * to deal in the Software without restriction, including without limitation 6*3f68c01bSZhan Liu * the rights to use, copy, modify, merge, publish, distribute, sublicense, 7*3f68c01bSZhan Liu * and/or sell copies of the Software, and to permit persons to whom the 8*3f68c01bSZhan Liu * Software is furnished to do so, subject to the following conditions: 9*3f68c01bSZhan Liu * 10*3f68c01bSZhan Liu * The above copyright notice and this permission notice shall be included in 11*3f68c01bSZhan Liu * all copies or substantial portions of the Software. 12*3f68c01bSZhan Liu * 13*3f68c01bSZhan Liu * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14*3f68c01bSZhan Liu * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15*3f68c01bSZhan Liu * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16*3f68c01bSZhan Liu * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 17*3f68c01bSZhan Liu * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18*3f68c01bSZhan Liu * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19*3f68c01bSZhan Liu * OTHER DEALINGS IN THE SOFTWARE. 20*3f68c01bSZhan Liu * 21*3f68c01bSZhan Liu * Authors: AMD 22*3f68c01bSZhan Liu * 23*3f68c01bSZhan Liu */ 24*3f68c01bSZhan Liu 25*3f68c01bSZhan Liu #ifndef __DCN201_DPP_H__ 26*3f68c01bSZhan Liu #define __DCN201_DPP_H__ 27*3f68c01bSZhan Liu 28*3f68c01bSZhan Liu #include "dcn20/dcn20_dpp.h" 29*3f68c01bSZhan Liu 30*3f68c01bSZhan Liu #define TO_DCN201_DPP(dpp)\ 31*3f68c01bSZhan Liu container_of(dpp, struct dcn201_dpp, base) 32*3f68c01bSZhan Liu 33*3f68c01bSZhan Liu #define TF_REG_LIST_DCN201(id) \ 34*3f68c01bSZhan Liu TF_REG_LIST_DCN20(id) 35*3f68c01bSZhan Liu 36*3f68c01bSZhan Liu #define TF_REG_LIST_SH_MASK_DCN201(mask_sh)\ 37*3f68c01bSZhan Liu TF_REG_LIST_SH_MASK_DCN20(mask_sh) 38*3f68c01bSZhan Liu 39*3f68c01bSZhan Liu #define TF_REG_FIELD_LIST_DCN201(type) \ 40*3f68c01bSZhan Liu TF_REG_FIELD_LIST_DCN2_0(type) 41*3f68c01bSZhan Liu 42*3f68c01bSZhan Liu struct dcn201_dpp_shift { 43*3f68c01bSZhan Liu TF_REG_FIELD_LIST_DCN201(uint8_t); 44*3f68c01bSZhan Liu }; 45*3f68c01bSZhan Liu 46*3f68c01bSZhan Liu struct dcn201_dpp_mask { 47*3f68c01bSZhan Liu TF_REG_FIELD_LIST_DCN201(uint32_t); 48*3f68c01bSZhan Liu }; 49*3f68c01bSZhan Liu 50*3f68c01bSZhan Liu #define DPP_DCN201_REG_VARIABLE_LIST \ 51*3f68c01bSZhan Liu DPP_DCN2_REG_VARIABLE_LIST 52*3f68c01bSZhan Liu 53*3f68c01bSZhan Liu struct dcn201_dpp_registers { 54*3f68c01bSZhan Liu DPP_DCN201_REG_VARIABLE_LIST; 55*3f68c01bSZhan Liu }; 56*3f68c01bSZhan Liu 57*3f68c01bSZhan Liu struct dcn201_dpp { 58*3f68c01bSZhan Liu struct dpp base; 59*3f68c01bSZhan Liu 60*3f68c01bSZhan Liu const struct dcn201_dpp_registers *tf_regs; 61*3f68c01bSZhan Liu const struct dcn201_dpp_shift *tf_shift; 62*3f68c01bSZhan Liu const struct dcn201_dpp_mask *tf_mask; 63*3f68c01bSZhan Liu 64*3f68c01bSZhan Liu const uint16_t *filter_v; 65*3f68c01bSZhan Liu const uint16_t *filter_h; 66*3f68c01bSZhan Liu const uint16_t *filter_v_c; 67*3f68c01bSZhan Liu const uint16_t *filter_h_c; 68*3f68c01bSZhan Liu int lb_pixel_depth_supported; 69*3f68c01bSZhan Liu int lb_memory_size; 70*3f68c01bSZhan Liu int lb_bits_per_entry; 71*3f68c01bSZhan Liu bool is_write_to_ram_a_safe; 72*3f68c01bSZhan Liu struct scaler_data scl_data; 73*3f68c01bSZhan Liu struct pwl_params pwl_data; 74*3f68c01bSZhan Liu }; 75*3f68c01bSZhan Liu 76*3f68c01bSZhan Liu bool dpp201_construct(struct dcn201_dpp *dpp2, 77*3f68c01bSZhan Liu struct dc_context *ctx, 78*3f68c01bSZhan Liu uint32_t inst, 79*3f68c01bSZhan Liu const struct dcn201_dpp_registers *tf_regs, 80*3f68c01bSZhan Liu const struct dcn201_dpp_shift *tf_shift, 81*3f68c01bSZhan Liu const struct dcn201_dpp_mask *tf_mask); 82*3f68c01bSZhan Liu 83*3f68c01bSZhan Liu #endif /* __DC_HWSS_DCN201_H__ */ 84