Wykres commitów

468 Commity

Autor SHA1 Wiadomość Data
qctecmdr
f594a33c13 Merge "video: driver: Add support for enc downscaling" 2021-04-21 18:31:17 -07:00
Maheshwar Ajja
03c7742be5 video: driver: handle core init failure cases
Core init failure is handled properly in order to avoid
undefined or unexpected errors while doing core deinitialized.

Change-Id: I89e234e6d9286b993547080551ba54ee7e643e59
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-21 17:48:11 -07:00
qctecmdr
17347ff881 Merge "video: driver: increase max buffer count" 2021-04-19 20:01:44 -07:00
Maheshwar Ajja
30d2ef55b4 video: driver: increase max buffer count
Increase max buffer count to release the buffers,

Change-Id: I34774a8e99c7a5c78f79e8ca101e6135a22e7f30
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-19 19:20:49 -07:00
Maheshwar Ajja
09356ed279 video: driver: amend delayed unmap feature
Due to delayed unmap feature on decoder output buffers,
refcount will become one when no one uses the buffer
in driver. In release done functonality, remove the
buffer from maps list only if refcount equal to one.
If refcount is more than one indicates the buffer is
being used, so do not remove from maps list. There are
chances that same decoder output buffer might be queued
by the client in which case we are not supposed to
unmap it from maps list in release done.

Change-Id: I69250c3efa89d77055e89770fd441af1fb50b755
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-19 19:05:36 -07:00
Maheshwar Ajja
da6943c26a Revert "video: driver: refine refcount handling for release buffer"
This reverts commit bdd7a33bfb.
2021-04-19 19:03:23 -07:00
Maheshwar Ajja
ebf199bf2f Revert "video: driver: update device_addr for comparison"
This reverts commit a4905e8bfd.
2021-04-19 19:03:06 -07:00
Maheshwar Ajja
abe44a0089 Revert "video: driver: handle release during batching"
This reverts commit 0f066190b1.
2021-04-19 19:02:41 -07:00
qctecmdr
6b20be1d9b Merge "video: driver: Fix bin buffer allocation in secure usecase" 2021-04-19 15:52:57 -07:00
Darshana Patil
0f066190b1 video: driver: handle release during batching
Before output buffer is queued to FW,
checking if it is pending release and refcount
accordingly. The check needs to be added just
before queueing to FW to handle batch usecase
as well.

Change-Id: I2d394b5642ed8fa916e86ebc59ea414300415fab
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-04-16 22:27:02 -07:00
Chinmay Sawarkar
3964d13a63 video: driver: Fix bin buffer allocation in secure usecase
In Secure session, BIN buffer should be allocated from Secure Bitstream
region. Allocated buffer must be hypassigned using the DMA buffer
Lend call.

Change-Id: If5303e78975aab55ac7475ca3ac9f6272585a44b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-04-16 21:57:20 -07:00
Akshata Sahukar
7611922612 video: driver: Add support for enc downscaling
Add support to encode bitstream with downscaled resolution.

Change-Id: I04ab289758e1d1566924ec4b017e6d081c8f01aa
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-16 13:43:39 -07:00
qctecmdr
0b0c83bd88 Merge "video: driver: update device_addr for comparison" 2021-04-16 11:55:22 -07:00
qctecmdr
0f7226072a Merge "video: driver: add ROI metadata support" 2021-04-16 11:55:22 -07:00
Govindaraj Rajagopal
a4905e8bfd video: driver: update device_addr for comparison
Compare buffer with release list only after updating
buffer device_addr field.

Change-Id: Ie1c21fd9496fb4deb735938efeff61b90b96362f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-16 22:05:10 +05:30
Govindaraj Rajagopal
bdd7a33bfb video: driver: refine refcount handling for release buffer
If current qbuf entry is already present in release buffer list,
then as part of release done, refcount will get decremented and
for current qbuf, there is 2 possibilities of outputs from fw.
FBD with RO and wo RO. So if firmware gives FBD with RO, we are
currently decrementing refcount from 1 -> 0. So mapping gets
destroyed. But firmware is still holding RO referrence and
leading to smmu fault issues. So added hadling to increment
recount by 1, if current buffer(qbuf) is already present in
release buf list.

Change-Id: Icbe8ce0b1c9b47c4450d17650b63a575e1037ce3
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-16 14:39:18 +05:30
Darshana Patil
2c0cab5146 video: driver: add ROI metadata support
add extra size for input meta buffer
when ROI metadata is enabled.
add dependency of rate control and
color format.

