Skip to content

Commit

Permalink
media: venus: hfi_venus: move set of default properties to core init
Browse files Browse the repository at this point in the history
This moves setting of default properties (firmware debug, idle
indicator and low power mode) from session init to core init.
All of those properties are need to be enabled/disabled early
so that they could be used before the clients are even initialized.

The other reason is to set idle indicator property early before
we enter into venus_suspend function where we need to check for
ARM9 WFI.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
Stanimir Varbanov authored and Mauro Carvalho Chehab committed Jul 25, 2018
1 parent bc89772 commit 4dde81d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/media/platform/qcom/venus/hfi_venus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,10 @@ static int venus_core_init(struct venus_core *core)
if (ret)
dev_warn(dev, "failed to send image version pkt to fw\n");

ret = venus_sys_set_default_properties(hdev);
if (ret)
return ret;

return 0;
}

Expand Down Expand Up @@ -1135,10 +1139,6 @@ static int venus_session_init(struct venus_inst *inst, u32 session_type,
struct hfi_session_init_pkt pkt;
int ret;

ret = venus_sys_set_default_properties(hdev);
if (ret)
return ret;

ret = pkt_session_init(&pkt, inst, session_type, codec);
if (ret)
goto err;
Expand Down

0 comments on commit 4dde81d

Please sign in to comment.