Video instances might still be alive at the time firmware unload
handler is called. As a result, firmware unload request is not propagated
to firmware. Add place holder to increase default delay for this request
to 1sec to wait until all instances are closed and successfully unload
firmware.
Change-Id: Id1e7455d40c1808690148046f9a839f1b79574ae
For 8K video, bse-vpp delay is 6, and one frame may
have maximum 600 slices according to h265 spec, so
need to increase max slice count to 3600 to allocate
large working buffer size for worst case.
Change-Id: Iab035b4cbe8c0121bf1e63d4f3e18c9436a16f5d
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
use num_vpp_pipes from platform_data to configure
workroute.
Change-Id: I5fea0d381402f9877fdb5d0df179bc0857016c56
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Add configurations specific to shima platform as per
H/W and spec.
Eg: Codec data, performance configs, fuse etc.
Change-Id: I4918af58dcafba3aaafa5eeaaaec256f8cbdca37
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Increase the delay between reset assert and deassert to a minimum of
400us, as required for Lahaina power sequence.
Change-Id: I8fb77b0746a7cc68ad3925b2e22b402cd0ff8070
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Thumbnail sessions are considered to be non realtime
sessions. Hence ignore the thumbnail sessions load on
device while calculating the load and mark thumbnail
sessions as perf session.
Change-Id: Ifa89c2f670fa631b6805a5d796a04e07e294ca4c
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Update min resolution support from 128x128
to 96x96 for decoder
Change-Id: Ib6b09af6c00323b67a1f50887d80e59148e6cfd8
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
During msm_vidc_probe, core->platform_data will be NULL, if
there is no match with compatible string in the of_dt table.
In msm_decide_dt_node sku-index check will be by passed due
to default value(0) i.e leading to NULL ptr dereference
exception in msm_vidc_init_core_clk_ops. So added check to
avoid subsequent calls, if core->platform_data is NULL.
Change-Id: I335a2836b2e34e79dcb8743816205d23f798617d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
With best fit configuration, the probability of getting
a mapping for video buffer increases even when the system
is fragmented.
Change-Id: I8689447ce1341fd1189b543eb9fb6a2e03edcc94
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
For 720p or lower, video hardware can run only in
a specific work mode. Fix the condition, so that
the work mode is configured as desired by firmware
CRs-Fixed: 2699234
Change-Id: I8f9ad5030e7a83075a9d2d1bfe2fc39774f4aa56
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Encoder calculate fps based on timestamp,
if fps changes and stable for 2 frames,
set to firmware to facilitate rate control.
Use closest rounding instead of floor rounding
when calculate fps.
Change-Id: Id2420729a309378107ff6f7830515fae31512ddd
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Static - Enable latency hint which indicates that the
decode session may go into low latency mode during the
session. With this configuration, video driver disables
DCVS and decode batching.
Dynamic - Enable or disable low latency control during
the session. Based on it, video driver would decide the
work mode and set the same.
Change-Id: If6e85b7adb1bbe4b4bec9e4a8671db64f240cfe8
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
VPP delay is not applicable to Thumbnail usecase. Hence buffer
counts should not include VPP delay, in thumbnail usecase.
Change-Id: Iba7d3efec48c08c160eb602d946643d620d2a36f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Uncomment HFI calling part for bitrate boost
setting.
Change-Id: I289b1866089fff883d624bb505b37cca4061a626
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Modify output driver min count to 4 for HEVC/H264.
Change-Id: I8efa986b693804392a6178b369ef43c7edf9e0d4
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
After grid flag enabled for HEIC, update min
input buffer count to 2.
Change-Id: Ia279b571af8c15e029a1cc77e3cbd3f6e51448f7
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Adjust the load by max image spec for concurrent
video and image sessions.
Change-Id: I433b3a4fb4436589b930a842a02033ac665a826c
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Assign enum_fmt_out to support input port enum_fmt.
Fix encoder enum_fmt compressd flag.
Change-Id: I822ee81586fe50bfe1fbfd8a808307051e639a79
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
After couple of buffer transaction, sometimes session will be idle,
So do not consider inactive sessions for clk scaling and bus vote
calculation.
Change-Id: Ib4cc7606da6c828ce1d9108528a2cbbad4e5f6e4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Shouldn't use count_min to validate dpb buffer count, as it
has already been modified when received seq change event.
Use dpb buffer_count_actual instead.
Change-Id: Iad4117e4d0045859312d726caae1c8801ba1b897
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
buffer counts(min_cnt, min_host, actual_cnt) is updated in
hal_buffer_requirements only for internal buffers. Currently
for dpb, we are updating only actual_cnt, due to that
msm_vidc_verify_buffer_counts check is failing. So updated
all 3 variables (min_cnt, min_host, actual) for dpb.
Change-Id: Ib6e476fae57407a2b5fb55b1b73986dfca410ae6
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
check total non_secure memory usage, reject the new
non-secure session, if total non-secure memory usage
exceeds the non-secure region size.
Change-Id: I2b0aaae061e5b022237a4c49c66e92461fb40fca
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
do not allow to open new session, if total video consumed
memory is beyond allowed memory_size_max_limit for video.
Change-Id: I6bfade01f99bae24691254744adf7ce38de51fdd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
calculate buffer size as per the max resolution
for the targets that does not support 4k and also
ensure the size is equal to YUV size by overriding
the div factor to 1.
Change-Id: Ia63676d30d1ee1e697518780a03a48010380555d
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
[1] add support for HFI_PROPERTY_PARAM_HEVC_PPS_CB_CR_OFFSET
[2] send (cb_qp_offset << 16 | cr_qp_offset) to firmware
[3] default:0 and overridden: -12
[4] firmware will subtract 12 from driver sent value.
0 maps to 12 to fw and bitstream has 0
-12 maps to 0 to fw and bitstream has -12
Change-Id: I286c7088640349691930c95e9b176e4e748c669a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Remove usage of core 1 since there is no support of IRIS1.
Change-Id: I5588b452455b592b8156ea4f46cb8e3171e14947
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
AON register programming is used to set NOC to low
power mode during IRIS2 power off sequence. However
AON register memory map is not applicable and hence
skipping AON register programming for lagoon.
Change-Id: Ib63248d118ed9fecfa5fa87925e8f69625dc1ba8
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
a. NOC error info registers are different for IRIS2_1 pipe HW
to IRIS2 HW. FW can retrieve the same info without NOC error
info registers. Hence removing the support to print NOC
error info registers for lagoon.
b. Since IRIS2 has noc error recovery enabled and same FW is
used for IRIS2 and IRIS2_1 pipe, only printing NOC error
info registers is disabled with out disabling noc error
recovery.
Change-Id: I936629e4f53faa5e25b2a64fb92378a26499ed57
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Initialize ubwc_stats_lock before use and destroy it before
video instance is destroyed.
Change-Id: I4ecc02109d9d1c3f8b7cfe28c49b5467866b4d3e
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Add to enable bitrate boost mode when rate
control mode is VBR and CAC is enabled.
The default boost margin is 25. This value
can be config from 0 - 100 by the client.
Change-Id: I4c3d0ae557052d3e615aee4c74b52ce0596fcfcc
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
Update colrcbuf_size calculations with frame width/height
in MB's instead of frame width/heigt in LCU's.
Change-Id: Ia84609e90c3bd6fb626cf759090e9ddcd1f86435
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
Change default width & height for 1080p to
QVGA. Having 1080p as default, creates issue in
concurrent sessions for low end targets where
max capability is 1080p.
CRs-Fixed: 2602438
Change-Id: I0ca9d8633af1882abd5dbfd113c7dd55cd399f0a
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Add vpu_ver as IRIS2_1 for lagoon and its
corresponding checks such as no CVP, ROI type,
buffer size calculators based on vpu version.
Change-Id: Ie26c015413c551ca430bb70822a4a65d61d56e11
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
During multiple error scenario, video driver prints
the properties of ongoing video instances. Add a log
to indicate if the session is of type image.
Change-Id: Ie23522bd31c9f5188c204c4a1eeae59a627d1976
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
As per the interface agreement, rg_data would communicate
the size of extradata. Update the same while creating the
packet.
Change-Id: Id61bce9486a11db5263c336b3284e81953a9a070
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Enable work mode 2 for image sessions where rc type
is Constant Quality(CQ).
Change-Id: I55b6abe8a0e28b3afc55c83456c02be19cf1e7cb
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
Updated BRS control to accept 0,1,2,3 values instead of boolean.
0 -> disable
1 -> 8-bit
2 -> 10-bit
3 -> both
Also, Internal blur is treated as adaptive in firmware with new
restrictions. Adding internal blur conditions accordingly.
Change-Id: I0aa525bc333acaeeddb5b68cf947030c25466154
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Video hardware supports RGBA888 compressed colorformat.
So, adding RGBA support in driver.
CRs-Fixed: 2610032
Change-Id: I5f69961c2df365058406fb8a1e5cb62e283385d0
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
Driver will internally produce subframe flag for all ETB of
a Superframe to firmware (except last ETB). Firmware will
propagate subframe flag to FBD. Driver client will receive
multiple FBDs with subframe flag for single Superframe ETB
(except last FBD). This subframe flag indicates that more
FBD expected for same input.
Change-Id: I627123ee2500dd7846363d8b819c3fa56234a494
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
Remove all VP8 profiling on lahaina for both encoder and decoder.
Change-Id: I575ffdced1dbe3db0b55243acb88de4fc8971f86
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
Add extra check to avoid NULL pointer derefernce when DEBUG_FS is
disabled.
Change-Id: Id89e5422c5afce0428dd77280788d50af0a22fec
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Introduced new property to configure start up delay for vpp processing.
This feature is enabled for AVC/HEVC 8k resolution case. Due to the delay
in vpp processing, ubwc stats structure is moved from ebd to fbd.
Ubwc stats changed from per buffer stat to worst case stat from current
dpb list. Introduced debugfs control "vpp_delay" to control delay of vpp
processing, range 0 to 31.
Updated min buffer count requirement due to vpp delay as well.
Change-Id: Ib2a07e4b5d7a9cbf3661258790276843ad714d37
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Return ENOMEM instead of ENOTSUPP when VP9 decode overload
occurs so that userspace can handle this error case correctly.
ENOTSUPP is not available in userspace.
Change-Id: I5260812bb00fde7eed02a29943a67af038e3c001
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
FBD packets may contain UBWC CR data information, for certain
targets. Packet size checks should take this into account.
Change-Id: I3ed5705fd6d5b78921aadb2f91c75a071a1f16b2
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Enable timestamp reordering by using the
calculated timestamps maintained in a
sorted order and associate with output
buffers. This would resolve the issue
if the parser sends incorect timestamps.
Change-Id: I870fd8ed25e05b8e86c677e79182e9c7785656a8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
B-frame enablement decision logic has been moved to HAL interface.
Hence, removing from kernel space.
Change-Id: I24943f7facf172f5b9f30fbc67692fd866d490cd
CRs-Fixed: 2615700
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Currently, both bitrate and frame-quality can be set for a CQ rc-mode
session. Adding additional check in driver to set only one of these.
Change-Id: I1ea7b08cf8c7fe90e35aa57f570703e8cdf854e9
CRs-Fixed: 2615700
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
Set the allocated encoder persist buffer to firmware.
Change-Id: I83fdf2dace76848e4a5ad4d8f3a85c9605b56cd0
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Video driver extending few standard controls value and
hence mark those controls as custom controls.
Change-Id: I373ed21482bb577c4fc5c28fd011098963608f53
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Use correct types in callback functions to avoid kernel
control flow integrity (kCFI) warnings.
Change-Id: Ia84a3d10ebb83407b4ac2c6140daec35e0698bd5
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
Check if the non-pix and pix prefetched memory is sufficient
Change-Id: I71561959a3ed1e9acdb654650144f35656230345
Signed-off-by: Akshay Chandrashekhar Kalghatgi <akalghat@codeaurora.org>