Commit 17cd3d1d authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Mauro Carvalho Chehab

media: venus: hfi_venus: add suspend functionality for Venus 4xx

This adds suspend (power collapse) functionality by reusing
the suspend function for Venus 3xx and also enables idle indicator
property for Venus 4xx (where it is disabled by default).
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Tested-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 4dde81d7
...@@ -879,6 +879,14 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev) ...@@ -879,6 +879,14 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev)
if (ret) if (ret)
dev_warn(dev, "setting fw debug msg ON failed (%d)\n", ret); dev_warn(dev, "setting fw debug msg ON failed (%d)\n", ret);
/*
* Idle indicator is disabled by default on some 4xx firmware versions,
* enable it explicitly in order to make suspend functional by checking
* WFI (wait-for-interrupt) bit.
*/
if (IS_V4(hdev->core))
venus_sys_idle_indicator = true;
ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator); ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator);
if (ret) if (ret)
dev_warn(dev, "setting idle response ON failed (%d)\n", ret); dev_warn(dev, "setting idle response ON failed (%d)\n", ret);
...@@ -1533,7 +1541,7 @@ static int venus_suspend_3xx(struct venus_core *core) ...@@ -1533,7 +1541,7 @@ static int venus_suspend_3xx(struct venus_core *core)
static int venus_suspend(struct venus_core *core) static int venus_suspend(struct venus_core *core)
{ {
if (core->res->hfi_version == HFI_VERSION_3XX) if (IS_V3(core) || IS_V4(core))
return venus_suspend_3xx(core); return venus_suspend_3xx(core);
return venus_suspend_1xx(core); return venus_suspend_1xx(core);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment