Commit Graph

1220 Commits

Author SHA1 Message Date
qctecmdr
13af8a0783 Merge "video-driver: Add comments to the logs" 2024-05-14 21:31:33 -07:00
qctecmdr
4a19fb721c Merge "video: driver: limit auto-frame-rate to original fps value" 2024-04-22 15:00:08 -07:00
qctecmdr
09ce24d5ae Merge "Video: Driver: Add SSR support" 2024-04-22 15:00:07 -07:00
Wenjie Yin
ca60c1dc9e video: driver: limit auto-frame-rate to original fps value
Limit the auto-frame-rate feature to the original fps value the client
set, ignore other cases.

Change-Id: Ib8f374cc385da1cc4de464bc1d0520eb1d637b7e
Signed-off-by: Wenjie Yin <quic_wenjyin@quicinc.com>
2024-04-18 19:41:03 -07:00
Rajathi S
652e7d78ad Video: Driver: Add SSR support
- Add SSR support on MILOS

Change-Id: I87f9de1307b043b3d883ba934c805b0e80ade32c
Signed-off-by: Rajathi S <quic_rajathis@quicinc.com>
2024-04-17 11:24:42 +05:30
Rajathi S
2502af1259 Video: Driver: Moved DPB list from input to output
- Moved DPB list from input to output
  - change the log level of xo_reset control to high instead
    of error log.

Change-Id: Ie3fd1f5fc846b08452d1c0d56bb065a11135e1e3
Signed-off-by: Rajathi S <quic_rajathis@quicinc.com>
2024-04-12 17:56:18 +05:30
Manikanta Kanamarlapudi
155787cac4 video-driver: Add comments to the logs
Add comments to the error logs that are used
in RMA device screening.

Change-Id: I830e7116ceae535cf291aae8e137b38c9bc77fee
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2024-04-09 05:34:34 -07:00
qctecmdr
3765322aa5 Merge "video: driver: Add mvs0 clock reset and update sideBand Register" 2024-04-06 18:10:47 -07:00
Manikanta Kanamarlapudi
f7b9dd6807 video-driver: Made changes in error recovery sequence
- Add ARES for Core clock.
- After controller power down, re-initiate controller/core power
  on sequence and wait for QACCEPT and then power down the video
  subsystem.

Change-Id: Icec985f33dc6e05adf71bfa40901120ceffea655
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2024-03-27 14:21:00 +05:30
Megha Byahatti
b880b69c2e video: driver: Update ssr type specific to target
Update ssr type slection logic to msm_vidc_driver.c.
And add ssr type specific to target for kalama and
waipio.

Change-Id: Ifbdd47f3cc13f69cd93ecbfdbfefa20a112fca7e
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2024-03-19 15:06:32 +05:30
Rajathi S
94d3c6c0ea video: driver: Avoided video_xo_reset on MILOS
- Milos doesn't support video_xo_reset.
  - Since its a common code added a condition to checkif vpu
    version is iris2_2pipe and video_xo_reset is configured then
    return with success.

Change-Id: I0baf3b1e89245065be4a4c21c55bc138077dd214
Signed-off-by: Rajathi S <quic_rajathis@quicinc.com>
2024-03-12 14:31:16 +05:30
Rajathi S
fe23c9409b Video: Driver: Add support for Volcano
- Add the basic driver support for volcano variant.
  - Add platform specific files for volcano.

Change-Id: Iaa736415dc495912ed598a94fca736937015ac7b
Signed-off-by: Rajathi S <quic_rajathis@quicinc.com>
2024-02-18 18:44:16 +05:30
qctecmdr
3d174eaaae Merge "video: driver: do not send resume on output port for encoder" 2024-02-11 22:07:26 -08:00
Megha Byahatti
08ebfd7f87 video: driver: Fix ddr voting to 0 after drain
After drain command when there is inactive session,the
difference between last qbuf input and current time
was exceeding the MSM_VIDC_SESSION_INACTIVE_THRESHOLD_MS
which was leading to ddr voting 0(total_bw_ddr = 0).

When there are no video frames to process, ensure
minimum passive ddr voting for Tensilica(1000kbps).

Change-Id: I5ead2dcf95581b302fd711e4ec08962e876e09b9
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2024-02-01 16:49:13 +05:30
Vedang Nagar
4459cd1e4c video: driver: do not send resume on output port for encoder
HFI_CMD_RESUME is not required on output port for encoder.
Add change to skip the same.

HFI Doc snippet for reference:
* There is no usage of resume command for encoder output port.

Change-Id: Ib2f7177f38de4b780c4627c7bdb03cbc61a63399
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2024-01-31 23:25:24 +05:30
Megha Byahatti
8a2127ac4e video: driver: Enable SSR type target specific
- Allow SSR type according to the target with
defining SSR type in platform file.

Change-Id: Idca62ce34b66a885da388d798eddb0c6c00871e5
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-12-15 04:21:41 -08:00
qctecmdr
77e62fb38c Merge "Video: Driver: acquire xo_reset mutex for gdsc access" 2023-11-30 20:03:51 -08:00
Vedang Nagar
726326d756 Video: Driver: acquire xo_reset mutex for gdsc access
[1] Acquire xo_reset mutex for gdsc access.
[2] Retry acquire_regulator for 1sec and BUG_ON if still fails.

