Commit Graph

858 Commits

Author SHA1 Message Date
qctecmdr
74f2907a9f Merge "video: driver: Enable CR and CF" 2021-03-08 15:08:22 -08:00
Chinmay Sawarkar
1a9c2e36bb video: driver: Enable CR and CF
Enable Compression Ratio and Complexity Factor property.

Change-Id: Ia34ffe0a91b0b3b9941ccb0bbb0eacfdb16b51e9
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-03-08 12:06:51 -08:00
Mihir Ganu
261f173680 video: driver: Enable HDR10/10+ encoder metadata
Modify control database to allow hdr10/10+ metadata
controls for encoder.

Change-Id: I594bae02c9f768307422b20ef0d5fe18b5597056
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-03-08 08:34:06 -08:00
Darshana Patil
41d465f5cf video: driver: add dpb tag list metadata support
- add DPB tag list capability in database
- subscribe in metadata mode for the dpb tag list
  property if enabled

Change-Id: Id4b9b7392b7b26cccf0860d578b8a0cb8d798d04
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-05 16:36:29 -08:00
qctecmdr
0f7360ca0a Merge "video: driver: allow output settings in DRAIN_START_INPUT state" 2021-03-04 16:58:29 -08:00
qctecmdr
9800ae3f27 Merge "video: driver: update sizeimage during set ctrl" 2021-03-04 16:11:41 -08:00
Darshana Patil
3f9d032aa1 video: driver: update sizeimage during set ctrl
update input port sizeimage for a decode session
during set control of bitsream size overwrite
control.

Change-Id: I4cb7d6c8d416f187e1ac557d3b423acfdbcb7a60
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-04 12:06:27 -08:00
Maheshwar Ajja
ab6b763fea video: driver: allow output settings in DRAIN_START_INPUT state
Allow output settings (reqest buffers, set format etc) in
MSM_VIDC_DRAIN_START_INPUT state because output port is
streamed off already.

Change-Id: Ia00451a4cc85f3fe05820721235661bfe2d3de04
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-03-04 10:57:52 -08:00
Govindaraj Rajagopal
a7670d7f42 video: driver: enable decoder batching support
Added change to enable decoder batching feature.

Batching willbe enabled only when below conditions were met.

[1] platform supports batching
[2] decode session
[3] realtime session
[4] non-thumbnail session
[5] non-heif session
[6] 2-stage decode only(low_latency not supported).

Change-Id: I54b601814c3b5fa2077dc41c5b0ac84964c2674a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-03-04 09:38:55 +05:30
Darshana Patil
596ca194de video: driver: add thumbnail and priority support
- add thumbnail mode and priority in database.
- modify output min count for thumbnail session
- deprecate is_turbo_session.
- deprecate flags variable in instance structure and
  use database entries.

Change-Id: I04a3386f1e2eb9fb97bd550d6f169f9510f462c8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-03 18:13:09 -08:00
Akshata Sahukar
660008370e video: driver: Add NAL length based encoding
Add support to set HFI_PROP_NAL_LENGTH_FIELD property to
video firmware.

Change-Id: I20db36bad394fe0b5163a156199340836af3f740
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-03-03 11:43:00 -08:00
Vikash Garodia
51c2ce468d msm: driver: configure video context bank for best fit
With best fit configuration, the probability of getting
a mapping for video buffer increases even when the system
is fragmented.

Change-Id: I8689447ce1341fd1189b543eb9fb6a2e03edcc94
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-03-02 19:28:35 -08:00
Akshata Sahukar
4387226f98 video: driver: Add support to set default fps
Add support to set default fps to video fw.

Change-Id: I5074b5379c8bca273e098a3375f2c949b0656ae8
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-03-02 18:39:25 -08:00
Maheshwar Ajja
b297e04dee video: driver: initialize subscribe parameters
Initialize subscribe parameters before input port settings
change event from firmware to avoid uninitialized subscribe
params usage in video driver.

Change-Id: I39a1e6646a845836a406193ace7a5fb71edee192
Depends-On: I07c7c8b4faaccc896249b2da84148ec05c2047da
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-03-02 17:04:40 -08:00
Maheshwar Ajja
395d4a9ff5 video: driver: amend interlace detection logic
As per HFI_PROP_CODED_FRAMES details, 0x0 is field interlace,
0x1 is progressive and 0x2 is adaptive frame field bitstream.
Treat 0x1 as progressive and both 0x0 and 0x2 as interlace in
driver.

Change-Id: I07c7c8b4faaccc896249b2da84148ec05c2047da
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-03-02 09:44:17 -08:00
Darshana Patil
481a6117d8 video: driver: update license year
update license year to 2020-2021

