#
41d41b03 |
| 30-May-2023 |
Konrad Dybcio <konrad.dybcio@linaro.org> |
media: venus: Use newly-introduced hfi_buffer_requirements accessors
Now that we have a way which is independent of the HFI version to set the correct fields in hfi_buffer_requirements, use it!
Sig
media: venus: Use newly-introduced hfi_buffer_requirements accessors
Now that we have a way which is independent of the HFI version to set the correct fields in hfi_buffer_requirements, use it!
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
bbfc89e6 |
| 30-May-2023 |
Konrad Dybcio <konrad.dybcio@linaro.org> |
media: venus: Introduce accessors for remapped hfi_buffer_reqs members
Currently we have macros to access these, but they don't provide a way to override the remapped fields. Replace the macros with
media: venus: Introduce accessors for remapped hfi_buffer_reqs members
Currently we have macros to access these, but they don't provide a way to override the remapped fields. Replace the macros with actual get/set pairs to fix that.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
996d2155 |
| 22-May-2023 |
Dikshita Agarwal <quic_dikshita@quicinc.com> |
media: venus: add handling of bit depth change from firmware
Set opb format to TP10_UWC and dpb to client set format when bit depth change to 10 bit is detecting by firmware.
Acked-by: Konrad Dybci
media: venus: add handling of bit depth change from firmware
Set opb format to TP10_UWC and dpb to client set format when bit depth change to 10 bit is detecting by firmware.
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
58b64dd0 |
| 22-May-2023 |
Dikshita Agarwal <quic_dikshita@quicinc.com> |
media: venus: update calculation for dpb buffers
Use dpb color format, width and height of output port for calculating buffer size of dpb buffers.
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
media: venus: update calculation for dpb buffers
Use dpb color format, width and height of output port for calculating buffer size of dpb buffers.
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
30956077 |
| 22-May-2023 |
Dikshita Agarwal <quic_dikshita@quicinc.com> |
media: venus: add support for V4L2_PIX_FMT_P010 color format
add V4L2_PIX_FMT_P010 as supported color format for decoder.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dikshi
media: venus: add support for V4L2_PIX_FMT_P010 color format
add V4L2_PIX_FMT_P010 as supported color format for decoder.
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
927e78ac |
| 12-Sep-2020 |
Rikard Falkeborn <rikard.falkeborn@gmail.com> |
media: venus: helpers: Fix ALIGN() of non power of two
ALIGN() expects its second argument to be a power of 2, otherwise incorrect results are produced for some inputs. The output can be both larger
media: venus: helpers: Fix ALIGN() of non power of two
ALIGN() expects its second argument to be a power of 2, otherwise incorrect results are produced for some inputs. The output can be both larger or smaller than what is expected.
For example, ALIGN(304, 192) equals 320 instead of 384, and ALIGN(65, 192) equals 256 instead of 192.
However, nestling two ALIGN() as is done in this case seem to only produce results equal to or bigger than the expected result if ALIGN() had handled non powers of two, and that in turn results in framesizes that are either the correct size or too large.
Fortunately, since 192 * 4 / 3 equals 256, it turns out that one ALIGN() is sufficient.
Fixes: ab1eda449c6e ("media: venus: vdec: handle 10bit bitstreams") Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
98d43518 |
| 21-Sep-2020 |
Qinglang Miao <miaoqinglang@huawei.com> |
media: venus: simplify the return expression of session_process_buf()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Bjorn Andersson <bjorn.ande
media: venus: simplify the return expression of session_process_buf()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
a47a3ae5 |
| 10-Feb-2023 |
Fritz Koenig <frkoenig@chromium.org> |
media: venus: Correct P010 buffer alignment
According to msm_media_info.h the correct alignment for the stride of P010 buffers is 128.
Signed-off-by: Fritz Koenig <frkoenig@chromium.org> Reviewed-b
media: venus: Correct P010 buffer alignment
According to msm_media_info.h the correct alignment for the stride of P010 buffers is 128.
Signed-off-by: Fritz Koenig <frkoenig@chromium.org> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
show more ...
|
#
7f77fa9f |
| 26-Jul-2022 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
media: venus: Fix NV12 decoder buffer discovery on HFI_VERSION_1XX
HFI_VERSION_1XX uses HFI_BUFFER_OUTPUT not HFI_BUFFER_OUTPUT2 for decoder buffers.
venus_helper_check_format() places a constraint
media: venus: Fix NV12 decoder buffer discovery on HFI_VERSION_1XX
HFI_VERSION_1XX uses HFI_BUFFER_OUTPUT not HFI_BUFFER_OUTPUT2 for decoder buffers.
venus_helper_check_format() places a constraint on an output buffer to be of type HFI_BUFFER_OUTPUT2. HFI_1XX uses HFI_BUFFER_OUTPUT though.
Switching to the logic used in venus_helper_get_out_fmts() first checking for HFI_BUFFER_OUTPUT and then HFI_BUFFER_OUTPUT2 resolves on HFI_1XX.
db410c before: root@linaro-alip:~# v4l2-ctl -d /dev/video0 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture Multiplanar
[0]: 'MPG4' (MPEG-4 Part 2 ES, compressed) [1]: 'H263' (H.263, compressed) [2]: 'H264' (H.264, compressed) [3]: 'VP80' (VP8, compressed)
root@linaro-alip:~# v4l2-ctl -d /dev/video1 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture Multiplanar
db410c after: root@linaro-alip:~# v4l2-ctl -d /dev/video0 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture Multiplanar
[0]: 'MPG4' (MPEG-4 Part 2 ES, compressed) [1]: 'H263' (H.263, compressed) [2]: 'H264' (H.264, compressed) [3]: 'VP80' (VP8, compressed)
root@linaro-alip:~# v4l2-ctl -d /dev/video1 --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture Multiplanar
[0]: 'NV12' (Y/CbCr 4:2:0)
Validated playback with ffplay on db410c with h264 and vp8 decoding.
Fixes: 9593126dae3e ("media: venus: Add a handling of QC08C compressed format") Cc: stable@vger.kernel.org # v5.19 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@kernel.org>
show more ...
|
#
b4d1d5c6 |
| 12-Jul-2022 |
Hans Verkuil <hverkuil-cisco@xs4all.nl> |
media: venus: venus_helper_get_bufreq(): req is never NULL
Fix a smatch error:
drivers/media/platform/qcom/venus/helpers.c: drivers/media/platform/qcom/venus/helpers.c:678 venus_helper_get_bufreq()
media: venus: venus_helper_get_bufreq(): req is never NULL
Fix a smatch error:
drivers/media/platform/qcom/venus/helpers.c: drivers/media/platform/qcom/venus/helpers.c:678 venus_helper_get_bufreq() error: we previously assumed 'req' could be null (see line 674)
After checking how venus_helper_get_bufreq() is called it is clear that req is never NULL, so just drop the checks.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
cef92b14 |
| 03-Mar-2022 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: Add a handling of QC10C compressed format
This adds QC10C compressed pixel format in the Venus driver, and make it possible to discover from v4l2 clients.
Note: The QC10C format will
media: venus: Add a handling of QC10C compressed format
This adds QC10C compressed pixel format in the Venus driver, and make it possible to discover from v4l2 clients.
Note: The QC10C format will be enumerable via VIDIOC_ENUM_FMT when the bitstream is 10-bits and the headers are parsed.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
9593126d |
| 03-Mar-2022 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: Add a handling of QC08C compressed format
This adds QC08C compressed pixel format in the Venus driver, and make it possible to discover from v4l2 clients.
Signed-off-by: Stanimir Varb
media: venus: Add a handling of QC08C compressed format
This adds QC08C compressed pixel format in the Venus driver, and make it possible to discover from v4l2 clients.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
fc00086e |
| 03-Mar-2022 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: helpers: Add helper to check supported pixel formats
Add a helper to check supported pixel format per codec and session type.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linar
media: venus: helpers: Add helper to check supported pixel formats
Add a helper to check supported pixel format per codec and session type.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
73664f10 |
| 12-Apr-2022 |
Vikash Garodia <quic_vgarodia@quicinc.com> |
media: venus: do not queue internal buffers from previous sequence
During reconfig (DRC) event from firmware, it is not guaranteed that all the DPB(internal) buffers would be released by the firmwar
media: venus: do not queue internal buffers from previous sequence
During reconfig (DRC) event from firmware, it is not guaranteed that all the DPB(internal) buffers would be released by the firmware. Some buffers might be released gradually while processing frames from the new sequence. These buffers now stay idle in the dpblist. In subsequent call to queue the DPBs to firmware, these idle buffers should not be queued. The fix identifies those buffers and free them.
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com> Tested-by: Fritz Koenig <frkoenig@chromium.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
8403fdd7 |
| 06-Dec-2021 |
Ameer Hamza <amhamza.mgc@gmail.com> |
media: venus: vdec: fixed possible memory leak issue
The venus_helper_alloc_dpb_bufs() implementation allows an early return on an error path when checking the id from ida_alloc_min() which would no
media: venus: vdec: fixed possible memory leak issue
The venus_helper_alloc_dpb_bufs() implementation allows an early return on an error path when checking the id from ida_alloc_min() which would not release the earlier buffer allocation.
Move the direct kfree() from the error checking of dma_alloc_attrs() to the common fail path to ensure that allocations are released on all error paths in this function.
Addresses-Coverity: 1494120 ("Resource leak")
cc: stable@vger.kernel.org # 5.16+ Fixes: 40d87aafee29 ("media: venus: vdec: decoded picture buffer handling during reconfig sequence") Signed-off-by: Ameer Hamza <amhamza.mgc@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
show more ...
|
#
40d87aaf |
| 20-Oct-2021 |
Mansur Alisha Shaik <mansur@codeaurora.org> |
media: venus: vdec: decoded picture buffer handling during reconfig sequence
In existing implementation, driver is freeing and un-mapping all the decoded picture buffers(DPB) as part of dynamic reso
media: venus: vdec: decoded picture buffer handling during reconfig sequence
In existing implementation, driver is freeing and un-mapping all the decoded picture buffers(DPB) as part of dynamic resolution change(DRC) handling. As a result, when firmware try to access the DPB buffer, from previous sequence, SMMU context fault is seen due to the buffer being already unmapped.
With this change, driver defines ownership of each DPB buffer. If a buffer is owned by firmware, driver would skip from un-mapping the same.
Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
3227a8f7 |
| 23-Apr-2021 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: Handle fatal errors during encoding and decoding
According to stateful decoder docs a fatal failure of decoding (and encoding) could be recover it by closing the corresponding file han
media: venus: Handle fatal errors during encoding and decoding
According to stateful decoder docs a fatal failure of decoding (and encoding) could be recover it by closing the corresponding file handle and open new one or reinitialize decoding (and encoding) by stop streaming on both queues. In order to satisfy this requirement we add a mechanism ins sys_error_handler and corresponding decoder and encoder drivers to wait for sys_error_done waitqueue in reqbuf.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Tested-by: Vikash Garodia <vgarodia@codeaurora.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
aa6dcf17 |
| 23-Apr-2021 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: helpers: Add helper to mark fatal vb2 error
Add a helper to mark source and destination vb2 queues fatal unrecoverable error.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linar
media: venus: helpers: Add helper to mark fatal vb2 error
Add a helper to mark source and destination vb2 queues fatal unrecoverable error.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Tested-by: Vikash Garodia <vgarodia@codeaurora.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
b46ff4eb |
| 23-Apr-2021 |
Stanimir Varbanov <stanimir.varbanov@linaro.org> |
media: venus: Make sys_error flag an atomic bitops
Make the sys_error flag an atomic bitops in order to avoid locking in sys_error readers.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linar
media: venus: Make sys_error flag an atomic bitops
Make the sys_error flag an atomic bitops in order to avoid locking in sys_error readers.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Tested-by: Vikash Garodia <vgarodia@codeaurora.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
16545aa3 |
| 10-Aug-2021 |
Dikshita Agarwal <dikshita@codeaurora.org> |
media: venus: Set buffer to FW based on FW min count requirement.
- Get the min buffer count required by FW from source event change and use the same value to decide actual buffer count and for
media: venus: Set buffer to FW based on FW min count requirement.
- Get the min buffer count required by FW from source event change and use the same value to decide actual buffer count and for buffer size calculation. - Setup DPB and OPB buffers after session continue incase of reconfig.
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
fa622c3d |
| 10-Aug-2021 |
Dikshita Agarwal <dikshita@codeaurora.org> |
media: venus: helpers: update NUM_MBS macro calculation
Consider alignment while calculating NUM_MBS.
Co-developed-by: Mansur Alisha Shaik <mansur@codeaurora.org> Signed-off-by: Mansur Alisha Shaik
media: venus: helpers: update NUM_MBS macro calculation
Consider alignment while calculating NUM_MBS.
Co-developed-by: Mansur Alisha Shaik <mansur@codeaurora.org> Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org> Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
920173c7 |
| 10-Aug-2021 |
Dikshita Agarwal <dikshita@codeaurora.org> |
media: venus: Add num_vpp_pipes to resource structure
V6 HW can have vpp pipes as 1 or 4, add num_vpp_pipes to resource struture to differentiate.
Signed-off-by: Dikshita Agarwal <dikshita@codeauro
media: venus: Add num_vpp_pipes to resource structure
V6 HW can have vpp pipes as 1 or 4, add num_vpp_pipes to resource struture to differentiate.
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
1ac61faf |
| 06-Jul-2021 |
Mansur Alisha Shaik <mansur@codeaurora.org> |
media: venus: helper: do not set constrained parameters for UBWC
Plane constraints firmware interface is to override the default alignment for a given color format. By default venus hardware has ali
media: venus: helper: do not set constrained parameters for UBWC
Plane constraints firmware interface is to override the default alignment for a given color format. By default venus hardware has alignments as 128x32, but NV12 was defined differently to meet various usecases. Compressed NV12 has always been aligned as 128x32, hence not needed to override the default alignment.
Fixes: bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actual plane constraints to FW") Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org> Reviewed-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>
show more ...
|
#
6fc46680 |
| 10-May-2021 |
Zhen Lei <thunder.leizhen@huawei.com> |
media: venus: helpers: Delete an unneeded bool conversion
The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explici
media: venus: helpers: Delete an unneeded bool conversion
The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly.
No functional change.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
#
3cfe5815 |
| 12-Apr-2021 |
Dikshita Agarwal <dikshita@codeaurora.org> |
media: venus: Enable low power setting for encoder
Set the FW to run in low power for encoder to accommodate more session without losing much on quality.
Signed-off-by: Dikshita Agarwal <dikshita@c
media: venus: Enable low power setting for encoder
Set the FW to run in low power for encoder to accommodate more session without losing much on quality.
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|