Commit Graph

1510 Commits

Author SHA1 Message Date
Deepa Guthyappa Madivalara
2e9e234e56 video: driver: allow fractional frame rate
- remove truncation for frame rate and allow
   fractional value as well

Change-Id: I7e48d3b4cb9ecf674fb17a08bbd8c3c0617d12a7
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-25 16:35:58 -07:00
Vedang Nagar
e2663ce820 video: driver: Remove inst check in video driver
Remove inst check from all the functions in video driver.
Inst check is present in most of the functions in video
driver which is not required.
Keep check only at root level functions and remove
from rest all of the functions.

Change-Id: Ib310cd3df5e8612a9fc3a5aa654dff4203a12906
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-25 21:04:49 +05:30
qctecmdr
ad201f4176 Merge "video-driver: additional changes to support bazel" 2023-05-25 08:23:45 -07:00
qctecmdr
bc8e64cf79 Merge "video: driver: ring buffer enhancements" 2023-05-25 08:23:45 -07:00
qctecmdr
3417d23343 Merge "video: driver: fix few warnings reported by static code check tool" 2023-05-25 08:23:45 -07:00
qctecmdr
2e53705d7c Merge "video: driver: Update session priority setting" 2023-05-24 13:15:07 -07:00
Vikash Garodia
3c69ab69a4 video: driver: fix few warnings reported by static code check tool
Static tool reported few coding style related warnings. This patch
fixes the same.

Change-Id: If7c75d8ecf0e2c1128bdd6f3fd3fb6148fcd457d
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2023-05-25 00:12:48 +05:30
Vedang Nagar
3018f2c1d3 video: driver: Update session priority setting
Modify session priority controls -
  ___________________________________________________________
 |  Description    |    HAL Value     |Driver value|FW Value|
 |_________________|__________________|____________|________|
 |Critical Priority| Vendor Extension | Via control|   0    |
 |      RT         |        0         |      0     |   1    |
 |      NRT        |     -1 to -4     |     1-4    |  2-5   |
 |_________________|__________________|____________|________|

Change-Id: I7b28109bde3968f38c2e3cc42cf4cf5dd195cc10
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-23 20:58:04 +05:30
Deepa Guthyappa Madivalara
def6b6328b video: driver: ring buffer enhancements
1. use max of operating and frame rate for fps
2. vpp_cycles is considered close to frequency
   corner if vpp_min_freq is greater than max
   required frequency

Change-Id: I9dc995ca16e4eeae18497a8648dfef64e16dfbc2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-19 15:22:26 -07:00
Darshana Patil
3424965c49 video: driver: enable EOS event for encoder
In case of encoder drain followed by immediate
stop usecase, fw might send drain last flag info
packet instead of last flag buffer due to
insufficent output buffers. In this scenario, driver
signals EOS through an event. To avoid sending last
flag buffer in some usecases and EOS event in other
usecases, to maintain consistency, always send last
flag information via EOS event to client.

Change-Id: Ib816603fb171a5f3f72f163614588490514f8c59
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-05-18 14:05:54 -07:00
qctecmdr
fdc186d299 Merge "video: driver: fix kw issue of pointer NULL checking" 2023-05-16 21:43:01 -07:00
Rakshitha Shakamuri
78f8b4095f video-driver: additional changes to support bazel
Adding new macro to enable bazel compilation by default

Change-Id: Id8b9682a99a693c80be65c09b8e4b3d492284b63
Signed-off-by: Rakshitha Shakamuri <quic_rshakamu@quicinc.com>
2023-05-16 14:49:13 -07:00
qctecmdr
8c6659988d Merge "video: driver: operating rate changes for latency improvements" 2023-05-16 12:27:37 -07:00
qctecmdr
bea5c5b73b Merge "video: driver: amend frame/operating rate settings" 2023-05-16 12:27:36 -07:00
Chen Sun
99fa31a0bb video: driver: fix kw issue of pointer NULL checking
Add NULL check to fix kw issue of possible NULL dereference

Change-Id: Ia2518b43a855831277981a662d10f24e122748ba
Signed-off-by: Chen Sun <quic_chesun@quicinc.com>
2023-05-15 23:36:26 -07:00
Deepa Guthyappa Madivalara
2ba0f6e1e7 video: driver: operating rate changes for latency improvements
1. allow any client set operating rate (less than 2^15)
2. remove operating rate dependency for admission control
3. allow turbo for low latency case as well

Change-Id: I4b0f29c3756a592a9baedec8996653e5cb5292d5
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-15 16:54:49 -07:00
Deepa Guthyappa Madivalara
1b94bd8174 video: driver: amend frame/operating rate settings
Amend frame rate or operating rate settings for encoder
to preserve precision value if numerator is greater than 1.