Change-Id: Ie0ed4561a0c12b8526e2ede96a879f9d311aafab
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-11-15 19:05:34 +05:30
Roopangkumar Patel
fbf4e7bd75 video: driver: Fix internal buffers issue with FIRST IPSC + SEEK
Problem:
First IPSC is received from firmware and driver sub state is set to
INPUT PAUSE. And driver state is INPUT_STREAMING at this point of time.
Now client calls for seek (or flush), which invokes streamoff and
stream on INPUT port. As a result, INPUT PAUSE sub state is cleared.
Now when client handles the first IPSC by calling stream on output,
internal buffers are not queued as INPUT pause is cleared with seek.
But for split mode, LINE buffer is mandatory to queue in FIRST_IPSC
streamon of the OUTPUT port

Solution:
Introduced a new sub state check of FIRST_IPSC, during stream on of
the INPUT port after FLUSH, we will check if FIRST_IPSC is pending,
then we will PAUSE the INPUT port, later in OUTPUT stream on,
we check for INPUT PAUSE and if it is set, we will queue the
internal buffers to firmware and resume the input port.

Change-Id: Ia9b566443bc9c4546247d31625384d89aff6985d
Signed-off-by: Roopangkumar Patel <quic_rooppate@quicinc.com>
2023-10-23 10:26:50 +05:30
qctecmdr
b38f10ea72 Merge "Video: Driver: Allow only SSR type 0x1" 2023-09-05 12:31:12 -07:00
Vedang Nagar
e91bbc7848 Video: Driver: Retain AV1 TILE info if not sent by FW
AV1 Tile Info is sent by FW during EBD and these values
are being used by driver to compute clock votings.

For few(such as SEF) frames, there is no TILE info
present in the bitstream and FW will send default
(1, 1) value to driver which affects clock voting
for next frames and hence leading to performance issue.

To avoid such issue, if there is no tile infor, FW will
not send any such stale TILE info values.
But still during EBD, driver is doing memset to 0 for
inst->hfi_frame_info and hence overriding the value to 0.

Added fix to retain previous frames tile info by keeping
check for 0(since min value for tile info from FW = 1, 1)
if no value is being sent from the FW.

Change-Id: I6c23ed769f29efec2a7f318e3997d3f7532685c9
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-08-25 15:03:01 +05:30
qctecmdr
0362dab490 Merge "video: driver: fix Alignment should match open parenthesis" 2023-08-14 13:57:55 -07:00
Manikanta Kanamarlapudi
55de99511a Video: Driver: Allow only SSR type 0x1
Allow only SSR type 0x1

Change-Id: If6efd1ad2d6cb4f08cfc0090304f7faafb54aee9
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2023-08-11 13:31:02 +05:30
qctecmdr
1b17415743 Merge "Video: driver: Fix warnings for vendor checker" 2023-08-10 14:02:16 -07:00
qctecmdr
6fbf971e5e Merge "Video: Driver: Add support for Cliffs" 2023-08-09 10:25:26 -07:00
Anshul Agarwal
0e0f698cb6 video: driver: fix Alignment should match open parenthesis
Fix Alignment should match open parenthesis

Change-Id: I57689cff7d2251dac9a8b8e65ac126c324bf84f2
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-08-07 02:16:12 -07:00
Anshul Agarwal
0f34fc4ff8 video: driver: fix Alignment should match open parenthesis
Fix Alignment should match open paranthesis.

Change-Id: I2b4c1a89fedd88df79ddb8c5711123f339303604
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-08-07 02:15:42 -07:00
Vedang Nagar
50723bee02 Video: driver: Fix warnings for vendor checker
Fix warnings for vendor checker in vidc/inc folder.
[1] CHECK: Alignment should match open parenthesis.
[2] Lines should not end with a '('.
[3] Please use a blank line after.

Change-Id: Iac0591fc1e544e837a3c64c7a6e9b03cc9070ed2
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-08-06 22:33:58 +05:30
qctecmdr
c43d43d95e Merge "video: driver: fix length of line exceeding max length warning" 2023-08-03 15:08:37 -07:00
qctecmdr
5b194ad814 Merge "video: driver: fix space requirement warning" 2023-08-03 15:08:36 -07:00
Vedang Nagar
21496a9ef2 Video: Driver: Add support for Cliffs
[1] Add the basic driver support for cliffs variant.
[2] Add platform specific files for cliffs.

Change-Id: If35f79fa1c72ce160d4ed4c0f1ba8babb7ce8a3d
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-08-03 22:58:54 +05:30
Megha Byahatti
13cfd900b7 video: driver: fix length of line exceeding max length warning
Fix 'length of line exceeding 100 char' warning.

