Commit Graph

1291 Commits

Author SHA1 Message Date
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
b12f5ec06e Merge "video: driver: adding encoder GOP awareness settings in the power calculation" 2023-04-02 09:18:12 -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
Ashish Patil
dabd91e62e video: driver: adding encoder GOP awareness settings in the power calculation
power calculation is optimized by using encoder reference handling
and GOP details.

Change-Id: I29707fcd152f89e213532afc9c4b6191d23b4d6c
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-31 13:11:45 -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
Govindaraj Rajagopal
c3f3af1e0e video: driver: enable memory tracking in stats handler
track internal memory usage periodically and print
memory usage stats using stats handler.

Change-Id: Idd16647dbe4aab3fc617a8f7fc0d3c81f459bb5d
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-03-24 20:03:10 +05:30
Megha Byahatti
c750ba048b video: driver: add try_fmt allow checks inside state handler
Remove msm_vidc_allow_s_fmt function and use state specific
MSM_VIDC_TRY_FMT checks inside state_handler

Change-Id: I405b9cfb89e4daadafcc05eb99e66e2b0aad328e
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-03-24 10:46:31 +05:30
Rakshitha Shakamuri
a5b376a5da video-driver: enable ddk compilation and additional changes on Bazel.
msm_video and video modules compile using ddk.

Change-Id: I5ddba19f973a13807a80c8d619bcc83b09307787
2023-03-23 15:29:38 -07:00
Govindaraj Rajagopal
c6535adfac video: driver: add streamoff handling in close state
Allow msm_vidc_stop_streaming() in msm_vidc_close_state()
state handler.

Change-Id: Id1c78991a8b3398e7f696500adb4a33be239ca9f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-03-23 12:56:54 +05:30
qctecmdr
1fdfa4758c Merge "video: driver: add driver version" 2023-03-22 14:08:07 -07:00
qctecmdr
f5b44079a1 Merge "video: driver: Move all strict check into msm_vidc_driver" 2023-03-22 14:08:06 -07:00
qctecmdr
9a6b35b0b8 Merge "video: driver: Remove Odd width and Height check" 2023-03-21 22:10:52 -07:00
Vedang Nagar
6712a694be video: driver: Move all strict check into msm_vidc_driver
Move all __strict_check functions to msm_vidc_driver.

Change-Id: I74f3017f96f1426773698c1b44bca7b6d30df216
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-03-22 09:39:30 +05:30
Darshana Patil
fc6a238b09 video: driver: enable dynamic metadata
- enable Eva stats, hdr10/10+ as dynamic metadata.
- Make eva stats dependent on bitrate mode.
  Also remove preprocess and layer count as
  child of Eva stats.
- Make Hdr10/10+ dependent on profile.
- Adjust transcoding stats metadata based on
  bitrate mode, fps and resolution.

Change-Id: I7b110962e29db50cb321d69a0fb301950436da6f
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-03-21 11:53:10 -07:00
Vedang Nagar
753fae6969 video: driver: Remove Odd width and Height check
Remove odd width and height check during streamon

Change-Id: Ie8e86f83d4b65603d5797f4b10b87b049e0cb04d
2023-03-21 21:17:22 +05:30
qctecmdr
0e06b9af89 Merge "video: driver: Add debugfs support to disable synx v2 fence" 2023-03-20 14:37:04 -07:00
Maheshwar Ajja
ed089ff4e5 video: driver: add driver version
Add driver version for clients to query and manage
accordginly.

Change-Id: I5e8c51a4f18c28c0ed4d5a8bdaf0660d175c420a
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-03-20 11:01:58 -07:00
qctecmdr
4a2de2df11 Merge "video: driver: use devm for resource management" 2023-03-19 13:08:06 -07:00
Akshata Sahukar
625745bf00 video: driver: Add debugfs support to disable synx v2 fence
Add debugfs support to disable synx fence falling back
to dma sw fence via parameter "msm_vidc_disable_synx_fence"

Change-Id: I46b4833c2dfabec95f5ff34a0aef42043f8f6f5c
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-17 15:37:11 -07:00
Akshata Sahukar
eaf80f36cb video: driver: Add support to map synx fence registers
Add support to map below mentioned registers
required for synx v2 fence support
- FENCE
- QTMR0_F0V1_QTMR_V1_CNTPCT_LO
- QTMR0_F0V1_QTMR_V1_CNTPCT_HI

Change-Id: I43a80ca9be282eb4bbfc46a8d62d875478619516
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-17 15:35:51 -07:00
Akshata Sahukar
33d0b20141 video: driver: Add support for Synx V2 fences
Add Synx V2 fences support to improve latency
in video decode usecases.

Change-Id: If21f8b65895364a804f8e03580b09c44b377c199
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-17 13:59:37 -07:00
Deepa Guthyappa Madivalara
d2b9c98869 video: driver: replace V4l2 macros with availble upstream macros
- Replace prior macros from downstream driver as these are now
   defined in upstream V4l2 include files

Change-Id: I34dc063df0c2ca2194c115d310d7fe5026cd573e
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-03-17 11:57:07 -07:00
Govindaraj Rajagopal
6432572ed6 video: driver: use devm for resource management
use devm_add_action_or_reset() to register custom objects with devm.
This function wil invoke release callback during rmmod/remove sequence.