Change-Id: Idc84b07f7a5558b564efaac21d663a0deda207c2
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-05-15 14:03:46 -07:00
Vedang Nagar
4ccc58cfa9 video: driver: Update BaseLayer priority ID as Dynamic Property
Update BaseLayerPriority ID as dynamic property for pineapple

Change-Id: Ib036c8c47190842dff76fa45d50a65385ef28dca
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-15 23:57:31 +05:30
Akshata Sahukar
dbc5f268c9 video: driver: Align dec dpb buffer size calculation with HFI
Align decoder dpb buffer size calculated via HFI macro
HFI_NV12_UBWC_IL_CALC_BUF_SIZE_V2 with HFI file

Change-Id: I431bbee8bca07d87713bc7706259f679ab0734bd
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-05-12 13:11:32 -07:00
qctecmdr
85729d0bd6 Merge "video: driver: execute NOC reset sequence always in power off" 2023-05-11 22:04:49 -07:00
qctecmdr
5a2a237298 Merge "video: driver: Clear NOC_ErrCLr_low only in power on" 2023-05-11 22:04:49 -07:00
Deepa Guthyappa Madivalara
c971548bee video: driver: execute NOC reset sequence always in power off
- always execute noc reset sequnce in power off
 - try to disable hw power always before power down

Change-Id: I76757cccea06a398d1a79310edb688608607a413
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-11 13:01:02 -07:00
qctecmdr
b3f4c85880 Merge "video: driver: Update align buffer size" 2023-05-11 11:09:15 -07:00
Deepa Guthyappa Madivalara
a9547c3239 video: driver: Clear NOC_ErrCLr_low only in power on
- In noc error handler do not clear
   NOC_ERL_ErrorLogger_main_ErrorLogger_ErrClr_Low, to
   avoid sending any pending transactions, move clearing
   to power on

Change-Id: Ib620f3dcb93b92f2c03eb2126c47d5b97526556d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-10 16:52:50 -07:00
Gaviraju Doddabettahalli Bettegowda
52e24a2f0c video: driver: Update align buffer size
For decoder input buffers, firmware (BSE HW) needs 256 aligned
buffer size otherwise it will truncate or ignore the data after 256
aligned size which may lead to error concealment.

To resolve above issue, need to update buffer size aligned with 256

Change-Id: I7782d23e293a63ca9cb650fbefc574e5d4ad2f24
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
2023-05-10 06:41:30 -07:00
Darshana Patil
0eee7ddf6d video: driver: print offsets in packet log
print read index and write index in packet
log for easier debugging.

Change-Id: I4ba797ed141d74ba51941ef8a9f09db359b407e9
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-05-09 14:47:20 -07:00
qctecmdr
2e769cfc37 Merge "video: driver: updating the residency calculation logic" 2023-05-08 21:26:53 -07:00
Ashish Patil
29f2ca2429 video: driver: updating the residency calculation logic
- Instead of accumulating the residency stats for complete session,
the residency stats for previous instance of a particular clock
were overwritten by residency stats of next instance of that clock.
- Modified to the logic to accumulate the residency stats for
complete session.

Change-Id: Ic37579ba0c28f86cda41481b0615a0bb9a54846e
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-05-08 11:01:48 -07:00
Deepa Guthyappa Madivalara
c2bbf33511 video: driver: move NOC registers programming from Firmware to Software
- program required NOC registers in power on
 - update NOC error handling when fw raises HFI_SYS_ERROR_NOC
 - skip reading NOC error log registers from smmu fault handler
   as they are updated only when sys error from firmware is
   processed and fault handling is completed

Change-Id: If396995d8bd6c77e6a92c0c2a8a7fb245be48854
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-05 15:18:54 -07:00
qctecmdr
69175ede0e Merge "video: driver: Remove the unsupported ARGB32C format." 2023-05-04 18:27:09 -07:00
qctecmdr
55912d2fd8 Merge "Revert "video: driver: move NOC registers programming from Firmware to Software"" 2023-05-04 18:27:08 -07:00
DEEPA GUTHYAPPA MADIVALARA
3365847f8f Revert "video: driver: move NOC registers programming from Firmware to Software"
This reverts commit 862bae6da8.

Change-Id: Ida18c4ba7cc352240f5cc8596d9ac8caa45e6e04
2023-05-04 12:36:58 -07:00
Mihir Ganu
ebf3410136 video: driver: Remove the unsupported ARGB32C format.
Remove the unsupported ARGB32C (RGBA8888 UBWC) pixel format.

Change-Id: Ia5ce610c4d3306b5f50f5132c9533bd9e86f0a6f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-05-04 11:21:48 -07:00
Ankush Mitra
64c1a34e9b video: driver: fix logic of is_hevc_10_bit_decode_session api
This api should not call v4l2_colorformat_to_driver
in case of encode session.

