Skip to content

Commit

Permalink
media: venus: pm: Toggle 6xx wrapper power in vcodec_control
Browse files Browse the repository at this point in the history
When in vcodec_control_v4() on the 4xx path we select between one of two
vcodec cores to toggle power control bits. In 6xx there is only one core
which offsets the relevant control registers to a slightly different
address.

This patch accounts for the address offset for 6xx silicon.

Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Co-developed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Dikshita Agarwal authored and Mauro Carvalho Chehab committed Apr 6, 2021
1 parent 4b0b6e1 commit 64afe82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/media/platform/qcom/venus/pm_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,10 @@ static int vcodec_control_v4(struct venus_core *core, u32 coreid, bool enable)
u32 val;
int ret;

if (coreid == VIDC_CORE_ID_1) {
if (IS_V6(core)) {
ctrl = core->wrapper_base + WRAPPER_CORE_POWER_CONTROL_V6;
stat = core->wrapper_base + WRAPPER_CORE_POWER_STATUS_V6;
} else if (coreid == VIDC_CORE_ID_1) {
ctrl = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_CONTROL;
stat = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_STATUS;
} else {
Expand Down

0 comments on commit 64afe82

Please sign in to comment.