Wykres commitów

1220 Commity

Autor SHA1 Wiadomość Data
qctecmdr
fdc186d299 Merge "video: driver: fix kw issue of pointer NULL checking" 2023-05-16 21:43:01 -07:00
qctecmdr
8c6659988d Merge "video: driver: operating rate changes for latency improvements" 2023-05-16 12:27:37 -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
qctecmdr
b3f4c85880 Merge "video: driver: Update align buffer size" 2023-05-11 11:09:15 -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
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
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
4ff57f3faf Merge "video: driver: Add support to 1kx1k tile for HEIC encoding" 2023-04-29 10:04:29 -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
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
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
Ashish Patil
2160e99d3d video: driver: adding average banwidth in stats logs
average calculation for llcc and ddr bandwidth for 2 seconds window
is printed in stats logs

Change-Id: I3507a0117c65b723644d00c89c7d466130d4a467
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-24 15:56:18 -07:00
Darshana Patil
3e0952dacc video: driver: fix release issue for superbuffer
In VP9 superframe usecase one ETB has multiple FBDs,
and the EBD is after the first FBD.When driver receives
first FBD that is not in DPB_LIST, it releases this buffer.
Later on when the EBD arrives with dpb list property and
it turns out that first FBD for which release was sent is
actually in DPB_LIST, causing FW assertion.

To fix this issue, in the reverse path, when handling
dpb list property, mark those read only buffers which
are not in dpb list as release eligible. Later, in the
qbuf path for output buffers, send release for all those
buffers which were earlier marked as release eligible.

Change-Id: I5d6035b808653478311f41ebe53f60e728c7dd2a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-24 14:06:35 -07:00
Deepa Guthyappa Madivalara
862bae6da8 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: I0195515ff1640aabe8e6db85803b49fde645808f
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-04-21 10:03:58 -07:00
Ankush Mitra
0a26c4b8ce video: driver: separate i/o subscribe prop codec wise
Separate i/o subscribe prop codec wise.

Change-Id: Ib4ba9d6d491f26bad9798c0d4d9be62b272d6421
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-20 17:56:09 +05:30
qctecmdr
df3230b3d3 Merge "video: driver: Amend the internal buffer reuse logic" 2023-04-18 17:13:10 -07:00
Mihir Ganu
9696ea3789 video: driver: Amend the internal buffer reuse logic
Amend the driver internal buffer reuse logic:
1. If firmware releases the buffers as a response to driver request
(e.g during RESUME), destroy internal buffers explicitly after
firmware releases them.
2. If firmware releases the buffers independently, (e.g as a part of
STOP command), remove the QUEUED attribute but do not destroy them.
During the following port streamon sequence, driver can determine if
buffers can be reused or if they should be destroyed.
3. Do not reset buffer list size/count field when destroying released
internal buffers as the list can contain new active buffers. Resetting
causes a race condition and interferes with buffer reuse checks.

Change-Id: I030949d2400daa40b6b97b51f086ccc1b41e080f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-18 08:46:44 -07:00
Govindaraj Rajagopal
c4f5dc6069 video: driver: fix queuing too many output buffers to firmware
Client is setting NV12 fmt as OP format before initial reconfig
So during input port stream_on, subscribe_input_property is
failing due to ubwc check(NV12 fmt), so DPB_LIST cap is getting
disabled, but later client is setting NV12C during reconfig.

So msm_vdec_release_nonref_buffers() during qbuf is bypassed and
release cmd is never sent to fw for pending ro buffers. Infact
entire RO handling at driver side is disabled.

Looks like due to some reason client was not requeueing same
buffers at same slot, So eventually number of pending RO buffers
increasing over the time. Once count shoots more than 256 fw
assertion happens and i.e leading to system error.

Remove UBWC check while subscribing input port properties, so
DPB_LIST willbe subscribed always and avoids above mentioned
issues.

Change-Id: I57ea0ea637ae3a57fcad430b212dcdb10f8e6d0f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-04-18 16:32:10 +05:30
Govindaraj Rajagopal
e0f81d8681 video: driver: allow updating substate for CORE_DEINIT case
Currently updating substate in CORE_DEINIT state was not
allowed. So i.e leading to issues at page fault cases.
Added change to allow updating substate for CODE_DEINIT
case as well.