Change-Id: Icefd3f9e319d596f88090cee331417c0b2946180
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-04-15 21:50:00 -07:00
qctecmdr
5f36c047b4 Merge "video: driver: packet size sanity checking" 2021-04-15 16:53:35 -07:00
Akshata Sahukar
9dfd528742 video: driver: packet size sanity checking
- Payload ptr is dereferenced even when response packet does not
  contain any payload. Avoid the same.
- Fw may send HFI_FW_FLAGS_INFORMATION for property packet whenever
  benign error occurred in fw for the sent property. Print the same
  instead of considering the property as invalid port property.

Change-Id: I0c61861c14fefa689d342f991693c33da289c572
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-15 15:01:27 -07:00
qctecmdr
32ee5068d6 Merge "video: driver: Enable META_LTR_MARK_USE for enc o/p port" 2021-04-15 14:26:14 -07:00
qctecmdr
4db216ad30 Merge "video: driver: Allow priority control in streaming state" 2021-04-15 13:26:53 -07:00
Akshata Sahukar
d0fa618b52 video: driver: Enable META_LTR_MARK_USE for enc o/p port
META_LTR_MARK_USE is enc output metadata. Hence, avoid enabling
encoder input metadata for META_LTR_MARK_USE.

Change-Id: I667f2f1a74e73b753447fc2dc9709cb1983c2249
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-15 13:10:43 -07:00
qctecmdr
da0cbb9193 Merge "video: driver: select target and vpu variant based on dtsi" 2021-04-15 12:31:19 -07:00
Manikanta Kanamarlapudi
8c7c63ec2d video: driver: Allow priority control in streaming state
Allow priority control in streaming state

Change-Id: I98a0983026fdb37f6a5b94fb73082032158a7743
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2021-04-15 10:53:10 -07:00
qctecmdr
18c7822b0d Merge "video: driver: add fix to avoid race condition in session close" 2021-04-15 10:21:19 -07:00
Govindaraj Rajagopal
6f281973aa video: driver: add fix to return all buffers back to client
If client attempts streamoff and msm_vidc_close sequence
concurrently, then all buffers not returned back to client,
i.e leading to warnon at vb2_queue_cancel at vb2 layer.
So added change to send vb2_buffer_done at driver fd close
sequence.

Change-Id: I43d779000501907d12d5ba8e90e007bdf5b8b801
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-15 20:33:16 +05:30
Govindaraj Rajagopal
3d6ff3ea8e video: driver: add fix to avoid race condition in session close
Some clients attempt to invoke streamoff & driver fd close
(msm_vidc_close) sequence concurrently. So there might be chances
some commands willbe posted to command queue even after closing
hfi session(HFI_CMD_CLOSE) completed. So due to invalid session_id
firmware asserts.

Added change to avoid above mentioned issue and also amended minor
logging changes.

Change-Id: I2896567916cf5d18eb5b2a148efccf9bf07af3ea
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-15 20:30:41 +05:30
Govindaraj Rajagopal
b1fbc46396 video: driver: select target and vpu variant based on dtsi
- enable conditional compilation based on defconfig
- compile only needed files based target & vpu variant
- enabled stubs to avoid compilation issues, for all
  target variant and vpu types
- add support for qcv(same lunch combo) for different
  PT & VT chipsets.

Change-Id: Ic446349fd1532885d7a2e94895d807c62f1ab6e4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-15 20:14:04 +05:30
qctecmdr
9635a177c9 Merge "video: driver: Use cabac for power calculation" 2021-04-14 14:49:43 -07:00
Akshata Sahukar
5a2b2ee399 video: driver: Add support to adjust slice mode
Add support to adjust slice mode.

Change-Id: Id09e951b3085c55cc5bc6b15a2ce002645923435
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-13 17:12:27 -07:00
qctecmdr
140af50ab5 Merge "video: driver: Reduce log level for non-fatal logs" 2021-04-13 14:17:34 -07:00
qctecmdr
7dec42ac00 Merge "video: driver: Add null pointer check for inst" 2021-04-13 14:17:34 -07:00
Mihir Ganu
bce0861f13 video: driver: Use cabac for power calculation
When cabac_session property is subscribed, fw updates this
session info. This should be used to adjust power
caculations.

Change-Id: Ica4d2ee664f2a0a9ea41ec4d74bd2b21e9116931
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-04-13 12:16:24 -07:00
Mihir Ganu
00d9596313 video: driver: Enable CR/CF UBWC stats
Use firmware values of Compression Ratio (CR) and
Complexity Factor (CF) for bandwidth calculations.

