Introduce CAP_FLAG_META flag to differentiate metadata caps
from non metadata caps.
Change-Id: I7a3d2c5fb952e5d829002a04d11fa7b05b2c9297
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Move __lut, __compression_ratio and __dump functions
form venus_hfi.c to msm_vidc_power.c where they belongs.
Change-Id: Iafabf1c61a9602ea9b2c067663e46e12b88266b8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The file msm_vidc_bus.h is not used, delete it.
Change-Id: I21503a1cfb35bf6e93fe92a5c6a9286d29135e12
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
All firmware related code is moved into a firmware file.
This is part of cleanup of venus_hfi.
Change-Id: Ie915e47644dbbbe73c941488fff6db6e40160b90
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
Move clocks, gdsc, bandwidth resources out of venus_hfi and
use the ops in variant and venus_hfi code.
Change-Id: I1be77c9d384f4eef2cb8085b75c39dc3fd3eeb86
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The operation is not used anywhere, delete it.
Change-Id: I4fe7cd41d63ea1b1e0792de6b3e98757860629d8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
The init_interrupt op is not used out of variant, lets
remove the op and used the functions directly.
Change-Id: I8f97cf503503b7f30e824843a5bd9d93c702241a
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
On all places ucregion setup is done just before calling
boot_firmware, move setup in boot_firmware op and remove
ucregion_setup op.
Change-Id: I91a9a72d3b88eef91e82e19b9d8629e9731211f5
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
Split HFI queue functions in separate file. This will
unload venus_hfi and also will make possible to reuse/shared
with other drivers.
Change-Id: I16155e649f216afc6f26db76b565aad28b114cc7
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
VSP subcache support is not available in 5.10 kernel.
Hence needs to be disabled for Halliday.
Change-Id: I8e0905d537d8df3c72063b2e8dc5011d8e0ff785
Signed-off-by: Sachu George <quic_sachgeor@quicinc.com>
- do not use vidc_v4l2_extensions.h for upstream driver compilation.
- resolve compilation issues in upstream and downstream driver due
to above change.
- add volatile flag in the database.
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Change-Id: I1985cae29a459af2250f7044d85c5cd22cdd68f7
remove support for V4L2_EVENT_VIDC_METADATA as it is not
being used.
Change-Id: Ia375d0410d144d2e3b9cd78bc0fde16cfa0d0884
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Support only 4 total layers for hevc non vbr rc type session
as per PRD.
Change-Id: Ifc425de75804552717919e6be71788dd59fb086b
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
interface queues were allocated only once and reused for entire
lifetime, but un-consumed packets in the queue during sys_error
is leading to undefined behaviour for the next session.
For e.x, after queueing cmd_init, received sys_error, so core
will be deinited and sys_init willbe sent again as part of next
session_open, but FW is consuming 1st cmd_init pkt and sending
init_done but driver is expecting done for 2nd cmd_init, So
i.e treated as fatal and driver is closing the session and
doing core_deinit.
To avoid above mentioned issue, made changes to reset queue hdr
incase of sys_error.
Change-Id: I3ebba24ed4975fbf2b16f914c28b9ae72878fb03
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Video driver has a logic to vote for maximum power resources for
initial few frames. If any video session remains within those
initial few frames, the votes calculated would reflect as maximum.
To handle such video sessions, there is another logic to check
if the video session has any input buffer to process. If there
are no input buffers to process for that session, there is no
need to consider that session for power resource voting. Hence
skip the votes aggregation for such sessions during concurrency.
Change-Id: Ib5d678b92a81a48100f404421e9356a7226658b0
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
When layers are enabled, bitrates are set layerwise.
Need to add the cumulative layer bitrates and calculate
bytes per slice accordingly.
Change-Id: I17616a3b4f73d33c32badbbf8b9aacb60123f54a
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
In order to improve video hardware performance, a new BLE is added
in system cache to get additional bandwidth.
To enable new system cache, video sw driver reads device tree entry
and enables it in Video FW.
Change-Id: I20025a8095c9981f8533062bdee9a6952df231a3
Signed-off-by: Mark Bao <quic_mbao@quicinc.com>
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
use standard EOS event instead of private
last flag event.
Change-Id: Iaeb2c57ceb80769de8cf94a63077eddf3710f871
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Make slice delivery a boolean control instead of menu.
Change-Id: Iedf8e0df882d61e82661c7f557473d3f7b49215a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Currently firmware core dump enabled via debugfs, so
added changes to enable fw core dump from sysfs.
Command to enable and disable fw dump:
adb shell "echo 1 > /sys/module/msm_video/parameters/msm_vidc_fw_dump"
adb shell "echo 0 > /sys/module/msm_video/parameters/msm_vidc_fw_dump"
By default it will be disabled.
Change-Id: I4b24c040e819e257edd26f695a095e254245251c
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
Added change to print etb, ebd, ftb, fbd,
(ebd-etb), (fbd - etb), (etb-ftb) wallclock
time in ms.
It will help to debug perf issues.
Change-Id: Ideaecb2d51763711d6628729aa0f9056d05f0d51
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
component bind cb is called from last bound subdevice context,
so if core init fails then i.e treated subdevice probe failure
and leading to undefined behaviour in protect_cp_mem() sequence
during fw_load(). So treat core_init failure as non-fatal since
it will be attmepted again during session_open.
Due to async-probe subdevice probe is called in parallel threads
so use core_lock() while populating context-bank entries into
&core->dt->context_banks list.
Change-Id: I45a891dbe589cfd011108365094b543202c0291e
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Added new capabilty changes to support slice based decoding.
This feature basically enables to decode the given input in terms of
slices and deliver single output to the higher layers when all slices
decoded in a frame.
When HW receives the slices then it will start decoding the slices,
instead of waiting for all the slices belongs to same frame.
So this will help to achieve lower decode latency.
Change-Id: Id107b34baba6d7b4a88238e232e8bf4a0fd6e58e
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
Call venus_hfi_interface_queues_init() from venus_hfi_core_init()
to initialize the hfi queues if they were not initialized already
in probe sequence.
Change-Id: I855d2b2b6404a1a2af79157576f07e5a0c207fb6
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
During power collapse, video driver would power collapse video
hardware followed by video controller.
While power collapsing video hardware, it may happen that video
firmware has already power collapsed the video hardware, since
it is hardware controlled. For certain cases, like XS WD, it
may happen that video hardware may not be power collapsed by
video firmware. In such scenario, skipping power collapse sequence
of video hardware would lead to unhandled transactions from video
hardware.
There is a power status register which can clearly suggest if the
video hardware is power down or not. Added a check to confirm the
power status of video hardware before skipping or executing the
power collapse sequence for video hardware.
Change-Id: Ibd9cd708a259897262fcc6cab27b26aaf37f1b13
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Add vui timing info control with default
value as disabled in driver.
Change-Id: Ibaa45303fe389a0120d487fe3b6ff336e721f359
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
Increase clock rate to maximum in case of DRC or
DRAIN substates to speed up DRC or DRAIN sequences.
Change-Id: I0fd63b97267d37c18ad2d05069ab494b1b37fea8
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Added async probe for video driver to reduce bootup latency.
In insmod/probe sequence, registered all video sub-devices with
component_model framework, so that once all sub-device probe
completes master/vidc node bind() callback willbe called. So as
part of bind, video driver will do core_init sequence. Due to
async probe all sub-device probe willbe called asynchronously
from different threads.
During rmmod/remove sequence master/vidc node may not be called
first and instead child node remove might be called, which will
intern calls component_del() api. 1st call to this api will
internally invoke unbind() callback of master. So as part of
unbind() video driver will do core_deinit() sequence.
of_platform_depopulate() will act as sync point on master node.
Which will make sure all residual sub-device removal completion.
So it will guarantee video device/master cleanup happens only
after all sub-devices removal.
Change-Id: Ia40d4b1aa54633ef26fff2c207da78f15e305363
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
Subscribe output metadatas in both input and output ports
so that metadatas which are detected in bitstream before
output port is started are not missed.
Example: AV1 HDR metadata which can be part of first ETB
(sequence header OBU + metadata OBU)
Change-Id: I77d75b42dcee79e0258ba96e6ab86d06ead2eaf4
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
Since spin lock for fence is per session based and stored in instance
memory, by the time fence consumer released the fence, driver close
might be called and instance memory might be cleared. So, when fence
consumer released the fence, at the time of fence release callback,
this spin lock might nt be available. This race condition is resulting
into device crash after fence playback session ends. Avoid this by
using per fence based spin lock, which decouples it from instance
memory.
Change-Id: I12d6976c0bac3f0211bb16e24009603b37471ef3
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
Certain codecs/use cases require larger COMV buffer sizes to achieve
performance. Introduce a property to set COMV bufcount and calculate
COMV buffer size based on the bufcount.
Change-Id: Ib0ed8afe77708dc453cbcc121bcd8606db637152
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
Define vidc macros corresponding to private v4l2 macros
defined in v4l2_vidc_extensions.h file in msm_vidc_internal.h
and use the same wherever applicable for successful
compilation of upstream driver.
Change-Id: I2c7b3741d29996beb35b08b9c6dbd88876bb6ca6
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Move the usage of v4l2 macros in helper functions to
avoid compilation issues on upstream kernel with private
codec defines.
Use vidc macros defines in code instead of v4l2 defines
wherever applicable.
Change-Id: I43d7deb4f84c502689ceaec3273803444f30f379
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Move mapping of v4l2 to vidc macros for codec, color format,
color primaries etc to target specific file to restirct the
usage of private v4l2 defines to target specific file.
Change-Id: Ie83968cb944c756e55b6514c496c0b23c5d16413
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Update all functions in msm_media_info.h to use vidc color formats
instead of v4l2 color formats macros to restrict the usage of private
color format defines in only helper functions.
Change-Id: Ib308c76af7b16ddac93023202191a47b21d68f5c
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Use cap_id instead of ctrl_id while assigning the respective
hfi values for a v4l2 control and vice versa.
Change-Id: I42f3733a28b4b00ca04605dfc1d2ef0a6fb7833d
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>