Remove freq list, which is unused in current dcvs design.
Remove unused dcvs load, load_low, load_norm, load_high,
as current dcvs design only use min_freq and dcvs_flags.
Change-Id: Ifbf251a9506286f2f34eca6eeb1af79bd07c0f43
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Update CVP metadata skip logic to send a frame for CVP
processing every time frame rate or operatimg rate changes
dynamically. This helps in handling skipping of CVP metadata
processing for a random number of frames whenever frame rate
or operating rate changes dynamically, and avoid sending
CVP metadata to video firmware for an unpredictable frame.
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Change-Id: I049f0c0ade1700816203713cd82382c2a614f20a
For encode usecase, video driver operates cache always on
the encoded data length rather than the buffer length.
This is an optimization and saves cache operation on unused
memory region.
VB index is used to identify a buffer given to client and fed
again to encoder. Based on that, the filled length of that
buffer is then operated for cache operations.
For certain usecases, it is difficult to identify the buffer
based on VB index. Hence keep a counter to track the max filled
length during the usecase and operate cache on that length
Change-Id: I62cfe876077786ec9d14f541a0080cd2fc124b01
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
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>
Increase msm_vidc_hw_rsp_timeout to 1500, if kerenl or firmware
log_mask is set.
Change-Id: Id12e05e78ac4b004e4ccef7ff48be4f8eca1242a
Signed-off-by: Govindaraj Rajagopal <grajagop@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>
Reverting the volatile flag added to GOP size, bframe
and max hier layer controls.
Change-Id: I3f74bc59e7a73882ff1ce95832b8f248a8ddb80e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Do a get control before accessing the control value
to make sure right structure is accessed.
Change-Id: Iabf2ca85c342fe46d2236232794bbe9b9981fb18
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Set default double stage work-mode for HEIC sessions.
This reverts commit 10eb14941d.
Change-Id: I347e3af101ef236ba18687a5672f3bca6b49d257
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Set LTR use mask and mark index information to
firmware only when LTR count is non zero.
Change-Id: Icdcd0e8e29841e0cf4d2222ad3c2331aed2e3968
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Due to various feature constraint and best effort encode/decode, driver needs to update client
updated or default control value.Later these driver updated values are used in programming video
firmware. Hence, we need various controls as volatile
Change-Id: Ied22665addda921b0ef4827fb7a2b1fd47be5bbb
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
For heic/hevc image session, check respective capabilities to
allow or reject.
Change-Id: I4e565e6614a7863f75ecd4719480b850e1af43ae
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Update all struct values in default_bus_vote.
Calculate bw only when function available.
CRs-Fixed: 2494775
Change-Id: I70a137494c4469f928efe3ddf1f0297e2281c689
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
1. Add all intra encoding capability;
2. Disable LTR, HP, Slice mode and IR settings;
3. Use WorkMode2, HQ and Pipeline 4 by force;
4. Ignore dynamic switch between IPPP and all intra;
5. Reject sessions if static/dynamic frame rate
larger than 240;
6. Reject any non HEVC or AVC sessions;
7. Reject any HEVC Main10 profile sessions;
8. Reset all intra flag to false when stream off;
Change-Id: I9f405a7712c84bc6f8319025a7fb2a0a7f9064df
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Send dmabuf pointer in reserved fields instead of fd
to CVP driver for internal CVP usage buffers as fd is
not available for these buffers.
Change-Id: Ic25a445253b4ae05748d47b7caf0b88e909aad7e
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
- Modify max UBWC_CR from 3 to 5, as this value can
exceed 4 in real usecases.
- Decoder dpb read/write has already added cbcr by
dpb_factor, no need to add again.
- Decoder dpb_read BW saving factor for LLC should
be 1.3 for H264 and 1.14 for HEVC.
- VSP base cycle should be 0 for Iris/Iris2.
- Encoder ref_read_cbcr should multiply by
ref_cbcr_read_bw_factor.
- Encoder ref_write should multiply by
recon_write_bw_factor when tile enabled.
- Add fw_vpp_cycles when calculating vpp_cycles.
- Add multi-pipe factor for vpp_cycles.
- Add B-frame factor for encoder vpp_cycles.
Change-Id: I9e40203c5c89d8abdc77787a752ca240e11791f6
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Remove HAL_BUFFERFLAG_SYNCFRAME flag usage support
from hfi_msg_session_empty_buffer_done_packet and
its corresponding usage in handle_ebd.
Change-Id: I2dafd35a462a443e6efa165cbf46d4b78833c765
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Encoder shall encode subsequent frames in encoding order subject to the
following constraints:
- It shall not use short-term reference frames in display/input
order older than the current frame with the LTR command applied
for future encoding in encoding order.
- It shall not use LTR frames not described by the most recent USELTRFRAME.
- It may use LTR frames updated after the current frame in encoding order.
Change-Id: I167bb0e211c46f892fedb88f8054bc98543ebe8a
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
In certain scenarios, y_bw_no_ubwc_10bpp and y_bw_10bpp_p010
will be used with unitialized and incorrect values.
CRs-Fixed: 2487664
Change-Id: I292ed33b60c3994886bb3756babc8ab706ceab8b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Use max layers allowed in a session to calculate min GOP size
instead of variable number of layers enabled during each frame
encode to avoid GOP size not being multiple of sub-GOP size issue.
Change-Id: I3bb6e5320385acea9cb892c04b586ac3ca8c753f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Client expects all the buffers to be returned in certain scenarios
but driver does not return due to decode batching feature. Add
delayed_work functionality to queue batched buffers to video hardware
upon timeout, so that all the buffers will be returned to client.
Change-Id: I926de1da93d941ff2a64bfec1bbd351de2f3a601
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Calculate DDR and LLCC bw simulteneously to avoid
redundant calculations. This reduces number of calculations
required by 50% and hence reduces cpu load.
CRs-Fixed: 2487664
Change-Id: I6e1768cd63d9b6651fbaf4a8ed8d5706929d7743
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
MESE BW vote is not applicable for Kona. We can reduce overall BW
requirement by removing this vote.
CRs-Fixed: 2487664
Change-Id: I7cd6e3937e8884a2e4790a49713bd33aaab9c4bf
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Ensure the available data size with in the packet before type
casting from a smaller data type to larger data type in order
to avoid information leak or packet out of boundary access.
Change-Id: I8614a8b3f930c87af8aa49f77ea9d768a73ea203
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
If client doesn't request hybrid hierp or sets zero as max
enhancement layer count, then, hybrid hierp is not enabled.
Change-Id: I4284fd5c25d4dc812dac3e134ab5dfc53833bfbf
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Set single stage work mode for HEIC sessions. Currently, with two
stages, encoded tiles are missing at random.
Change-Id: Iadb59102447e1873e99ae1fd03a1d7b6ce3cba1a
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Scaling capability are defined in Q16 format. Existing
capability indicates that the capability is 16 times i.e
output dimension can be scaled to 1/16th of input dimension.
As per specification, the achievable ratio is 8.
Change-Id: Ib9e005a055e604d3173dd8cd376d3b6666f2c12c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Convert validate_pkt_size macro to an inline function
as this macro definition always returns true.
Change-Id: I9e7eadfe82c041721565c880eca3a46e4e3e98d9
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Defined a common macro for disable slice boundary
deblocking mode.
Change-Id: Ie163b1268a91f278e8ed6821c88ebff32e80d9cd
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Use trusted packet size on the received packet and check for
the size of the data received against the expected size before
accessing the packet.
Change-Id: I1bd6008249a0bf4edeec711ec8d23cf7b8dac1f1
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
v4l2_ctrl_get_name may return NULL that leads to NULL
ptr dereference. So added necessay check to avoid ptr
dereferencing if it is NULL.
Change-Id: If1a4ee8fe22e240b278f31888637d22b81b334e1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Update scaling capability for decoder to reject the
usecase where o/p resolution is less than i/p resolution.
Change-Id: I7cf85db78d51f8dd43da8d4312c92ea982054cb1
Updated encoder scratch1 buffer size macro to
match HFICCB changes. This fixes mismatch in
driver and HFI macro scratch1 buffer sizes.
Change-Id: Ie61058f243dc1895e0af00b78118bbe9dbc54a98
Client is not supposed to queue buffer while driver
is in flush. Return error if client queue buffer
in flush to avoid possible deadlock issues in driver
due to release buffer reference event processing.
Change-Id: Ica2ff40e428f82b9f6d3aa1314f7bf7d322375bd
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
This smoothens the buffer flow and takes care of random
frame drops due to jitter.
CRs-Fixed: 2478892
Change-Id: I27ecb686e3982152b18f3a2fc207ecf59f928dff
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Tracing all the buffer transactions give clear picture of
session behaviour and is helpful in performance analysis.
CRs-Fixed: 2478892
Change-Id: Ibab23a187af77434e20ce0b1c51de29b9d1731f9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
When MB_MODE slice is enabled, should use output
width/height to calculate the allowed slice size.
Fix warning log for NV21 format.
Change-Id: I97441cef36484ac6e82ba78b816f96d4b5bf2ab4
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Possibility of dereferencing userspace ptr in kernel for
invalid cmd. So added check to return error if unsupported
cmd is given as input to ioctl.
Change-Id: I3466fbd06e5b600f748824b9e16bcfdb4438bdef
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Based on session configuration parameters estimate
required cycles and set clock rate and bus bandwidth
to cvp session.
Change-Id: Iba07b304b4258e817d2404e272eb2b52891f9994
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
[1] Some unsupported clip resolution like 1600x1200, firmware rejects
the session during load resources.
[2] Allow interlaced clip playback only if below conditions were met
- resolution <= 1920x1920
- max_mbs_per_frame <= (1920x1088)/256
Change-Id: I67fd5377603c9c9ca577369c18ca6133190dc386
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Remove msm_vidc_calculate_output_buffer_count function
calls while g_ctrl event to avoid overwriting of
buffer count to old buffer count value that is set by
client.
Change-Id: I76135a88948ad7e2845c054a48e9f148bf367abb
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Fixed encoder reference buffer count to use maximum
number of hier players set by client.
Change-Id: I7fe55aff9ee3ac5065e6cab4af37013577e3c4c0
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Updated maximun allowed mdbf to support one 8K
session and one 4K session at a time.
Change-Id: I64ad3820aaddf5a3f89f97fe34c158b30f1e3675
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Modified vbvdelay logic with default behavior as
CBR+. Enable legacy CBR if resolution is < 720p.
Client can overwrite default behavior if
resolution is between VGA & 720p.
Change-Id: I9bd5ede782959780e5a5cb56eda0ae5e344e66aa
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
In case of opaque color format the bit depth will be known with
first ETB. Existing logic calculates output buffer size based on
8-bit which won't be sufficient for 10-bit.
So consider 10-bit by default while calculating encoder output
buffer size.
Change-Id: I51eee2fcb0dc137c596babd04659cd1fc087ebd6
Updated corresponding variables of size_vpss_lb
to align height to 16. This is needed to fix internal buffer mismatch
of H264 decoder with firmware which was caused due to height alignment
to 8. Also updated SIZE_VP9D_LB_FE_TOP_DATA, SIZE_VP9D_LB_PE_TOP_DATA
and SIZE_VP9D_LB_VSP_TOP macros width alignment to 16 from 8.
Change-Id: I308a64ec69ac2a63fae9a9481652119f55834cae
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Do not reset buffer counts while session is running and
modify in case of insufficient event processing.
Change-Id: I5425e54702339e768f3c3a6182fa62dd7a8b484a
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Existing logic to calculate buffer size is based on
the max bitrate supported during a secure session. Even
the peak bitrate calculation is not sufficient to arrive
at the required frame size.
Going back to earlier logic based on macroblocks per frame.
CRs-Fixed: 2467242
Change-Id: I0fe1768036f19ad2f1d08222e3ed239be7a2e27c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
- Consider thumbnail mode while calculating buffer counts
- decide batching in reconfiguration event so that driver
returns proper min buffer count when client query for it
Change-Id: I4d5373e78d43592caf0cef59f2f8801d20014efd
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
As per system requirements this additional bw is needed
for decode session.
Change-Id: Ia435aadcf78e4e2fd7b01ed00633fa2f38729bc6
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
FW provides UBWC_CR_STATS_INFO with every EBD which can be used
to accurately calculate BW requirements. Also renamed reconbufs
to refbufs, which is common to encode and decode.
CRs-Fixed: 2467542
Change-Id: I29afdcd466bd61f455507d30ab7ca951d0e9911c
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
CF and CR cannot be zero. Initialization of Min/Max values
keeps the values within limits, when FW does not provide them.
Also, do not modify CF, CR value based on DCVS. Always use
worst case values.
CRs-Fixed: 2467542
Change-Id: I91ed83cb5c9e1a8cda5775c491d99b97c4043a12
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Add sanity checks before and after clocks and regulator
operations to get more information if these operations
not functional as expected.
Change-Id: Ib4985113200ed065e6acf6cb7ae406b88cc7f432
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Set default profile type to avoid error when client
has not set any profile type.
Change-Id: I89b81f5167f65685e47073b5e73d3bd7c4fe81d6
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
driver returns min buffer count to client which includes
extra buffers count which is required for batching even
though batching may be disabled in start_streaming() later.
So decide batching in set format (configuration) to avoid
adding extra buffers count to reduce memory usage in
non-batching cases.
Change-Id: I147f7aaf928074a23c9dcda2dbf69a744cec382d
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Add new VIDC_BUS log mask for bus parameters
related logs.
Change-Id: If933c8c88ec2e0ccb283606da7f46a3c3c49756a
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
pkt->msg_size can be corrupted, that leads to OOB access. So added
additional conditional check to avoid OOB access in debug queue
packet handling.
Change-Id: I360812c40369ecef2dd99464d400661bc785074b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add support to disable both auto blur and
external blur.
Change-Id: I5200f738ffa5849a3e840f90f0da66c38607ceae
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Use the existing batch enable variable instead of extra
variable decode_batching.
Change-Id: Ic7875caf2b0d2c47d77b0c0c0ce9b5792920cafc
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Decode session needs UBWC CR statistics for BW calculations.
Hence need to enable this exetradata by default.
CRs-Fixed: 2467542
Change-Id: I3955a0b09cf82f97478c31704be6b16f297b011b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
during load resource firmware will check input buffer type
against requested buffer type. If there a mismatch it will
throw an error. So cleared non-requested buffer from the
scratch buffer list
Change-Id: Ifabf532982a393d4fc356ff3cad0ca3fd715fce0
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Existing code updates the device clock before cx ipeak logic.
As a result, the cx ipeak takes a decision based on updated
clock rather than the clock at which the device was running.
With the change, device clock is updated after the cx ipeak
is decided.
Change-Id: Icfde29176f8adb3a12c68a611f47b83ca7a8e4a9
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Perf mode can be either predefined or can be decided dynamically.
It is configured differently for different video hardware versions.
Perf mode is now updated with below
1. Remove multicore calculation as it is not applicable for single core
hardware.
2. Rate control type CQ is considered during load calculation
3. If the clocks are available, keep higher perf mode, unless restricted
by the hardware specification.
CRs-Fixed: 2462264
Change-Id: I9328e07ea3d1667b15a431c624112f1e8f8c92e0
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
operating rate setting to firmware is not required for decoder.
Change-Id: I271a42822f4a00e95d875400e5ad273697c94ab1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Video port resolution can be updated during reconfig event itself.
With this, reconfig height and width was removed. Also relevant
code cleanup was made accordingly.
Change-Id: I4fb38563b4c747eb356f28b7df7e99bd397ff8d1
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Fix to check f/w logging route based on
local flag variant instead of the global one.
Because route maybe updated when error occurred.
Change-Id: Ia67e138a2b494da465f4868553d33509e70020eb
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Requirement stipulates OPB to be writable buffer in split mode.
Erring out in case of read only buffer will help debugging quickly.
Change-Id: I529a97b3d0aa5f82e7cf7d024475338a9d24d1dd
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Include BRS control id in msm_venc_s_ctrl to add
support to BRS feature.
Change-Id: I05b23e7960128a7b19c582caa5123849ba0cb2b0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Cleaning up the debug change - reset max_tries count
from 10000 to 1000.
Change-Id: Id0b142f92b8f45eaa73ab256b7b07bb10f382b80
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Clean up debug log levels as:
1. Revise VIDC_WARN to VIDC_ERR;
2. Revise VIDC_PROF as VIDC_PERF;
3. Mark some one-time logs, e.g most of logs
in initialization and deinitialization as VIDC_HIGH;
4. Keep VIDC_PKT;
5. All other logs change to VIDC_LOW;
Change-Id: I8fc30f97dc3424da8418aab00e8af074ec8d4ef9
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
DCVS feature depends on multiple client configurations.
Low latency, thumbnail mode, etc are few among them.
DCVS is now decided before the session starts streaming
i.e after all configuration are inplace.
CRs-Fixed: 2457035
Change-Id: I4a42ae6bafdc852e81794b69d117f5821af4841f
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Reverting 2735098 "update video dimensions during port reconfiguration".
Change-Id: I2343cf77d23a564c3346d71dae9cd6377ae9d4e2
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
During a decode session, video output port can go through
reconfiguration. As a result, update the reconfig dimension
when client calls for g_fmt on output port.
Change-Id: Ib5f5866acbdfe107ba4693b8b94498d42f74b312
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
CVP usage is not supported for secure session so do not
enable CVP usage for secure session.
Change-Id: Ifed6daaf706895ebbc56b246134d9775787c7b9d
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Fix to independently control f/w logging route.
Change-Id: I81b57995cb9619d2dee9c43547e86cc3f08d3778
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Driver need not support sessions if cumulative
mbpf (macroblocks per frame) is more than platform
specified value. So reject such sessions.
Change-Id: Id12eedfb97783b746c771066d6a556692be84c9f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
For H264 decoder, resolutions with non-multiple of 16 were
calculating less internal buffer size. Updated calculation
to handle such scenarios.
Change-Id: I3c07b843cc898a584aba4c9f26627898a7427fe8
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
Have a chipset specific check to decide the default value of
num of extradata planes. Make num of planes as 2 if
extradata is enabled.
Change-Id: Ie61cac744b4277c024f36bebe795bea2eeced6ae
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Support dynamically config blur resolution to firmware.
Remove unused code for encoder aspect_ratio extradata.
Change-Id: Id2896ab943de4b676338b42bd4993d4057e960ac
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Write queues virtual address to video firmware to use it
for debug purpose to get more information.
Change-Id: I9bf347c3ea279196e7ae40c936f6b3608c94b09b
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Entry field from clock data structure gets initialized with
codec data during state transition from MSM_VIDC_CORE_INIT_DONE
to MSM_VIDC_OPEN. When flush is called before this transaction,
it calls msm_clock_data_reset where mentioned field is getting
accessed, which results in uninitialized data access. Add state
check to ensure the command is handled in right sequence.
Change-Id: Ic98221cbfe465415d89a0e2891f8af65f584f1dc
Signed-off-by: Aniket Masule <amasule@codeaurora.org>
Add platform specific capabilities for lito and use them
in place of firmware capabilities.
Change-Id: I4aca463604444b7ec161f794aac5ddd334c14368
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
read bit 21 of register FEATURE_CONFIG1(0x00786008)
to check if fuse is blown to enable lower SKU spec.
Change-Id: I63c5d764aed13c60c0d213aa0fc29dec9edfef3f
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Make a vote call whenever the clock frequency driver computes
crosses a threshold mark. This vote call handles the situation
when many subsystems are in turbo and where a need arises to
throttle the CDSP current.
CRs-Fixed: 2330072
Change-Id: Id10c02749b00fd5a1b1980923c5034648bd35985
Signed-off-by: shubham gupta <shubgupt@codeaurora.org>
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Remove support for V4L2_CID_MPEG_VIDC_VIDEO_PICTYPE_DEC_MODE.
Cleared related code.
Change-Id: I3b7100dfd08ee68a5033d8f6ec2cfdcfbbfbbe14
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
By calculating bitrate at each frame, we get a better estimate
of the BW requirements of the decode session. Thus improving
performance and power usage.
CRs-Fixed: 2451137
Change-Id: I22f0029bbb7d501340469a317e89de7eb34717c4
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Use S32_MAX instead of U32_MAX for maximum ctrl val for
blur resolution, as ctrl val is s32.
Change-Id: Ie92f6ba831ffead2d56c9eee24917b8a42cdd564
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Move cbr plus variable to legacy cbr variable as
it is interfering with CVP usage.
Change-Id: If31f49858486e4295e7dfd9f47175e23c4078200
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Regulator handoff causes the GDSC to turn off momentarily and resets
internal registers. As a result, TZ is unable to program secure
registers during Secure PIL load fails. Moving the handoff after
PIL load allows proper secure register programming and enables
secure sessions.
CRs-Fixed: 2450296
Change-Id: I32c7bf8726b51fdfa73b40819e8fdccdbbc0abe3
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
The structure vidc_hal_session_init_done is not being used,
so remove it.
Change-Id: Id4a577db117f98b18439245907765be5c9badc83
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Default UBWC configuration for LPDDR5 is corrected.
Highest Bank Bit is set to 16.
Change-Id: I0fb18279ae32d34a7f3bada6d05a72c5935430dd
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
video driver does not support TME format, so remove it.
Change-Id: Ica7656fc1758a007f0d20d0351a4cedb82b9a0ee
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Kona target supports two LTR frames encoding.
Fixing this capability in kona driver.
Handle resolution check correctly while setting
slice mode.
Change-Id: Iea6a041ecafb24da014832ecf2146088d4569a6f
CRs-Fixed: 2444064
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Video kernel snapshot before disabling msm/vidc compilation
from base kernel.
Change-Id: Id1178c3aca00706ad4822537f7f9a28141478771
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
This change brings msm vidc driver from base 4.19 kernel project.
It is the first source code snapshot from base kernel project.
Change-Id: I1d600c4e9459b9013f4b607890c52644f6d94f0c
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>