Add definition for decide_core_and_power_mode
to fix the core id issue. Wrong core id
results in incorrect clock values.
CRs-Fixed: 2572953
Change-Id: I2219df71f555fb34a69146821997bab5fa8971a9
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Update core ops to invoke calc_bw_ar50lt API to
calculate bus bw requirement for ar50lt.
Change-Id: I1c8e1766d9aa2f8ad44498587b171c2827759ddb
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
VPx cycle requirement is not same as CABAC.
Hence update required as per system recommendation.
CRs-Fixed: 2560714
Change-Id: If600bc9c4abb364dba5f807c944976be992567c9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
The commit adds the following
1 Keep DMA mask aligned with api definition.
2 Replace the various division operations with 32 bit compatible modules.
Change-Id: I7bc931ffd124ef2b0be8d2bec44fbebf29d4cfb3
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Fix to set 7 instead of 1 to firmware to
enable all custom bias, matrix and limit.
Change-Id: Idd8bf0f6036ef2919855f379fffa51d5339eba1d
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Set operating rate to 1 by force for HEIC, so as
to avoid overloads.
Change-Id: If3f980e096c7e30368b9c6a280e78bbe1625e87a
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Driver is not polling for the PC Ready to be
set and truning of the regulators/clocks. Fix the
same.
H2X Interrupt has to be enabled for every boot.
CRs-Fixed: 2572953
Change-Id: Ib24b35dcebedf464bcd461718a18e732531ea4ce
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Fix to use correct CSC coefficients for
BT601 to BT709 CSC.
Change-Id: I8365603fed10151db0efbea0058bb896c419c3f4
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Fix to use output port resolution to determine
vbv delay.
Change-Id: Id6dc80f1349d0f5b10be2fa6343fb98816156f58
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
10 bit support is available only for hevc codec type.
So increase encoder output buffer size(factor - 1.25)
only for hevc.
Change-Id: I49f6bccc074814d8c737f47fd82907a018ac169a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
For HFR(like 960 fps) usecases requires higher buffer count-24.
But due to framework change(277033), We don't need any addtional
buffers for HFR usecases also. So reducing the count back to 12.
Change-Id: Ia3669858cde0962275d00f31d2bbb7308a3ce983
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
1. Set perf mode for image session buffers so that
they will be processed quickly.
2. Set max frequency for any turbo sessions.
Change-Id: Icf9b0af5cffcd395356783a9ff7a9421a309f52c
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Check ubwc_config for not being NULL before
dereferencing.
Change-Id: Ia4c87ea4a0e963b33165b0ea9a9c39339cc65832
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Add new ioctl to query the supported ROI map type.
Based on vpu version, report whether support 2-bit type
ROI map, or 2-byte type ROI map.
Change-Id: I6db970f5f36e4cc61365867c2a07d63aaf9365ea
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
For hevc codec, LCU sizes are 32x32 or 64x64. Existing
capabilities consider alignment with 16. Considering a
hevc clip of dimension 4096x2160, the coded resolution
becomes 4096x2176. Limiting the cap with 4096x2160 will
break such usecase, hence keeping the capabilities
considering 32-byte alignment.
Change-Id: I505843878f177c63b88959f92ce3a7d5a06b996b
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
-Fix to add 4 extra dcvs buffers at encoder input and decoder
output side irrespective of fps and resolution.
-Decrease total encoder input buffer count from 16 to 8 for non-hfr
use-cases.
-Increase total encoder output buffer count for hfr use-cases
irrespective of resolution.
Change-Id: I2fcda6e8c93bcc0df8c3168049ebf4a60e6bb5f1
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Input buffer counts, ie Dec Bitstream and Enc Yuv,
depend on input resolution. Hence they should be recalculated
in set format. Stale values can result in excess memory usage.
CRs-Fixed: 2548727
Change-Id: I57c87270a6613da290f14484897cef16e964e27a
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Increase vpp cycles by 2% for 1080P@HSR480 encode
usecase so that the video core runs at higher
frequency(366Mhz) helping to achieve the desired
performance.
Change-Id: Id81abd36ab79067d52da9371d1dd5bdcfe622389
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
make changes in video driver to make it as module.
Change-Id: I00788a1b72cc799f655b16e1bc6b7d6d6e0441f9
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Reject the buffer device address mapping when the device
address is mapped in secure context bank for a non-secure
instance and for the converse as well.
Change-Id: Ic2fc578acd23d3582b390b24cc9d829d49d00d4d
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
For secure encoding case, there is no camera usage. Hence,
by default make number of planes as 1. If any input requires
extradata, client will enable it and driver will update
number of planes.
Change-Id: Id9afd0a286a53d5d4c6045ba58227f57a0a8e0ca
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
Fix to add condition to skip mbpf capability checking
for HEIF image encoding.
Change-Id: Ife323366b8c08040c3f6fab8a0d15b89fe6f6777
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Default buffer count will not be sufficient for HFR(fps > 480).
So recalculate buffer count, if fps is updated before calling
vidioc_reqbuf.
Change-Id: Iec792892d283072f064c4148c65560b6a7e31d45
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Set CABAC as the default entropy mode for h264.
Also, check profile settings to ensure that CABAC mode
is set only for applicable profiles.
Change-Id: Id5e67c1a7ac0862ea963312ebdaee58945bf8bc0
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Increase total input buffers used for HFR cases. Required
for smooth performance.
Change-Id: Ia7dd49ead71239c2fb669e016d5e9fd2f94ca862
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
DCVS scaling window should be equal to the additional buffers
allocated for DCVS and independent of the buffer count required
by Client and FW.
CRs-Fixed: 2527739
Change-Id: I665a3d9792f44ea031d6c8d05d6e7a546a22f9a8
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
SKU index is not applicable for all targets. Hence no need
to keep it mandatory. SKU related changes will happen only
when the property is present otherwise will default to 0.
Change-Id: I88076ea95bccd4130202c055e5c148d817dd302e
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Add new DDR type 5X and deprecate DDR type 4Y.
Macro values also changed.
CRs-Fixed: 2534324
Change-Id: I0412b4e624df9c377db18b635d2cde321fccf8d0
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Currently setting signal_info, only if colorspace info
is set properly. But sometimes client can set only range.
So need to send signal_info always to firmware.
Change-Id: I5282ec01b473485ec39f39abbf7160b9c5cc0256
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Eos buffer is queued to firmware and its ref is maintained
using eosbufs.list. Sometimes EOS request client sent even
before port_reconfig. In that case requeing same buffer
which is already with firmware at start_streaming. So during
handle_ebd of 2nd eos buffer, it can't find the entry at
eosbufs.list. So client closes the session.
Always check, if buffer is already queued, then do not queue
the same buffer again, during start_streaming after reconfig.
Change-Id: If934d8ce357226dee78db15ccb7b3c57103d2f12
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
When set color format constraints, one buffer is not
correctly freed, fix it.
Change-Id: Iad497f03981653a7f28524f1d9e4218f706dcca1
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Initialize port format type to avoid failure
when g_fmt is called before s_fmt.
Change-Id: I37758f6d8be766c75cc8bc97147312b3b0bb0915
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Add Lahaina-specific platform data needed for driver probe
and remove data for older platforms.
Change-Id: I35e7711fd024467f0b6ce40aabdaf71f0c523e9a
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Initialize device_caps with device capabilities before video
devices are registered, as required by V4L2 framework.
Change-Id: I9fc037ae65d352b15d78eee979df30a24137dea8
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
ar50 and iris1 are no longer used.
Deleting the unused code pieces and files.
Change-Id: I01fab64b5e3682338fc0ffab986e7807a74c37b5
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
- msm-bus API is deprecated in favor of upstream interconnect API
- Migrate all msm-bus functions to interconnect (icc) API
- Remove msm-bus sub-device probing and parse interconnect fields from
msm-vidc device tree
Change-Id: Ibf08c52e001c5fde7e30d2aedbd3456a270f5b6c
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
- Made the changes in video module to compile successfully.
- Removed cvp and v4l2 private files.
Change-Id: Iaf5f29d6042a87d5b96b1fa4abb985ee3e592f0e
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
Error recovery is enabled by default & it will get triggered
for all sys error reported by video firmware.
For debugging purpose it can be disabled as:
1. disable error recovery for noc error:
echo 1 > /d/msm_vidc/disable_err_recovery
2. disable error recovery for non-noc error:
echo 2 > /d/msm_vidc/disable_err_recovery
3. disable error recovery for all cases
echo 3 > /d/msm_vidc/disable_err_recovery
Change-Id: Ie260485842704d3e278ded8c6d1722bc19c80f6f
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
print logs based on logmask set on debugfs entry
(/d/msm_vidc/debug_level)
[1] 0xx -> print logs for all session type
[2] 1xx -> print only encoder logs
[3] 2xx -> print only decoder logs
[4] 4xx -> print only cvp logs
Change-Id: I8e01ee9c8b80a50b178ea87bf25d7ef25401f67a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Introduced CVP skip ratio property to indicate the number of
buffers skipped for CVP processing. This serves as a hint to Video
firmware to know the number of frames for which CVP metadata has to be
reused from earlier frame to which CVP metadata was sent
Change-Id: I58ad5daf9a9c6ae7a0aa48e3bd1d60e7dc9229e6
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Raise an insufficient event whenever there is a change reported
from interlace to progressive and vice versa so that driver can
set appropriate work/route mode.
CRs-Fixed: 2444064
Change-Id: Ic78867a2b51aa22de5dfeeb4b806014e2f0f23e6
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
[1] Maintain log_ctxt cookie to track debug information.
[2] Print codec type and session type by default in logs.
Change-Id: I6c01f3238ba868fdc525f5c60f58545a07bdef3a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Print session_id details in all possible call flow paths.
Change-Id: I0c583dc99d4ebee7fbcb4e36d917ba9120fa670e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Avoid allocating smaller encoder scratch1 buffer for Video
firmware when frame height is greater than frame width.
Change-Id: I663da164b3cbb945d7da2d6ab40199d8ef14d979
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
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