Change-Id: Ia6d3c45afc834bc872ac4e0597a2ecb95eb81682
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-04-13 11:31:43 -07:00
Mihir Ganu
a15a1ac976 video: driver: Reduce log level for non-fatal logs
Reduce the log level for non-fatal logs to avoid
log flood.

Change-Id: I170102d6ed457a1fb88dd8b81fc631eddc17a235
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-04-12 20:07:50 -07:00
Akshata Sahukar
1a9ffe6b32 video: driver: Add null pointer check for inst
Check for null pointer for instance before deferencing
the instance.

Change-Id: I9236305dcde87e50732aa006a3a47a585bcf096b
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-12 18:27:43 -07:00
qctecmdr
7d77efb5bc Merge "video: driver: handle dpb list property" 2021-04-12 14:33:17 -07:00
qctecmdr
bb93aa7f4b Merge "video: driver: power collapse only if no sessions present" 2021-04-09 19:15:46 -07:00
Darshana Patil
23605ffffb video: driver: handle dpb list property
- subscribe for dpb list property in combined
 mode on output port.
- copy dpb list property payload from fw to
 static array.
- using this array, mark read_only list buffers
 as non-reference if not part of array. if count
 of such buffers is greater than output min count,
 send to fw for release.
- once fw returns them, destroy these buffers.
- unmap stale output mappings due to lazy unmap feature.
- unify release internal functions into common function.

Change-Id: Id32f04efb19eecaff453cc4383ee8296a0246263
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-04-09 18:21:34 -07:00
qctecmdr
d39b4f2b7d Merge "video: driver: follow recommended reset sequence" 2021-04-09 13:21:30 -07:00
qctecmdr
5fc9f66269 Merge "video: driver: Fix buffer type and region mapping" 2021-04-09 12:35:39 -07:00
Chinmay Sawarkar
29f8295bae video: driver: Fix buffer type and region mapping
Fixed incorrect mapping and restructured code for readability.

Change-Id: Iaef5e780d168883ff2cc7b243b1bf3aa094e3df2
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-04-09 10:54:14 -07:00
qctecmdr
1dff505773 Merge "video: driver: refine max_host_buffer count logic" 2021-04-09 10:18:22 -07:00
qctecmdr
fdfcdc891e Merge "video: driver: fix buffer tracking logic at reverse path" 2021-04-09 09:25:12 -07:00
qctecmdr
349ec479d9 Merge "video: driver: add support to register custom handler." 2021-04-09 02:20:18 -07:00
Govindaraj Rajagopal
58ce6211a7 video: driver: fix buffer tracking logic at reverse path
fw sent FBD with RO and host didn't requeue same buffer again,
but firmware still holds RO reference. In that case, if stop
cmd issued at output port, firmware will FBD once again w/o
RO. So at that time wrong buffer will be picked from list, if
tracking is based on index.

To handle that special case, for decoder alone using device
addr & data_offset for identifying the node in reverse path.

Change-Id: I3d8cb0b4b100fd44be30e576ae602950650747a4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-09 12:18:40 +05:30
Govindaraj Rajagopal
6791a81197 video: driver: refine max_host_buffer count logic
- added max_host_buffer_count for decoder input & output.
- increased buffer count for image_session & encode
  batching case.

Change-Id: I4edf1c3a0953e38d6f84f554ab78e624d39a7306
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-09 11:24:36 +05:30
Vikash Garodia
d336ae5365 msm: vidc: Fix LLCC bandwidth for non realtime session
For non real time sessions, LLCC bandwidth should be voted
to maximum bandwidth.

CRs-Fixed: 2919988
Change-Id: I37217e71634aed298c59533b7cc2f0aa32697752
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-04-09 10:54:52 +05:30
Govindaraj Rajagopal
f6642e3e67 video: driver: add support to register custom handler.
Need to increase debug timeout incase more debug logs were
enabled. This is to avoid sync cmd timeout.

module_param_cb supports to register custom set/get callbacks.
So using this feature to increase various timeout values,
incase more logs were enabled.

Change-Id: I194c077c2ba00af2403d487a3dcfbb48f119b478
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-09 10:46:22 +05:30
Maheshwar Ajja
d0730ea586 video: driver: follow recommended reset sequence
Assert all the reset clocks and then deassert.
Also increase sleep time between assert and deassert.

Change-Id: If5f76c677cd01a3fe37bf2704b7a1c210f6e9fec
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-08 16:45:33 -07:00