Attention is currently required from: Hung-Te Lin, Yu-Ping Wu.
Yidi Lin 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/5d7977e5_be50d977?usp... : PS3, Line 115: DP_CLRSETBITS(mtk_dp, REG_303C_DP_ENCODER0_P0 + 1, val, 0x7);
This would be wrong for mt8196, where its code is `mtk_dp_mask(mtk_dp, REG_303C_DP_ENCODER0_P0, val […]
I define `DP_CLRSETBITS` on mt8196 like this. ``` #define DP_CLRSETBITS(mtk_dp, reg, var, mask) \ mtk_dp_mask(mtk_dp, (reg) - (reg) % 2, \ (var) << (8 * ((reg) % 2)), (mask) << (8 * ((reg) % 2))) ```
`mtk_dp_mask(mtk_dp, REG_303C_DP_ENCODER0_P0, val << 8, 0x7 << 8)` is converted to `DP_CLRSETBITS(mtk_dp, REG_303C_DP_ENCODER0_P0 + 1, val, 0x7)`.