V4L controls are made to be part of a cluster when they
are interdependent. If any one control in that cluster
is updated, all the remaining controls get updated as well
with the current control value.
Existing video usecase does not require any v4l controls
to be clustered. Hence removing the cluster controls.
Change-Id: I98dfc4af5291837054a8a28b00942fea6866f0a9
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Add codec check for bit depth or color space only reconfig
event. VP9 and HEVC have bit depth reconfig event while only
HEVC has color space reconfig event.
Change-Id: Ia6732e31a15957dc7116535131203a69fe19c987
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
MBs per frame for HEIF encode can be pretty large for high resolution
images. Skip mbpf check for image sessions.
Change-Id: I993115743f4792377a3a008b341d4c8256b102b9
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
- Possiblilty of performance hit due to memory
alloc/free at frame level.
- Reuse same buffer_tag instead of reallocating.
Change-Id: Ifb8efc43907feea4d6da5e8a0bf0aeaa47c8e1d7
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Firmware needs to access extradata buffer to find the size of extradata.
In secure sessions, assigning input buffer address to extradata address
causes fault since firmware does not have access to input adderss.
Extradata address and size in ETB must be set to zero for EOS cases
so that firmware skips accessing the extradata buffer.
CRs-Fixed: 2444064
Change-Id: Ia916d2f5f0500c85426fee3274f88fcf36103068
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
If client sets operating rate as INT_MAX, vote the highest
Venus clock and BW. This will allow operating the video session
at highest possible performance. DCVS & Batching is disabled.
CRs-Fixed: 2502809
Change-Id: I33e952f501a3ba6c1c8588ee319e10a586941d05
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
In case of secure encoding, NAL length based NAL header not supported.
Only startcode based NAL header is supported.
Change-Id: I119ffa47a003006e5b0d3bf7fbb5eb547de00830
Avoid alloc/free buffer at frame level in window based
bitrate check, re-use existing nodes to reduce
CPU workload, especially for HFR video.
Change-Id: I8bbbbef5229af7e608d7da1dfa4f75aab3903649
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
- Avoid redundant memory alloc/free at frame level.
- Only calculate bus bw for current session.
- Skip bus bw voting if change is less than 50MBps.
Change-Id: I944670c6ac0bf663cb43f47a06b8e828ccdb28cc
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Introduced CVP skip flag as part of qbuf to indicate buffer is
skipped CVP processing. This is required in order to re-use CVP metadata
from previous frame when it is not an error case. Video firmware will look
at this flag and reuse CVP metadata from earlier frame to encode current frame.
Change-Id: Icf89daa2d5f19790a04f0467a15165870b283ee4
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
DCVS Min Threshold should be FW Min count. Switch to Load_Norm
only when buffers are equally distributed between FW and Client.
This reduces clock transitions and increases residency in
Load_Low and Load_High.
CRs-Fixed: 2502809
Change-Id: I4896fd8fdffb44b546c6df3321e0155ee4a18dcb
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
A v4l control has current and new value. Current value indicates the
permanent value and any change in the control should be reflected to
current value. V4l client should ensure that while updating the
new value, current value is updated as well. If current value is
updated by v4l framework, its good, otherwise, the v4l driver should
update it.
Change-Id: Id0730465487dc4175516f4ef460758bee0b76308
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
1. Mostly venus_hfi_device ptr is derived from hal_session
(session->device). During session close hal_session is
freed in forward path and at the same time RBR arrives
at feed_back path leads to race condition.
2. If forward threads acquires device->lock first then
reverse thread may have stale device ptr(which is already
freed), accessing that ptr leads to device crash
3. To avoid refrencing device from hal_session, made
venus_hfi_device as a static variable within hfi_common
Change-Id: Ic5db6d4f6da6da08e16f4f00a06a3c4fec4f9c6e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
1. Client needs input etb to output fbd association. Introducing
input_tag and input_tag2 fields for this. Client will send
input_tag via etb reserved fields and client will get back
those as part of fbd reserved fields.
2. Convey sub-frame information to client from firmware.
CRs-Fixed: 2494945
Change-Id: Ic64131c7f8f3e3035cd6ff3997fe483171d71fc4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
1. Don't allow qbuf (etb & ftb), if flush is issued to
(encoder & decoder) input port.
2. Don't allow qbuf (etb & ftb), if flush is issued to encoder
output port
3. Don't qbuf (ftb), if flush is issued to decoder output port
4. Allow qbuf (etb), if flush is issued to decoder output port
to handle decoder reconfig.
Change-Id: I08a6a10612cc1a14ad164c55c5c8e54550c84845
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Set VBR as default rate control instead of RC_OFF.
Change-Id: Ie89f0109a9fe38a6c18b4713e8e8e905beb40b70
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Fix two kw issues on uninitialized pointer
and possible NULL dereference.
Change-Id: Ic87335d435ee84bef1c264d99e0d857d2932cbdc
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Encoder buffer requirement changes based on frame rate or
operating rate (HFR/HSR usecase) and hence recalculate
buffer counts when client set frame rate or operating rate.
Change-Id: I7b421524f319a4fde8b153dcd5c3bde123c5ccf9
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
If kernel to kernel CVP is enabled, initially driver disables
CVP extradata to firmware and then later, re-enables it.
Introduced a new flag to usage of CVP kernel to kernel metadata
to save the usage. As part of start streaming, driver will send
out CVP extradata enabled once based on overall usage.
Also, disabled kernel to kernel CVP usage for superframe.
Change-Id: I5590bd2274e27243da99f207d61fb00fc6fc82e0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Increase input buffers count for first four elgible
sessions to avoid high memory usage. Also made changes
to extra buffer calculations.
Change-Id: Id50791f6800390ad27abc6f361e54dcc7b61a8c8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
By default, a session is realtime. Client can
overwrite as non-realtime.Fixed realtime value
for decoder.Deprecated VIDC_REALTIME flag usage.
Change-Id: I5a1d1c9bdab18d3dfb73f3b21a23054de07d77a1
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Parameter that affect BW change during ETB and EBD.
During FTB BW calculation and voting is redundant.
Change-Id: I418d422f614670c2543a19709b36b3f39fd0d0e1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
If requested clk_freq is not changed, don't call
clk driver to the same value repeatedly.
Change-Id: I7ff1d7faedb10b06c0371f66b4a6cf6592d165fe
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Input and output buffer size must be 4K aligned for both
encoder and decoder session. So reject the session during
msm_vidc_qbuf, if alloc_len is not 4K aligned.
Change-Id: If555f26f1658ce50e12a8533cb9d59134da0aa81
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>