نمودار کامیت

1192 کامیت‌ها

مولف SHA1 پیام تاریخ
Stanimir Varbanov
21974f4a60 video-driver: Move register manipulation functions
Move register manipulation functions in a common variant
file (msm_vidc_variant).

Change-Id: Ic92a264b47b4d90efcfb4389e30d2749a23f792b
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-26 09:42:41 -07:00
Stanimir Varbanov
cf7b4f85c9 video-driver: Move firmware code out of venus hfi
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>
2022-08-26 09:42:29 -07:00
Stanimir Varbanov
8b003fb153 video-driver: Abstract platform resources
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>
2022-08-25 19:26:32 -07:00
Stanimir Varbanov
a558b04808 video-driver: Delete not used clock_config_on_enable op
The operation is not used anywhere, delete it.

Change-Id: I4fe7cd41d63ea1b1e0792de6b3e98757860629d8
Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
2022-08-25 14:06:52 -07:00
Stanimir Varbanov
b52b9fd3c1 video-driver: Drop init_interrupt op
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>
2022-08-25 14:06:31 -07:00
Stanimir Varbanov
cca051abf4 video-driver: Setup ucregion from boot_firmware op
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>
2022-08-25 14:06:03 -07:00
Stanimir Varbanov
1020319ca4 video-driver: Move HFI queue functions out of venus_hfi
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>
2022-08-25 14:04:51 -07:00
qctecmdr
e77d578972 Merge "video: driver: fix encoder output buffer size requirement" 2022-08-23 21:07:43 -07:00
qctecmdr
ac24ed5217 Merge "video: driver: reset interface queue header for sys error case" 2022-08-23 21:07:43 -07:00
qctecmdr
f7b923fb87 Merge "video: driver: sessions without input data are skipped for power votes" 2022-08-23 21:07:43 -07:00
qctecmdr
bffb7c6070 Merge "msm: vidc: Fix for slice mode configuration" 2022-08-23 21:07:43 -07:00
qctecmdr
9a95bcd6b5 Merge "video-driver: Disabling VSP subcache for Halliday" 2022-08-23 21:07:43 -07:00
qctecmdr
91e54040b8 Merge "video: driver: fixes for upstream/downstream driver compilation" 2022-08-23 14:26:58 -07:00
Sachu George
963e12e58f video-driver: Disabling VSP subcache for Halliday
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>
2022-08-23 13:54:12 -07:00
qctecmdr
d0affa6c7c Merge "video: driver: add dynamic_allowed flag in database" 2022-08-23 11:17:23 -07:00
qctecmdr
7fda1ff3b8 Merge "video: driver: add video vsp subcache id support" 2022-08-23 11:17:23 -07:00
Darshana Patil
c4beadb5d2 video: driver: fixes for upstream/downstream driver compilation
- 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
2022-08-22 16:51:31 -07:00
Dikshita Agarwal
90fabfb02b video: driver: remove support for V4L2_EVENT_VIDC_METADATA
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>
2022-08-22 16:50:50 -07:00
Mahesh Kumar Sharma
7d00efc5dc video: driver: fix encoder output buffer size requirement
For some resolutions memory requirement was coming as 4 * yuv_size
and for CQ/RC_OFF it was 8 * yuv_size. With this fix it will be 
max 2 * yuv_size (+ 25% for 10 bit). Fix typo in 720P resolution check.

Change-Id: Ib5908f1eef8dca92dac46c5c195cd47ba28a4df4
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-08-22 16:00:50 -07:00
Akshata Sahukar
ec161663ce video: driver: fix hevc codec layer count support
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>
2022-08-22 15:53:08 -07:00
Govindaraj Rajagopal
3c75f5da07 video: driver: reset interface queue header for sys error case
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>
2022-08-22 14:53:50 -07:00
Vikash Garodia
8ff4bad25b video: driver: sessions without input data are skipped for power votes
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>
2022-08-22 14:11:08 -07:00
Manikanta Kanamarlapudi
5a0859f15d msm: vidc: Fix for slice mode configuration
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>
2022-08-22 14:00:42 -07:00
Mahesh Kumar Sharma
e0da5a7e44 video: driver: add video vsp subcache id support
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>
2022-08-22 12:38:21 -07:00
Darshana Patil
0b49e4ea40 video: driver: use standard EOS event
use standard EOS event instead of private
last flag event.

Change-Id: Iaeb2c57ceb80769de8cf94a63077eddf3710f871
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-08-16 10:07:52 -07:00
Darshana Patil
87557615b9 video: driver: add dynamic_allowed flag in database
add the missing dynamic_allowed flag for dynamic controls
in the database.

Change-Id: Icbdac824d668f2c0fdd86af8a1e5a4a4dd25a160
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-08-11 12:19:30 -07:00
Dikshita Agarwal
203f09ac3f video: driver: add mapping for missing colorspace vidc macros
Add mapping for missing vidc macros MSM_VIDC_TRANSFER_UNSPECIFIED
and MSM_VIDC_PRIMARIES_UNSPECIFIED.

