mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
media: platform: mtk-mdp3: Refactor CMDQ writes for CMDQ API change
Update CMDQ register writes to use subsys-aware APIs, cmdq_pkt_write_subsys() and cmdq_pkt_write_mask_subsys(). This conforms to recent CMDQ API changes that split access by subsys ID support. Since all current MDP SoCs support subsys ID, and future MDP deployments will not run on SoCs without subsys ID, only subsys-specific API calls are needed. No logic for non-subsys ID hardware is required. Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
7acc334cf0
commit
3076734107
|
|
@ -321,7 +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(&cmd->pkt, set->subsys_id, set->reg, set->value);
|
||||
cmdq_pkt_write_subsys(&cmd->pkt, set->subsys_id, set->reg, set->reg, set->value);
|
||||
}
|
||||
/* Config sub-frame information */
|
||||
for (index = (num_comp - 1); index >= 0; index--) {
|
||||
|
|
@ -376,7 +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(&cmd->pkt, set->subsys_id, set->reg, 0);
|
||||
cmdq_pkt_write_subsys(&cmd->pkt, set->subsys_id, set->reg, set->reg, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@
|
|||
#define MM_REG_WRITE_MASK(cmd, id, base, ofst, val, mask) \
|
||||
do { \
|
||||
typeof(mask) (m) = (mask); \
|
||||
cmdq_pkt_write_mask(&((cmd)->pkt), id, (base) + (ofst), \
|
||||
(val), \
|
||||
cmdq_pkt_write_mask_subsys(&((cmd)->pkt), (id), (base), \
|
||||
(base) + (ofst), (val), \
|
||||
(((m) & (ofst##_MASK)) == (ofst##_MASK)) ? \
|
||||
(0xffffffff) : (m)); \
|
||||
} while (0)
|
||||
|
||||
#define MM_REG_WRITE(cmd, id, base, ofst, val) \
|
||||
cmdq_pkt_write(&((cmd)->pkt), id, (base) + (ofst), (val))
|
||||
cmdq_pkt_write_subsys(&((cmd)->pkt), (id), (base), (base) + (ofst), (val))
|
||||
|
||||
#define MM_REG_WAIT(cmd, evt) \
|
||||
do { \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user