Graphe des révisions

357 Révisions

Auteur SHA1 Message Date
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
Akshata Sahukar
1b42ed0a67 video: driver: adjust/set mark/use ltr dynamically only
Avoid adjusting, sanitizing, and setting mark and use ltr
controls to fw for input port static case.

Change-Id: I8ac7fd9537ff0c5ddce0ff0f4d0337cb19dd83d2
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-08 13:33:02 -07:00
Maheshwar Ajja
ae79a4b181 video: driver: power collapse only if no sessions present
Skip power collapse if any sessions are present in driver.

Change-Id: I40003c118b815d2cd07ce44e06bfa3c08182ab3f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-08 12:48:16 -07:00
Akshata Sahukar
7c612dd033 video: driver: Deprecate private ctrls and use upstream ctrls
Remove private ctrl definitions, and use upstream ctrls
in source code.

Change-Id: Ib12cae5b78be69936bf0f97ca09483f5baa60350
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-08 12:10:39 -07:00
Manikanta Kanamarlapudi
d77900d9ab video: Fix QP issues
For max-qp, set_min_qp is called,
correct the same.

Change-Id: I2ff7d6557a033fa45343b131fd68cae1eaf6d796
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2021-04-07 13:12:04 -07:00
Govindaraj Rajagopal
c446124753 video: driver: add frame interval enum support.
Added support for VIDIOC_ENUM_FRAMEINTERVALS to provide
supported frame intervals range for a given resolution.

Change-Id: I51174634739dd1141d308ba9bfd1cf3720b6ca42
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-04-07 09:42:18 +05:30
qctecmdr
deb6f40b1d Merge "video: driver: skip core deinit if deinited already" 2021-04-06 14:33:03 -07:00
Akshata Sahukar
ceab7d9dab video: driver: Do not combine PREPEND_SPSPPS_TO_IDR with SEPARATE/JOINED_WITH_1ST_FRAME
Combination of PREPEND_SPSPPS_TO_IDR with V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE or
V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME is not supported.
Hence, prioritize PREPEND_SPSPPS_TO_IDR over SEPARATE/JOINED_WITH_1ST_FRAME
to set to fw.

Change-Id: Ia23569c046c95889d5eabbe2142d6fd2c69d032a
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-06 12:05:17 -07:00
Maheshwar Ajja
e6e1004dd5 video: driver: skip core deinit if deinited already
Do not try to deinitialize core if core was already
in deinited. Also in failed cases skip calling
venus_hfi_core_deinit() from within venus_hfi_core_init()
as the caller will anyway call venus_hfi_core_deinit().

Change-Id: Idda3d989a8eb500b0d5392a1eac65109e3d73b81
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-04-06 11:20:50 -07:00
qctecmdr
d0d96b1076 Merge "video: driver: Always set metadata delivery/subcribe commands to fw" 2021-04-05 21:38:36 -07:00
Akshata Sahukar
691131156d video: driver: Define upstream controls
Define upstream controls if any control is currently not
availble in gki or gsi bionic header file.

Change-Id: I370c58712479cb3e8f6f4e5650a8c35cefe59c4f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-05 18:46:14 -07:00
qctecmdr
c2501b7b53 Merge "video: driver: optimize thumbnail input buffer count" 2021-04-05 14:47:48 -07:00