Change-Id: Ic40bb53a85273eee79a37ead1937702b96f4e979
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-07-31 20:05:09 +05:30
Darshana Patil
4812c1460e video: driver: fix DPB buffer release
In vp9 splitmode cases, there is a possibility
fw reuses DPB buffers and hence does not return
these buffers as part of STOP command during
port reconfig. In this case, driver should not
destroy these DPB buffers. Added a fix for the
same.
Issue observed with: 1A1622D8_Dec_VP9_Argon_EOS0.

Change-Id: I81deded6a49290574ddda8d4f8efdfc0a9f733f3
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-07-27 10:14:11 -07:00
Ankush Mitra
a101cca5a9 video: driver: fix space requirement warning
Fix space and blank line required warning.

Change-Id: I2f754e52cdb36332a53b65ca248ae5d974a00ff4
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-07-25 17:50:44 +05:30
qctecmdr
e71d0da561 Merge "video: driver: fix few checker warning" 2023-07-24 16:42:41 -07:00
Vedang Nagar
326254549b Video: Driver: Move inst_lock to v4l2 layer during q_buf
[1] If request_fd enabled, msm_vb2_buf_queue() is not called
  from v4l2_qbuf. Instead it's called as part of
  msm_v4l2_request_queue(). Hence inst lock should be acquired
  in common function i.e msm_vb2_buf_queue, to handle both
  requests and non-request scenarios.
[2] If request_fd is disabled, inst_lock can be acquired in
  v4l2_qbuf() call. Acquiring inst_lock from here will
  ensure RO list insertion and updation i.e. attach/map will
  happen under lock.

Currently, request_fd is disabled. Therefore, acquire inst_lock
from this function to ensure RO list insertion/updation is under
lock to avoid stability usecase.

Change-Id: I3cc1d4b8b5547fd5e34ce5eb06480380cb9200cc
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-07-19 20:24:25 +05:30
Ankush Mitra
30b8ff5ce2 video: driver: fix few checker warning
Fix braces are not necessary warning and suspect code
indentation warning.

Change-Id: I6e599d94766cc34013a0ddd758cf5c6609798ea2
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-07-19 18:38:09 +05:30
qctecmdr
b941cfd415 Merge "video-driver: kept blank line after declarations" 2023-07-18 17:22:50 -07:00
Manikanta Kanamarlapudi
4d2903e0d0 video-driver: kept blank line after declarations
Fix warning of 'Missing blank line after declarations'
in the checker.

Change-Id: I3db5717890db68096e5a035c536f0b6bcae7e28e
2023-07-17 15:18:27 +05:30
Anshul Agarwal
2576adf412 video: driver: fix some checker err
Fix some checker err

Change-Id: I3526a509f4cbb3d91284b21dad851b57bb43f57a
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-07-14 15:03:37 +05:30
Ankush Mitra
50a257d310 video: driver: fix No space is necessary after a cast err
Fix this warning in checker.

Change-Id: I2f90b2f8b3fddb55a3b1dd9b0e4ca227e46ed42f
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-07-12 18:15:31 +05:30
qctecmdr
ccafeeddb0 Merge "video: driver: replace msm_vidc_vmem_alloc/free" 2023-07-11 17:24:09 -07:00
qctecmdr
bac8dc98cd Merge "video: driver: remove unused APIs and other fixes/cleanup" 2023-07-11 09:51:20 -07:00
Dikshita Agarwal
9528c09bf4 video: driver: replace msm_vidc_vmem_alloc/free
replace msm_vidc_vmem_alloc/free with direct calls to
vzalloc and vfree.

Change-Id: Iafde62dd7f54b99418207d10ff71589bf0efd5ed
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-07-11 10:00:08 +05:30
qctecmdr
5a3d1b1409 Merge "video: driver: remove additional conditional check" 2023-07-10 17:19:45 -07:00
qctecmdr
7da88cbbc1 Merge "video: driver: pm_runtime_get_sync can return 1 in success" 2023-07-10 17:19:45 -07:00
Dikshita Agarwal
7cf1ce5bbe video: driver: pm_runtime_get_sync can return 1 in success
fix the error condition for pm_runtime_get_sync
as it can return 1 as well in success case.

Change-Id: I958da05b1b979adae059181432a3d917012640b7
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-07-10 13:59:46 +05:30
Dikshita Agarwal
e9ebdcdbbe video: driver: more fw_coredump api
move fw_coredump api to firmware.c file.

Change-Id: Icbd5644244d4460bf918c1d137d19c04eb9f492a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-07-10 13:58:13 +05:30
Dikshita Agarwal
b5912cd2ea video: driver: remove unused APIs and other fixes/cleanup
- Remove unused APIs:
    buf_cleanup
    _lock_check
    msm_vdec_update_max_map_output_count
- Rename msm_vidc_print_insts_info to msm_vidc_print_running_instances_info
  for better understanding.

Change-Id: I1ae190cbf02a52554bfe286c5e336fad37d7419e
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-07-10 13:56:53 +05:30
Dikshita Agarwal
2ae30091f4 video: driver: fix copyright markings
fix copyright markings and have all markings in one
multiline comment.

Change-Id: I481c6213bb25e8c278956ad6a51df3fc5c1aabf2
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2023-07-08 01:40:35 +05:30