@@ -327,11 +327,11 @@ enum mtk_mutex_sof_id {
327327};
328328
329329struct mtk_mutex_data {
330- const unsigned int * mutex_mod ;
331- const unsigned int * mutex_sof ;
332- const unsigned int mutex_mod_reg ;
333- const unsigned int mutex_sof_reg ;
334- const unsigned int * mutex_table_mod ;
330+ const u8 * mutex_mod ;
331+ const u8 * mutex_table_mod ;
332+ const u16 * mutex_sof ;
333+ const u16 mutex_mod_reg ;
334+ const u16 mutex_sof_reg ;
335335 const bool no_clk ;
336336};
337337
@@ -345,7 +345,7 @@ struct mtk_mutex_ctx {
345345 struct cmdq_client_reg cmdq_reg ;
346346};
347347
348- static const unsigned int mt2701_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
348+ static const u8 mt2701_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
349349 [DDP_COMPONENT_BLS ] = MT2701_MUTEX_MOD_DISP_BLS ,
350350 [DDP_COMPONENT_COLOR0 ] = MT2701_MUTEX_MOD_DISP_COLOR ,
351351 [DDP_COMPONENT_OVL0 ] = MT2701_MUTEX_MOD_DISP_OVL ,
@@ -354,7 +354,7 @@ static const unsigned int mt2701_mutex_mod[DDP_COMPONENT_ID_MAX] = {
354354 [DDP_COMPONENT_WDMA0 ] = MT2701_MUTEX_MOD_DISP_WDMA ,
355355};
356356
357- static const unsigned int mt2712_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
357+ static const u8 mt2712_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
358358 [DDP_COMPONENT_AAL0 ] = MT2712_MUTEX_MOD_DISP_AAL0 ,
359359 [DDP_COMPONENT_AAL1 ] = MT2712_MUTEX_MOD2_DISP_AAL1 ,
360360 [DDP_COMPONENT_COLOR0 ] = MT2712_MUTEX_MOD_DISP_COLOR0 ,
@@ -374,7 +374,7 @@ static const unsigned int mt2712_mutex_mod[DDP_COMPONENT_ID_MAX] = {
374374 [DDP_COMPONENT_WDMA1 ] = MT2712_MUTEX_MOD_DISP_WDMA1 ,
375375};
376376
377- static const unsigned int mt8167_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
377+ static const u8 mt8167_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
378378 [DDP_COMPONENT_AAL0 ] = MT8167_MUTEX_MOD_DISP_AAL ,
379379 [DDP_COMPONENT_CCORR ] = MT8167_MUTEX_MOD_DISP_CCORR ,
380380 [DDP_COMPONENT_COLOR0 ] = MT8167_MUTEX_MOD_DISP_COLOR ,
@@ -389,7 +389,7 @@ static const unsigned int mt8167_mutex_mod[DDP_COMPONENT_ID_MAX] = {
389389 [DDP_COMPONENT_WDMA0 ] = MT8167_MUTEX_MOD_DISP_WDMA0 ,
390390};
391391
392- static const unsigned int mt8173_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
392+ static const u8 mt8173_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
393393 [DDP_COMPONENT_AAL0 ] = MT8173_MUTEX_MOD_DISP_AAL ,
394394 [DDP_COMPONENT_COLOR0 ] = MT8173_MUTEX_MOD_DISP_COLOR0 ,
395395 [DDP_COMPONENT_COLOR1 ] = MT8173_MUTEX_MOD_DISP_COLOR1 ,
@@ -407,7 +407,7 @@ static const unsigned int mt8173_mutex_mod[DDP_COMPONENT_ID_MAX] = {
407407 [DDP_COMPONENT_WDMA1 ] = MT8173_MUTEX_MOD_DISP_WDMA1 ,
408408};
409409
410- static const unsigned int mt8183_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
410+ static const u8 mt8183_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
411411 [DDP_COMPONENT_AAL0 ] = MT8183_MUTEX_MOD_DISP_AAL0 ,
412412 [DDP_COMPONENT_CCORR ] = MT8183_MUTEX_MOD_DISP_CCORR0 ,
413413 [DDP_COMPONENT_COLOR0 ] = MT8183_MUTEX_MOD_DISP_COLOR0 ,
@@ -421,7 +421,7 @@ static const unsigned int mt8183_mutex_mod[DDP_COMPONENT_ID_MAX] = {
421421 [DDP_COMPONENT_WDMA0 ] = MT8183_MUTEX_MOD_DISP_WDMA0 ,
422422};
423423
424- static const unsigned int mt8183_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
424+ static const u8 mt8183_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
425425 [MUTEX_MOD_IDX_MDP_RDMA0 ] = MT8183_MUTEX_MOD_MDP_RDMA0 ,
426426 [MUTEX_MOD_IDX_MDP_RSZ0 ] = MT8183_MUTEX_MOD_MDP_RSZ0 ,
427427 [MUTEX_MOD_IDX_MDP_RSZ1 ] = MT8183_MUTEX_MOD_MDP_RSZ1 ,
@@ -432,7 +432,7 @@ static const unsigned int mt8183_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
432432 [MUTEX_MOD_IDX_MDP_CCORR0 ] = MT8183_MUTEX_MOD_MDP_CCORR0 ,
433433};
434434
435- static const unsigned int mt8186_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
435+ static const u8 mt8186_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
436436 [DDP_COMPONENT_AAL0 ] = MT8186_MUTEX_MOD_DISP_AAL0 ,
437437 [DDP_COMPONENT_CCORR ] = MT8186_MUTEX_MOD_DISP_CCORR0 ,
438438 [DDP_COMPONENT_COLOR0 ] = MT8186_MUTEX_MOD_DISP_COLOR0 ,
@@ -445,7 +445,7 @@ static const unsigned int mt8186_mutex_mod[DDP_COMPONENT_ID_MAX] = {
445445 [DDP_COMPONENT_RDMA1 ] = MT8186_MUTEX_MOD_DISP_RDMA1 ,
446446};
447447
448- static const unsigned int mt8186_mdp_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
448+ static const u8 mt8186_mdp_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
449449 [MUTEX_MOD_IDX_MDP_RDMA0 ] = MT8186_MUTEX_MOD_MDP_RDMA0 ,
450450 [MUTEX_MOD_IDX_MDP_RSZ0 ] = MT8186_MUTEX_MOD_MDP_RSZ0 ,
451451 [MUTEX_MOD_IDX_MDP_RSZ1 ] = MT8186_MUTEX_MOD_MDP_RSZ1 ,
@@ -456,7 +456,7 @@ static const unsigned int mt8186_mdp_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
456456 [MUTEX_MOD_IDX_MDP_COLOR0 ] = MT8186_MUTEX_MOD_MDP_COLOR0 ,
457457};
458458
459- static const unsigned int mt8188_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
459+ static const u8 mt8188_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
460460 [DDP_COMPONENT_OVL0 ] = MT8188_MUTEX_MOD_DISP_OVL0 ,
461461 [DDP_COMPONENT_WDMA0 ] = MT8188_MUTEX_MOD_DISP_WDMA0 ,
462462 [DDP_COMPONENT_RDMA0 ] = MT8188_MUTEX_MOD_DISP_RDMA0 ,
@@ -496,7 +496,7 @@ static const unsigned int mt8188_mutex_mod[DDP_COMPONENT_ID_MAX] = {
496496 [DDP_COMPONENT_MERGE5 ] = MT8188_MUTEX_MOD_DISP1_VPP_MERGE4 ,
497497};
498498
499- static const unsigned int mt8188_mdp_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
499+ static const u8 mt8188_mdp_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
500500 [MUTEX_MOD_IDX_MDP_RDMA0 ] = MT8195_MUTEX_MOD_MDP_RDMA0 ,
501501 [MUTEX_MOD_IDX_MDP_RDMA2 ] = MT8195_MUTEX_MOD_MDP_RDMA2 ,
502502 [MUTEX_MOD_IDX_MDP_RDMA3 ] = MT8195_MUTEX_MOD_MDP_RDMA3 ,
@@ -530,7 +530,7 @@ static const unsigned int mt8188_mdp_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
530530 [MUTEX_MOD_IDX_MDP_WROT3 ] = MT8195_MUTEX_MOD_MDP_WROT3 ,
531531};
532532
533- static const unsigned int mt8192_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
533+ static const u8 mt8192_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
534534 [DDP_COMPONENT_AAL0 ] = MT8192_MUTEX_MOD_DISP_AAL0 ,
535535 [DDP_COMPONENT_CCORR ] = MT8192_MUTEX_MOD_DISP_CCORR0 ,
536536 [DDP_COMPONENT_COLOR0 ] = MT8192_MUTEX_MOD_DISP_COLOR0 ,
@@ -544,7 +544,7 @@ static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = {
544544 [DDP_COMPONENT_RDMA4 ] = MT8192_MUTEX_MOD_DISP_RDMA4 ,
545545};
546546
547- static const unsigned int mt8195_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
547+ static const u8 mt8195_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
548548 [DDP_COMPONENT_OVL0 ] = MT8195_MUTEX_MOD_DISP_OVL0 ,
549549 [DDP_COMPONENT_WDMA0 ] = MT8195_MUTEX_MOD_DISP_WDMA0 ,
550550 [DDP_COMPONENT_RDMA0 ] = MT8195_MUTEX_MOD_DISP_RDMA0 ,
@@ -575,7 +575,7 @@ static const unsigned int mt8195_mutex_mod[DDP_COMPONENT_ID_MAX] = {
575575 [DDP_COMPONENT_DP_INTF1 ] = MT8195_MUTEX_MOD_DISP1_DP_INTF0 ,
576576};
577577
578- static const unsigned int mt8195_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
578+ static const u8 mt8195_mutex_table_mod [MUTEX_MOD_IDX_MAX ] = {
579579 [MUTEX_MOD_IDX_MDP_RDMA0 ] = MT8195_MUTEX_MOD_MDP_RDMA0 ,
580580 [MUTEX_MOD_IDX_MDP_RDMA1 ] = MT8195_MUTEX_MOD_MDP_RDMA1 ,
581581 [MUTEX_MOD_IDX_MDP_RDMA2 ] = MT8195_MUTEX_MOD_MDP_RDMA2 ,
@@ -621,7 +621,7 @@ static const unsigned int mt8195_mutex_table_mod[MUTEX_MOD_IDX_MAX] = {
621621 [MUTEX_MOD_IDX_MDP_WROT3 ] = MT8195_MUTEX_MOD_MDP_WROT3 ,
622622};
623623
624- static const unsigned int mt8365_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
624+ static const u8 mt8365_mutex_mod [DDP_COMPONENT_ID_MAX ] = {
625625 [DDP_COMPONENT_AAL0 ] = MT8365_MUTEX_MOD_DISP_AAL ,
626626 [DDP_COMPONENT_CCORR ] = MT8365_MUTEX_MOD_DISP_CCORR ,
627627 [DDP_COMPONENT_COLOR0 ] = MT8365_MUTEX_MOD_DISP_COLOR0 ,
@@ -637,7 +637,7 @@ static const unsigned int mt8365_mutex_mod[DDP_COMPONENT_ID_MAX] = {
637637 [DDP_COMPONENT_WDMA0 ] = MT8365_MUTEX_MOD_DISP_WDMA0 ,
638638};
639639
640- static const unsigned int mt2712_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
640+ static const u16 mt2712_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
641641 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
642642 [MUTEX_SOF_DSI0 ] = MUTEX_SOF_DSI0 ,
643643 [MUTEX_SOF_DSI1 ] = MUTEX_SOF_DSI1 ,
@@ -647,28 +647,28 @@ static const unsigned int mt2712_mutex_sof[DDP_MUTEX_SOF_MAX] = {
647647 [MUTEX_SOF_DSI3 ] = MUTEX_SOF_DSI3 ,
648648};
649649
650- static const unsigned int mt6795_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
650+ static const u16 mt6795_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
651651 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
652652 [MUTEX_SOF_DSI0 ] = MUTEX_SOF_DSI0 ,
653653 [MUTEX_SOF_DSI1 ] = MUTEX_SOF_DSI1 ,
654654 [MUTEX_SOF_DPI0 ] = MUTEX_SOF_DPI0 ,
655655};
656656
657- static const unsigned int mt8167_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
657+ static const u16 mt8167_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
658658 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
659659 [MUTEX_SOF_DSI0 ] = MUTEX_SOF_DSI0 ,
660660 [MUTEX_SOF_DPI0 ] = MT8167_MUTEX_SOF_DPI0 ,
661661 [MUTEX_SOF_DPI1 ] = MT8167_MUTEX_SOF_DPI1 ,
662662};
663663
664664/* Add EOF setting so overlay hardware can receive frame done irq */
665- static const unsigned int mt8183_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
665+ static const u16 mt8183_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
666666 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
667667 [MUTEX_SOF_DSI0 ] = MUTEX_SOF_DSI0 | MT8183_MUTEX_EOF_DSI0 ,
668668 [MUTEX_SOF_DPI0 ] = MT8183_MUTEX_SOF_DPI0 | MT8183_MUTEX_EOF_DPI0 ,
669669};
670670
671- static const unsigned int mt8186_mutex_sof [MUTEX_SOF_DSI3 + 1 ] = {
671+ static const u16 mt8186_mutex_sof [MUTEX_SOF_DSI3 + 1 ] = {
672672 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
673673 [MUTEX_SOF_DSI0 ] = MT8186_MUTEX_SOF_DSI0 | MT8186_MUTEX_EOF_DSI0 ,
674674 [MUTEX_SOF_DPI0 ] = MT8186_MUTEX_SOF_DPI0 | MT8186_MUTEX_EOF_DPI0 ,
@@ -682,7 +682,7 @@ static const unsigned int mt8186_mutex_sof[MUTEX_SOF_DSI3 + 1] = {
682682 * but also detect the error at end of frame(EAEOF) when EOF signal
683683 * arrives.
684684 */
685- static const unsigned int mt8188_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
685+ static const u16 mt8188_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
686686 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
687687 [MUTEX_SOF_DSI0 ] =
688688 MT8188_MUTEX_SOF_DSI0 | MT8188_MUTEX_EOF_DSI0 ,
@@ -692,7 +692,7 @@ static const unsigned int mt8188_mutex_sof[DDP_MUTEX_SOF_MAX] = {
692692 MT8188_MUTEX_SOF_DP_INTF1 | MT8188_MUTEX_EOF_DP_INTF1 ,
693693};
694694
695- static const unsigned int mt8195_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
695+ static const u16 mt8195_mutex_sof [DDP_MUTEX_SOF_MAX ] = {
696696 [MUTEX_SOF_SINGLE_MODE ] = MUTEX_SOF_SINGLE_MODE ,
697697 [MUTEX_SOF_DSI0 ] = MT8195_MUTEX_SOF_DSI0 | MT8195_MUTEX_EOF_DSI0 ,
698698 [MUTEX_SOF_DSI1 ] = MT8195_MUTEX_SOF_DSI1 | MT8195_MUTEX_EOF_DSI1 ,
0 commit comments