Change-Id: Ibb702e427eef3f78a62213bb181750a1403679e5
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-04 10:31:29 +05:30
qctecmdr
96b24ac7d7 Merge "video: driver: adjust the residency print" 2023-05-03 21:49:25 -07:00
qctecmdr
7dd13b4760 Merge "video: driver: move NOC registers programming from Firmware to Software" 2023-05-03 21:49:25 -07:00
Ankush Mitra
956eb82150 video: driver: adjust the residency print
Adjust the residency print to have more
closer integer value.

Change-Id: Idc9605bd6be8f65ab8ec7b61059660abbf2e85fb
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-03 15:17:21 +05:30
Vedang Nagar
540823c3ac video: driver: Remove Suspend call from Close function
During msm_vidc_close, we are trying to perform suspend which
will unload the firmware. This is done to reduce the latency
since it will power collapse after 1.5 seconds.

But, during bootup time, for each codec, framework tries to
open and close each session for each codec. As part of this,
it will try to do power collapse/power on each time, hence
increasing the bootup latency.

Therefore Removed suspend call from close to avoid bootup
latency because video fw will anyway power collapse the
video hardware and firmware will also go into WFI mode.

Change-Id: Idbe015a6a2ef4dd1573ef01fd69d638fea7be519
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-02 20:56:09 +05:30
qctecmdr
205e95cd3d Merge "video: driver: separate i/o subscribe prop codec wise" 2023-05-01 10:29:51 -07:00
qctecmdr
4ff57f3faf Merge "video: driver: Add support to 1kx1k tile for HEIC encoding" 2023-04-29 10:04:29 -07:00
qctecmdr
191a8c5bef Merge "msm: vidc: Fix race condition between s_fmt & query_ctrl" 2023-04-28 23:36:22 -07:00
Akshata Sahukar
982e626d00 video: driver: Add support to 1kx1k tile for HEIC encoding
- Introduce new control to set HEIC encoder tile size from HAL
- Support 1k x 1k tile encoding along with existing 512 x 512
  tiling

Change-Id: Iaeffe421f8311d818695c3ae9af7cabcc8892043
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-04-28 10:07:48 -07:00
Ankush Mitra
2468a6c91b video: driver: separate i/o subscribe prop codec wise
Separate i/o subscribe prop codec wise.

Change-Id: Ia7f63b571142507eb4d7d5ea1c0197aa74679448
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-28 22:31:19 +05:30
Vedang Nagar
b4a1aefdd1 msm: vidc: Fix race condition between s_fmt & query_ctrl
- In s_fmt, there might be a codec change and here we are
  free the ctrl handler, at the same time client may call
  query ctrl and this will lead to null pointer access.
- To resolve null pointer access, do not free ctrl handler
  and add new codec controls to the same ctrl handler.

Change-Id: Iee87d5cb4d65e31d405cb1fc9f82bebab696d027
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-04-28 17:27:27 +05:30
Ashish Patil
c7216017e1 video: driver: moving private controls to common platform folder
Move private controls from each platform source files to
common header file

Change-Id: I22d8aa7f81919d950eed6b1f4ccd020c803a7ce9
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-27 12:59:14 -07:00
qctecmdr
499b46ecf7 Merge "video: driver: Compute Average Bitrate only for Queued/Deffered buffers" 2023-04-27 09:35:32 -07:00
Darshana Patil
6aaa2d38dd video: driver: reset pending_release flag
When fw sends FBD with release done flag,
reset driver pending_release flag. Without
this fix, a buffer will wrongly marked as
pending_release although release done was
already arrived from fw leading to issues
when trying to mark buffer as release_eligible
or when sending release command to fw.

Change-Id: Ib6b9f6233b133442057f3938159f6f0f33fc90f8
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-26 17:26:13 -07:00
Vedang Nagar
246d7ad413 video: driver: Compute Average Bitrate only for Queued/Deffered buffers
For Decode batching enabled case, max_data_size is being calculated
as the average of the data_size for all the buffers.
These buffers may contains EBD as well having data_size as 0,
which may reduce the average value by significant numbers and
hence reducing vsp numbers which may lead to vote clock to low
corners.
This may lead to slow decoding and hence Framework may drop the
frames.
Therefore, compute Average data_size only for Queued/Deffered bufs.

Change-Id: I12f155852dd750701b9448d3900b75f470eac126
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-04-26 16:14:16 -07:00
qctecmdr
76ac7dd6d5 Merge "video: driver: separate i/o subscribe prop codec wise" 2023-04-25 18:48:57 -07:00
qctecmdr
b6f94c9ee6 Merge "video: driver: adding average banwidth in stats logs" 2023-04-25 18:48:57 -07:00