Change-Id: I39fc60d98fe9f7c73d91768f5a0eb36e2c72a94c
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-10 13:19:26 +05:30
qctecmdr
1ee1d9c8e5 Merge "video: driver: define slice delivery as boolean control." 2022-08-03 10:39:31 -07:00
Dikshita Agarwal
f1a32f5a86 video: driver: define slice delivery as boolean control.
Make slice delivery a boolean control instead of menu.

Change-Id: Iedf8e0df882d61e82661c7f557473d3f7b49215a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-02 12:28:44 +05:30
Gaviraju Doddabettahalli Bettegowda
6fa776708b video: driver: Enable firmware core dump
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>
2022-08-01 17:55:43 -07:00
Govindaraj Rajagopal
473e46f0cc video: driver: add buffer statistics logic
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>
2022-08-01 17:55:39 -07:00
Govindaraj Rajagopal
912a80b094 video: driver: fix client_lock acquire sequence
Updated client_lock acquire sequence and cleaned
up timer list.

Change-Id: I413f31c8f4622f152598b08c9e107c77c03525cc
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-08-01 17:55:33 -07:00
Govindaraj Rajagopal
04ebbb2c2a video: driver: handle core_init failure in probe sequence
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>
2022-08-01 17:55:27 -07:00
Mihir Ganu
ce4198e97f video: driver: Update IRIS3 DDR line buffer BW calculation
Remove the temporary 2-pipe condition for DDR line buffer
write calculation for BW.

Change-Id: I75dba3106f0af9f7a6eb43036f86209202e22d5d
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:55:20 -07:00
Mihir Ganu
525f1f5071 video: driver: Adjust bandwidth calculations for AV1
Consider AV1 LCU sizes and add AV1 considerations
while calculating bandwidth votes.

Change-Id: I0a6bff1bb142fb0eed44d4c3c458a916d11d6f57
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:55:12 -07:00
Akshata Sahukar
c5d589a044 Revert "video: driver: 5 percent increase for vsp and vpp cycles"
This reverts commit 4fa2fc8142ee7aa9da4bf2da7bb6ab52d634ab17.

Change-Id: Iaa0156c0442fdbf928ba03aa2b833340601ff395
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-01 17:54:43 -07:00
Gaviraju Doddabettahalli Bettegowda
9789b56a49 video: driver: add change to support slice mode decode
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>
2022-08-01 17:53:54 -07:00
Akshata Sahukar
a8091c92b9 video: driver: Add queues init in video core init
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>
2022-08-01 17:26:31 -07:00
Sachu George
c1e000514f video: driver: Adding missing capabilites for anorak
Added mising capabilites in msm_vidc_anorak.c for the
changes submitted in msm_vidc_kalama.c

Change-Id: I3578cbc59e01d4ab41e1329bbc1a0ead7a7a5f65
Signed-off-by: Sachu George <quic_sachgeor@quicinc.com>
2022-08-01 17:22:31 -07:00
Vikash Garodia
9f34254da3 video: iris3: Fix the issue in power collapsing video hardware
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>
2022-08-01 17:22:18 -07:00
Manikanta Kanamarlapudi
2e52eecb78 video: driver: add vui timing info control
Add vui timing info control with default
value as disabled in driver.

Change-Id: Ibaa45303fe389a0120d487fe3b6ff336e721f359
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2022-08-01 17:21:57 -07:00
Deepa Guthyappa Madivalara
267e11c2a4 video: driver: set clock rate to max for DRC or DRAIN substates
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>
2022-08-01 17:21:40 -07:00
Darshana Patil
e4360dc18e video: driver: misc fixes for venv project
Change-Id: I4b5495ac4669a1e4519ac855d6b995e9d259f335
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-08-01 17:21:24 -07:00
Govindaraj Rajagopal
12adb66124 video: driver: add asynchronous probe support
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>
2022-08-01 17:21:04 -07:00
Akshata Sahukar
089b0f125b video: driver: 5 percent increase for vsp and vpp cycles
8k@30 fps encode has a very low margin for sw/fw at 338MHz.
Hence, increase core clock little bit(5%) to move to the next
corner i.e., 366MHz.

Change-Id: Idebde3c726086ec49d1fb0ca4525953dd3a30ba9
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-08-01 17:20:33 -07:00
Renjiang Han
da980f7582 video: driver: Set the fps of vp9 to the standard value
180fps is not a standard value, so we need to change
MAXIMUM_OVERRIDE_VP9_FPS to 200.

Change-Id: Ia32fc20598b8a2908ec3057dd0b00b40ea429b42
Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com>
2022-08-01 17:20:14 -07:00
Mihir Ganu
34c527a939 video: driver: Subscribe to output metadata in both ports
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>
2022-08-01 17:19:58 -07:00
Akshata Sahukar
50a00f8265 video: driver: Avoid device crash after fence usecase execution
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>
2022-08-01 17:19:38 -07:00
Mihir Ganu
1e87ceec2b video: driver: Introduce a property to set COMV bufcount
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>
2022-08-01 17:19:20 -07:00
Sachu George
b79ec844f2 video-driver: Updating H264 Decoder CMD_BUF size calculation.
Internal Buffer(CMD_BUF) size calculation is changed from (3 * 4) to 48
in firmware for H264 decoder. Aligning with same calculation in driver.

Change-Id: I974bca7d2e128cee24bf237b6f9ea606f386031d
2022-08-01 16:23:49 -07:00