Change-Id: I1c2cd089ca5c2172c8d672ef1f3701bec7bcc8c2
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-04-14 14:34:17 -07:00
Ashish Patil
0b7870402e video: driver: Add info for uniform AV1 tile handling
read the av1 uniform tile handling propert from fw
and display it. Required in debugging av1 usecases for
power calculation

Change-Id: I443e5afd591a8131c667c64cebb417fc022693ac
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-12 14:18:20 -07:00
Ankush Mitra
0ed6c8a929 video: driver: ignore set control for DRV_VERSION
Ignore set control for DRV_VERSION.

Change-Id: Id81ee10486d5e4c4fefd410b5236653174278066
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-11 15:49:25 +05:30
Ashish Patil
25b67cad8e video: driver: modifying log level
modifying log level from error to high
in power suspend API

Change-Id: I6df3572506fb8cc12b7b0eb60cb1fa8049eacf5e
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-07 11:30:13 -07:00
qctecmdr
005d5f44ef Merge "video: driver: remove core capability pointer" 2023-04-07 09:22:36 -07:00
qctecmdr
6a9848a4ad Merge "video: driver: Move private color definitions from UAPI" 2023-04-06 22:12:09 -07:00
Ashish Patil
cb18a42fa6 video: driver: added support for av1 uniform tile handling for power calculations
If the av1 tile rows and columns are greater than recommended decoder
av1 settings,vote for higher frequency.

Change-Id: Iea9f542e0b925a9ecb063c11b1827f31164f5a7b
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-06 14:17:21 -07:00
Ankush Mitra
6bdbae50f2 video: driver: remove core capability pointer
Remove core capability pointer.

Change-Id: I42f4c5cb7f8a0791b8c5f84d5f0d953be3bf80d6
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-06 10:56:57 +05:30
Mihir Ganu
b803968cf6 video: driver: Move private color definitions from UAPI
Move private color definitions from UAPI to driver internal header
file to reduce UAPI dependencies.

Change-Id: I667c3efc965fdc7b7dc1ad52e1b0bcf0c964e979
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-05 10:51:34 -07:00
Ankush Mitra
e450d8eaa3 video: driver: remove capability pointer
Remove capability pointer and allocate
memory with max cap size.

Change-Id: I7f53e3b35439f91b72f057695b6e63f71bfecc0a
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-05 11:58:48 +05:30
Darshana Patil
7affdd1031 video: driver: adjust properties during reqbufs
- Adjust v4l2 properties during reqbufs of
  master port. Set properties to firmware
  during streamon of master port.
- Calculate buffer size and buffer counts
  during reqbufs call of each port.
- This is done to recalculate buffer sizes
  and counts after client has configured
  all the controls and updated size and
  count can be returned to client before
  streamon.

Change-Id: Ifc7ee36456d5d4e1c862952de581af3d7ae126b0
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-03 10:09:31 -07:00
qctecmdr
50631f4a43 Merge "video: driver: misc synx fence changes" 2023-04-01 19:10:25 -07:00
qctecmdr
84cf6e7976 Merge "video: driver: add streamoff handling in close state" 2023-03-31 13:59:09 -07:00
qctecmdr
547e7c4988 Merge "video: driver: add try_fmt allow checks inside state handler" 2023-03-31 13:59:09 -07:00
qctecmdr
93646b1a4d Merge "video: driver: enable memory tracking in stats handler" 2023-03-31 13:59:09 -07:00
Akshata Sahukar
be793d6501 video: driver: misc synx fence changes
- Make synx fence debugfs support as module parameter
- Update sync fence related register device addresses to
  eliminate memory holes
- Enable hw fence config parameter to enable compilation
  of hw fence definitions in display driver
- Handle synx fence queue memory error in control status
  register.
- Fix msm_vidc_debug and msm_vidc_fw_dump module params
  ro accept values during module instantiation.

Change-Id: Ib3ab7e80cfc4e440c0b3170292e1943888298875
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-29 09:57:57 -07:00
Akshata Sahukar
203f619b7f video: driver: Add support to handle synx fence related hfi props/info
Add support to handle synx v2 fence related hfi properties and
infos mentioned below:
- HFI_PROP_FENCE_CLIENT_DATA
- HFI_PROP_FENCE_TYPE
- HFI_PROP_FENCE_DIRECTION
- HFI_PROP_FENCE_ERROR_DATA_CORRUPT
- HFI_INFO_FENCE_SIGNAL_ERROR

Change-Id: Ifac0230dbeb0da80c104860c0e115167e82e85c6
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-28 18:11:45 -07:00