Change-Id: I5a67bf49c386e86337bc7449ded08d186fc9a280
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-01 18:07:35 -08:00
qctecmdr
d7d63e28c0 Merge "video: driver: handle same buffer returned from firmware case" 2021-03-01 13:03:48 -08:00
qctecmdr
382a48ec9c Merge "video: driver: increase encoder max host buffer count" 2021-03-01 12:42:30 -08:00
Maheshwar Ajja
2a92b7d6da video: driver: handle same buffer returned from firmware case
Firmware is expected to return the buffer which was earlier
returned with READ_ONLY flag as part of stop command processing.
Amend the condition to avoid returning the same buffer to client
again.

Change-Id: I814098e140bf89b4a4e55dcd5efbff5a9d1cba12
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2021-03-01 10:50:21 -08:00
Govindaraj Rajagopal
f7dc3c7789 video: driver: increase encoder max host buffer count
Increase encoder max host bufcount 64 -> 256 to support
superframe(encoder batching) usecase.

Change-Id: I8607b8302a10c52ac47a0c67ee7c359c62aa1d02
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-03-01 11:47:08 +05:30
Govindaraj Rajagopal
f25d5c7078 video: driver: handle race between streamoff and qbuf sequence
Currently stramoff releases inst->lock and waits for response from
firmware i.e race issue. Streamoff released int->lock and that got
acquired by qbuf. So 2 FTB's were queued to firmware after streamoff
request.

Receiving qbuf after streamoff is treated as fatal at firmware side
and it sends session error as response to host. Added change to
avoid such issues.

Change-Id: I6da8ac0d3d30b540784e3c03c423270cb5212af2
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-03-01 09:17:24 +05:30
qctecmdr
7fdf00010a Merge "video: driver: Resolve empty brace compilation issue for VS" 2021-02-26 13:28:47 -08:00
Akshata Sahukar
20d30c5dd2 video: driver: amend colorspace info setting
v4l2 enums for color space info are not one to one
mappings with hevc spec values. Hence, introduce and
use corresponding mapper functions.

Change-Id: I37a79a9b34b66184ece9a284ae98c9fa4efd248f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-26 12:52:14 -08:00
Akshata Sahukar
a774cd62bb video: driver: Resolve empty brace compilation issue for VS
Empty braces caused compilation issue on VS. Resolved
the same to now compile complete driver code on VS
with no additional change requirements.

Change-Id: Ib63aad3d104362c17c952780f40cd6e381902343
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-26 12:51:10 -08:00
Govindaraj Rajagopal
e743f5dd48 video: driver: use char array for printing vidc logs
Instead of formulating session_id, codec_type, domain at
each log print, used pre-formatted char array to print
the vidc logs.

Change-Id: If7a93ecb25a7b1b98ebca6f39e3990079c00b5dd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-02-26 22:10:16 +05:30
qctecmdr
df69c42511 Merge "video: driver: avoid output port stale resolution" 2021-02-25 14:58:26 -08:00
Govindaraj Rajagopal
4055a23255 video: driver: enable smmu_fault_handler support
Added smmu_fault_handler support and printing all buffers,
allocations, mappings list details as part of smmu fault
handling.

Change-Id: Idb5d28357f9fb885adf7ae16f328b4963c56aa8c
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-02-25 12:26:46 +05:30
Akshata Sahukar
a406874508 video: driver: avoid output port stale resolution
Whenever cliet sets input port resolution greater
than output port resolution, stale resolution in output port
is set to video fw causing corrupted encoded bitstream.
Fixed the same to avoid encountering this issue.

Change-Id: Icf4569b0e5b101bfea8136936706490693286cce
gned-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-24 19:41:11 -08:00
qctecmdr
2167bfcda1 Merge "video: driver: fix an uninitialized variable" 2021-02-24 18:38:12 -08:00
qctecmdr
a5cae9054b Merge "video: driver: return POLLERR when inst in error state" 2021-02-24 18:11:36 -08:00
qctecmdr
ff1ac5427b Merge "video: driver: fix video driver remove" 2021-02-24 17:45:46 -08:00
Swarna Vanka
ddffda415c video: driver: fix an uninitialized variable
Initialized the variable to avoid setting clock
with some random number

CRs-Fixed: 2836558

Change-Id: Id5673210c9e7431aad35b830c9538f8dae4982fc
Signed-off-by: Swarna Vanka <slatha@codeaurora.org>
2021-02-24 17:09:43 -08:00
Chinmay Sawarkar
92a5583706 video: driver: fix video driver remove
While removing driver fw should be unloaded.
Also improved error handling.

Change-Id: Ia9f224da6f176c8a50c153f67fe8a77a92b7b08f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-02-24 16:29:41 -08:00
Darshana Patil
d1264c76f0 video: driver: return POLLERR when inst in error state
return POLLERR when inst is in error state.

