1235c6763SAurabindo Pillai /* 2235c6763SAurabindo Pillai * Copyright 2012-20 Advanced Micro Devices, Inc. 3235c6763SAurabindo Pillai * 4235c6763SAurabindo Pillai * Permission is hereby granted, free of charge, to any person obtaining a 5235c6763SAurabindo Pillai * copy of this software and associated documentation files (the "Software"), 6235c6763SAurabindo Pillai * to deal in the Software without restriction, including without limitation 7235c6763SAurabindo Pillai * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8235c6763SAurabindo Pillai * and/or sell copies of the Software, and to permit persons to whom the 9235c6763SAurabindo Pillai * Software is furnished to do so, subject to the following conditions: 10235c6763SAurabindo Pillai * 11235c6763SAurabindo Pillai * The above copyright notice and this permission notice shall be included in 12235c6763SAurabindo Pillai * all copies or substantial portions of the Software. 13235c6763SAurabindo Pillai * 14235c6763SAurabindo Pillai * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15235c6763SAurabindo Pillai * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16235c6763SAurabindo Pillai * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17235c6763SAurabindo Pillai * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18235c6763SAurabindo Pillai * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19235c6763SAurabindo Pillai * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20235c6763SAurabindo Pillai * OTHER DEALINGS IN THE SOFTWARE. 21235c6763SAurabindo Pillai * 22235c6763SAurabindo Pillai * Authors: AMD 23235c6763SAurabindo Pillai * 24235c6763SAurabindo Pillai */ 25235c6763SAurabindo Pillai 26235c6763SAurabindo Pillai #ifndef __DC_HUBP_DCN32_H__ 27235c6763SAurabindo Pillai #define __DC_HUBP_DCN32_H__ 28235c6763SAurabindo Pillai 29235c6763SAurabindo Pillai #include "dcn20/dcn20_hubp.h" 30235c6763SAurabindo Pillai #include "dcn21/dcn21_hubp.h" 31235c6763SAurabindo Pillai #include "dcn30/dcn30_hubp.h" 32235c6763SAurabindo Pillai #include "dcn31/dcn31_hubp.h" 33235c6763SAurabindo Pillai 34235c6763SAurabindo Pillai #define HUBP_MASK_SH_LIST_DCN32(mask_sh)\ 35235c6763SAurabindo Pillai HUBP_MASK_SH_LIST_DCN31(mask_sh),\ 36235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_MALL_CONFIG, USE_MALL_SEL, mask_sh),\ 37235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_MALL_CONFIG, USE_MALL_FOR_CURSOR, mask_sh),\ 38235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_VMPG_CONFIG, VMPG_SIZE, mask_sh),\ 39235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_VMPG_CONFIG, PTE_BUFFER_MODE, mask_sh),\ 40235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_VMPG_CONFIG, BIGK_FRAGMENT_SIZE, mask_sh),\ 41235c6763SAurabindo Pillai HUBP_SF(HUBP0_DCHUBP_VMPG_CONFIG, FORCE_ONE_ROW_FOR_FRAME, mask_sh),\ 42235c6763SAurabindo Pillai HUBP_SF(HUBPREQ0_UCLK_PSTATE_FORCE, DATA_UCLK_PSTATE_FORCE_EN, mask_sh),\ 43235c6763SAurabindo Pillai HUBP_SF(HUBPREQ0_UCLK_PSTATE_FORCE, DATA_UCLK_PSTATE_FORCE_VALUE, mask_sh),\ 44235c6763SAurabindo Pillai HUBP_SF(HUBPREQ0_UCLK_PSTATE_FORCE, CURSOR_UCLK_PSTATE_FORCE_EN, mask_sh),\ 45235c6763SAurabindo Pillai HUBP_SF(HUBPREQ0_UCLK_PSTATE_FORCE, CURSOR_UCLK_PSTATE_FORCE_VALUE, mask_sh) 46235c6763SAurabindo Pillai 47235c6763SAurabindo Pillai void hubp32_update_force_pstate_disallow(struct hubp *hubp, bool pstate_disallow); 48235c6763SAurabindo Pillai 49*4ed79308SAlvin Lee void hubp32_update_force_cursor_pstate_disallow(struct hubp *hubp, bool pstate_disallow); 50*4ed79308SAlvin Lee 514074f96dSChris Park void hubp32_update_mall_sel(struct hubp *hubp, uint32_t mall_sel, bool c_cursor); 52235c6763SAurabindo Pillai 53235c6763SAurabindo Pillai void hubp32_prepare_subvp_buffering(struct hubp *hubp, bool enable); 54235c6763SAurabindo Pillai 55235c6763SAurabindo Pillai void hubp32_phantom_hubp_post_enable(struct hubp *hubp); 56235c6763SAurabindo Pillai 5737edc999SChris Park void hubp32_cursor_set_attributes(struct hubp *hubp, 5837edc999SChris Park const struct dc_cursor_attributes *attr); 5937edc999SChris Park 606884b0e4SArthur Grillo void hubp32_init(struct hubp *hubp); 616884b0e4SArthur Grillo 62235c6763SAurabindo Pillai bool hubp32_construct( 63235c6763SAurabindo Pillai struct dcn20_hubp *hubp2, 64235c6763SAurabindo Pillai struct dc_context *ctx, 65235c6763SAurabindo Pillai uint32_t inst, 66235c6763SAurabindo Pillai const struct dcn_hubp2_registers *hubp_regs, 67235c6763SAurabindo Pillai const struct dcn_hubp2_shift *hubp_shift, 68235c6763SAurabindo Pillai const struct dcn_hubp2_mask *hubp_mask); 69235c6763SAurabindo Pillai 70235c6763SAurabindo Pillai #endif /* __DC_HUBP_DCN32_H__ */ 71