]> git.baikalelectronics.ru Git - kernel.git/commit
media: venus: Limit HFI sessions to the maximum supported
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Fri, 4 Dec 2020 10:01:37 +0000 (11:01 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 13 Jan 2021 08:06:17 +0000 (09:06 +0100)
commit2e46b9f80f89675567a1893422574d472e5da860
tree087fa77a444163b2d9288702231a1c958dc245af
parent8b1eaf1397999acb0cfb51efa6b37f6758778eb9
media: venus: Limit HFI sessions to the maximum supported

Currently we rely on firmware to return error when we reach the maximum
supported number of sessions. But this errors are happened at reqbuf
time which is a bit later. The more reasonable way looks like is to
return the error on driver open.

To achieve that modify hfi_session_create to return error when we reach
maximum count of sessions and thus refuse open.

Tested-by: Fritz Koenig <frkoenig@chromium.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/core.h
drivers/media/platform/qcom/venus/hfi.c
drivers/media/platform/qcom/venus/hfi_parser.c