diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2018-07-05 09:03:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-25 08:40:36 -0400 |
commit | f04997bdca34221c5e953df40999c4c92edb4e0b (patch) | |
tree | 375e1eb49ede6ac8314d52cfcd30d1489b5e392f /drivers/media/platform/qcom/venus/venc.c | |
parent | ea8afbabc25ade9aa34da01ffbba8085ab46ca48 (diff) | |
download | talos-obmc-linux-f04997bdca34221c5e953df40999c4c92edb4e0b.tar.gz talos-obmc-linux-f04997bdca34221c5e953df40999c4c92edb4e0b.zip |
media: venus: hfi: preparation to support venus 4xx
This covers the differences between 1xx,3xx and 4xx.
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>
Diffstat (limited to 'drivers/media/platform/qcom/venus/venc.c')
-rw-r--r-- | drivers/media/platform/qcom/venus/venc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index f7a87a3dbb46..14bd95c52810 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -890,6 +890,7 @@ static int venc_queue_setup(struct vb2_queue *q, static int venc_verify_conf(struct venus_inst *inst) { + enum hfi_version ver = inst->core->res->hfi_version; struct hfi_buffer_requirements bufreq; int ret; @@ -901,7 +902,7 @@ static int venc_verify_conf(struct venus_inst *inst) return ret; if (inst->num_output_bufs < bufreq.count_actual || - inst->num_output_bufs < bufreq.count_min) + inst->num_output_bufs < HFI_BUFREQ_COUNT_MIN(&bufreq, ver)) return -EINVAL; ret = venus_helper_get_bufreq(inst, HFI_BUFFER_INPUT, &bufreq); @@ -909,7 +910,7 @@ static int venc_verify_conf(struct venus_inst *inst) return ret; if (inst->num_input_bufs < bufreq.count_actual || - inst->num_input_bufs < bufreq.count_min) + inst->num_input_bufs < HFI_BUFREQ_COUNT_MIN(&bufreq, ver)) return -EINVAL; return 0; |