Change-Id: If207b8e3346322424e95d70a45aa684643e9461d
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-02-24 15:47:41 -08:00
qctecmdr
e6b6c34490 Merge "video: Added more validations" 2021-02-24 15:25:50 -08:00
Karthikeyan Periasamy
0e491223d5 video: Added more validations
Fixes for KW security issues.
CRs-Fixed: 2836558

Change-Id: I0c8ca6b13c00420a50b8518caea6ad51ed1268bb
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2021-02-24 14:27:10 -08:00
Akshata Sahukar
17addfbc6d video: driver: add support to few properties
Add support to below properties
- HFI_PROP_MULTI_SLICE_BYTES_COUNT
- HFI_PROP_MULTI_SLICE_MB_COUNT
- HFI_PROP_CHROMA_QP_OFFSET
- HFI_PROP_REQUEST_SYNC_FRAME

Change-Id: I4cc62870756d058e7a7b15290f5d6797b3be243c
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-24 12:06:26 -08:00
Darshana Patil
d4b5661567 video: driver: modify msm_media_info.h to fix 10bit
- introduce STRIDE_BYTES and STRIDE_PIX to
  calculate size is bytes and pxls respectively.
- DEPRECATE VENUS_BUFFER_SIZE and introduce
  VIDEO_RAW_BUFFER_SIZE. All buffer sizes are
  calculated by using STRIDE_BYTES.
- For s_fmt, use STRIDE_PIX to calculate size.
- For v4l2 bytesperline, use STRIDE_IN_BYTES to
  calculates size in bytes

Change-Id: I3db4d843d1834b25c6160ebc318572ac67e22806
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-02-23 20:02:29 -08:00
qctecmdr
9a4c121831 Merge "video: driver: enable encoder superframe batching support" 2021-02-22 23:00:18 -08:00
Chinmay Sawarkar
c684975c19 video: driver: Initialize handoff_done
If not initialized, power control may wrongly be transferred
to firmware, even though regulator handoff is not done.

Change-Id: Ic76a679ff5f848bfb50c95dc3306f05ee62bc82f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-02-22 13:17:47 -08:00
Govindaraj Rajagopal
f02bbaf836 video: driver: enable encoder superframe batching support
Added HFR/HSR superframe handling support for encoder.

Change-Id: I28ced3f223cd78d00b1a654a79bcac3b02f378dc
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-02-22 11:52:43 +05:30
Chinmay Sawarkar
6070bc2523 video: driver: enable interframe power collapse
Hand off regulators to hw to enable interframe power collapse.

Change-Id: I11d3d96f0a6cce23ef374e2065532a13af38d2f4
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-02-19 21:31:27 -08:00
Darshana Patil
02346b9728 video: driver: modify internal buffer counts for vp9
modify internal buffer counts for vp9. fix comv and
noncomv buffer count to 0 for vp9 as they are not
supported for this codec.

Change-Id: I5d504128ab587c425d4cd4cfd2059241e8d256aa
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-02-19 18:02:17 -08:00
qctecmdr
4154ca00cf Merge "video: driver: fix error handling sequence in msm_vidc_open" 2021-02-19 17:45:22 -08:00
qctecmdr
a04866f293 Merge "video: driver: set default_header property at session level" 2021-02-19 17:23:44 -08:00
qctecmdr
d6621561dd Merge "video: driver: modify decoder subscribe psc list" 2021-02-19 17:02:25 -08:00
qctecmdr
29b6bb8e1a Merge "video: driver: reset required buffer attributes" 2021-02-19 16:31:22 -08:00
Darshana Patil
52e7bb2213 video: driver: set default_header property at session level
set default header property once per session for decoder.

Change-Id: I5ca9088b8bed09907f2c9f829acec3db23e65a7c
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-02-19 11:46:38 -08:00
Govindaraj Rajagopal
f1e6bbf2ed video: driver: fix error handling sequence in msm_vidc_open
Currently msm_vidc_close is called directly for any failure
in msm_vidc_open(at any level). So i.e leading to free without
alloc & deinit without init problems.

Example:
if msm_vdec_inst_init is failed, msm_vidc_event_queue_deinit
will be called as part of msm_vidc_close and leading to crash
at v4l2_fh_del.

v4l2_fh_del should be called only if v4l2_fh_add is successful.

Change-Id: I5dd063c19327b881f533aa141f77b23ee7fad125
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-02-19 21:18:30 +05:30
Darshana Patil
0126cc3d4b video: driver: modify decoder subscribe psc list
modify decoder subscribe psc list according
to supported codecs.

Change-Id: Id54ea26bac07491b80877ef88ab7888c08750335
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-02-18 20:02:22 -08:00