Attention is currently required from: Hung-Te Lin, Yidi Lin.
Yu-Ping Wu has posted comments on this change by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/85861?usp=email )
Change subject: soc/mediatek/common/dp: Move common functions to dptx_hal_common.c ......................................................................
Patch Set 4:
(1 comment)
File src/soc/mediatek/common/dp/dptx_hal_common.c:
https://review.coreboot.org/c/coreboot/+/85861/comment/ece6cf49_15ee11fb?usp... : PS3, Line 115: DP_CLRSETBITS(mtk_dp, REG_303C_DP_ENCODER0_P0 + 1, val, 0x7);
I define `DP_CLRSETBITS` on mt8196 like this. […]
Okay, then that will also work. However, to determine whether to use your `DP_CLRSETBITS` solution or my suggestion about `mtk_dp_write_byte`, I think we need to understand why MT8196 doesn't need those `DP_TX_TOP_APB_WSTRB` writes (I see no references to `mtk_dp_write_byte` in MT8196's code).
- If the original `mtk_dp_write_byte` flow (containing `DP_TX_TOP_APB_WSTRB` writes) makes sense for MT8196 and MT8196 happens to not need that function, then I'm fine with using `DP_CLRSETBITS`. - Otherwise, if `mtk_dp_write_byte` doesn't make sense for MT8196, then we should define a separate `mtk_dp_write_byte` (without `DP_TX_TOP_APB_WSTRB`), as I suggested above.