]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: platform: mtk-mdp3: Use cmdq_pkt_write when no mask is needed
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Fri, 23 Aug 2024 21:31:21 +0000 (17:31 -0400)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2024 16:30:57 +0000 (17:30 +0100)
cmdq_pkt_write_mask() boils down to a cmdq_pkt_write() when the mask is
0xFFFFFFFF. Call cmdq_pkt_write() directly in those cases to simplify
the code.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c

index df0ab338ef41c0304f3672bf7f276a203e225cec..4c6d6dd62197bccc337062d3d7904d4b47b4d763 100644 (file)
@@ -321,8 +321,7 @@ static int mdp_path_config_subfrm(struct mdp_cmdq_cmd *cmd,
        /* Enable mux settings */
        for (index = 0; index < ctrl->num_sets; index++) {
                set = &ctrl->sets[index];
-               cmdq_pkt_write_mask(&cmd->pkt, set->subsys_id, set->reg,
-                                   set->value, 0xFFFFFFFF);
+               cmdq_pkt_write(&cmd->pkt, set->subsys_id, set->reg, set->value);
        }
        /* Config sub-frame information */
        for (index = (num_comp - 1); index >= 0; index--) {
@@ -377,8 +376,7 @@ static int mdp_path_config_subfrm(struct mdp_cmdq_cmd *cmd,
        /* Disable mux settings */
        for (index = 0; index < ctrl->num_sets; index++) {
                set = &ctrl->sets[index];
-               cmdq_pkt_write_mask(&cmd->pkt, set->subsys_id, set->reg,
-                                   0, 0xFFFFFFFF);
+               cmdq_pkt_write(&cmd->pkt, set->subsys_id, set->reg, 0);
        }
 
        return 0;