Change-Id: I87cf79741123bc3b1c624f8f44ba146deedaf32b
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-03-17 10:57:09 +05:30
qctecmdr
59a8ab6758 Merge "video: driver: replace V4l2 macros with availble upstream macros" 2023-03-16 10:56:49 -07:00
Akshata Sahukar
f00fe9f305 video: driver: fix LTR adjustment
LTR is not correctly getting adjusted due to incorrect
goto statement leading to failure in premerge with
test_AVC_NV12C_3LTR_4Layers_Adjutment_Encode testcase.
Fix this.

Change-Id: Ieda4f33d6679f645c2eb349e8ddf1015a3814711
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-14 12:13:29 -07:00
qctecmdr
ef309fc170 Merge "video: driver: resume video core before running ssr command" 2023-03-14 10:31:21 -07:00
qctecmdr
5952782968 Merge "Revert "video: driver: disable 5 LTR support"" 2023-03-13 17:28:11 -07:00
Deepa Guthyappa Madivalara
1cf504b165 video: driver: replace V4l2 macros with availble upstream macros
Replace prior macros from downstream driver as these are now
defined in upstream V4l2 include files

Change-Id: I7d1677cd7ef95c05219e043e0c78d29299036bed
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-03-13 16:18:38 -07:00
Akshata Sahukar
9019b6bc09 Revert "video: driver: disable 5 LTR support"
This reverts commit 8acf4313fc.

Change-Id: I5adc9e59b2b56a4616330bf7a2aec402ca827232
2023-03-13 10:52:43 -07:00
qctecmdr
5abbd7a8b2 Merge "video: driver: Change ARP buffer context bank" 2023-03-13 10:42:24 -07:00
qctecmdr
3923a9281b Merge "video: driver: Remove hard parent dependency" 2023-03-13 10:13:09 -07:00
Chinmay Sawarkar
a0798a6902 video: driver: Change ARP buffer context bank
In non secure case, ARP buffer will use CB0.

Change-Id: Id7bb33906d374f230b2054455e6efdc41e710abe
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2023-03-09 12:47:23 -08:00
qctecmdr
b14510daa2 Merge "video: driver: encoder delay start: superframe" 2023-03-09 09:46:19 -08:00
Ankush Mitra
964752c27c video: driver: Remove hard parent dependency
Remove hard parent dependency
adjust it accordingly.

Change-Id: I8d5de2ba4199570f366745b980b451099467ebaa
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-03-09 12:05:19 +05:30
Ankush Mitra
a27c15b1c5 video: driver: resume video core before running ssr command
Resume video hardware if it is already power collapse
to SSR command else SSR command will not take effect.

Change-Id: I74def614a5a5174c052d14f47cecd1f1a619529e
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-03-09 11:17:20 +05:30
Darshana Patil
441d4be45e video: driver: encoder delay start: superframe
make superframe control as dynamic.

Change-Id: I54525aa1e31b3078e13e77c59474bf6b7298cf0d
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-03-08 16:03:37 -08:00
Ashish Patil
dde3e01a63 video: driver: enabling new power calculation changes
Change-Id: I9ea52a2f766921f8012a951f5e07a2d18d5d7e55
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-08 11:52:02 -08:00
Ashish Patil
dd0e6d5f70 video: driver: update power calculations
Update power calculation to avoid low framerate or
frame drop issues

Change-Id: Ice306a44d4ea8242d965c0e5d03edffc0f5e0f8b
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-03-08 11:15:05 -08:00
qctecmdr
c0d457f55a Merge "video: driver: encoder delay start: CSC" 2023-03-08 09:34:56 -08:00
Akshata Sahukar
9a5fea8ef3 video: driver: Add support to enable enc ring buffer
Add support to enable ring buffer for enc intermediate
bin buffer to improve encoding performance.

Change-Id: Ifbf50cb48278c62c09a20bc7626a3b6288813830
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:14:30 -08:00
Akshata Sahukar
fb2e2c5715 video: driver: Align hfi files to pick ring buffer changes
Align hfi property and memory file to pick interface changes
for encoder ring buffer support

Change-Id: Icde4cdffe5275d416c51c36e562bb832027b0fa1
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:13:09 -08:00
Darshana Patil
552670ad6b video: driver: encoder delay start: CSC
Introduce a control for client to enable or disable
csc. Disable csc for 10-bit encoding based on color format.

Change-Id: Ia49324332ce9b05b6f1a1283fa758638a8cc3ab8
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-03-07 15:12:53 -08:00
qctecmdr
5dcf0adb92 Merge "video: driver: move DPB_TAG_LIST to input meta port" 2023-03-07 13:42:19 -08:00
Zhongbo Shi
33ec7e400e video: driver: move DPB_TAG_LIST to input meta port
1. Move DPB_TAG_LIST from ouput meta port to
input meta port;
2. Remove meta_max_reorder_num_frame;

Change-Id: I1783ee9cdb1092f90706dc485d247c51f36a9a65
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
2023-03-06 23:26:00 -08:00
Zhongbo Shi
133bfb56ea video: driver: move DPB_LIST to input port
1. Move DPB_LIST subscription on input
port instead of output port.

2. Move decoder port PSC and properties
to platform data.

Change-Id: I5711e0ba915ebe4136f64d1440ae331b787f4d61
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
2023-03-07 15:23:23 +08:00