Commit Graph

1355 Commits

Author SHA1 Message Date
Ashish Patil
2160e99d3d video: driver: adding average banwidth in stats logs
average calculation for llcc and ddr bandwidth for 2 seconds window
is printed in stats logs

Change-Id: I3507a0117c65b723644d00c89c7d466130d4a467
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-24 15:56:18 -07:00
qctecmdr
df3230b3d3 Merge "video: driver: Amend the internal buffer reuse logic" 2023-04-18 17:13:10 -07:00
Mihir Ganu
9696ea3789 video: driver: Amend the internal buffer reuse logic
Amend the driver internal buffer reuse logic:
1. If firmware releases the buffers as a response to driver request
(e.g during RESUME), destroy internal buffers explicitly after
firmware releases them.
2. If firmware releases the buffers independently, (e.g as a part of
STOP command), remove the QUEUED attribute but do not destroy them.
During the following port streamon sequence, driver can determine if
buffers can be reused or if they should be destroyed.
3. Do not reset buffer list size/count field when destroying released
internal buffers as the list can contain new active buffers. Resetting
causes a race condition and interferes with buffer reuse checks.

Change-Id: I030949d2400daa40b6b97b51f086ccc1b41e080f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-18 08:46:44 -07:00
Govindaraj Rajagopal
c4f5dc6069 video: driver: fix queuing too many output buffers to firmware
Client is setting NV12 fmt as OP format before initial reconfig
So during input port stream_on, subscribe_input_property is
failing due to ubwc check(NV12 fmt), so DPB_LIST cap is getting
disabled, but later client is setting NV12C during reconfig.

So msm_vdec_release_nonref_buffers() during qbuf is bypassed and
release cmd is never sent to fw for pending ro buffers. Infact
entire RO handling at driver side is disabled.

Looks like due to some reason client was not requeueing same
buffers at same slot, So eventually number of pending RO buffers
increasing over the time. Once count shoots more than 256 fw
assertion happens and i.e leading to system error.

Remove UBWC check while subscribing input port properties, so
DPB_LIST willbe subscribed always and avoids above mentioned
issues.

Change-Id: I57ea0ea637ae3a57fcad430b212dcdb10f8e6d0f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-04-18 16:32:10 +05:30
Govindaraj Rajagopal
e0f81d8681 video: driver: allow updating substate for CORE_DEINIT case
Currently updating substate in CORE_DEINIT state was not
allowed. So i.e leading to issues at page fault cases.
Added change to allow updating substate for CODE_DEINIT
case as well.

Change-Id: I1c2cd089ca5c2172c8d672ef1f3701bec7bcc8c2
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-04-14 14:34:17 -07:00
Ashish Patil
0b7870402e video: driver: Add info for uniform AV1 tile handling
read the av1 uniform tile handling propert from fw
and display it. Required in debugging av1 usecases for
power calculation

Change-Id: I443e5afd591a8131c667c64cebb417fc022693ac
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-12 14:18:20 -07:00
qctecmdr
c8af6eb798 Merge "video: driver: ignore set control for DRV_VERSION" 2023-04-11 11:05:45 -07:00
Ankush Mitra
0ed6c8a929 video: driver: ignore set control for DRV_VERSION
Ignore set control for DRV_VERSION.

Change-Id: Id81ee10486d5e4c4fefd410b5236653174278066
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-11 15:49:25 +05:30
Darshana Patil
bdffd5e762 video: driver: enable dynamic support for META_TRANSCODING_STAT_INFO
enable support to send META_TRANSCODING_STAT_INFO via
HFI_MODE_DYNAMIC_METADATA.

Change-Id: I32435e2e30a7a5d50c53645b7c92bbe38f7c90b3
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-04-10 11:11:44 -07:00
qctecmdr
7b095f2b85 Merge "msm: vidc: allow TURBO for specific sessions" 2023-04-08 19:56:42 -07:00
qctecmdr
6dad97b50c Merge "video: driver: Use HEIC as private codec type" 2023-04-08 09:04:55 -07:00
Ashish Patil
25b67cad8e video: driver: modifying log level
modifying log level from error to high
in power suspend API

Change-Id: I6df3572506fb8cc12b7b0eb60cb1fa8049eacf5e
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-07 11:30:13 -07:00
Akshata Sahukar
c46cdcb67f video: driver: Use HEIC as private codec type
Remove HEIC codec definition from UAPI and use it as private
codec type

Change-Id: I4023b638f56e9db11c74ae8894f8451ada05c6e8
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-04-07 10:50:54 -07:00
qctecmdr
005d5f44ef Merge "video: driver: remove core capability pointer" 2023-04-07 09:22:36 -07:00
qctecmdr
9c1c73f705 Merge "video: driver: set QOS registers" 2023-04-07 09:22:36 -07:00
Jiajia Cong
b995df9490 msm: vidc: allow TURBO for specific sessions
1. AV1 decoding session.
2. 10-bit I-Frame decoding session.
3. NRT decoding/encoding session.

Change-Id: Ia308d71d03d303213029d4125204065dc1ff9509
Signed-off-by: Jiajia Cong <quic_jcong@quicinc.com>
2023-04-07 03:17:31 -07:00
qctecmdr
6a9848a4ad Merge "video: driver: Move private color definitions from UAPI" 2023-04-06 22:12:09 -07:00
Ashish Patil
cb18a42fa6 video: driver: added support for av1 uniform tile handling for power calculations
If the av1 tile rows and columns are greater than recommended decoder
av1 settings,vote for higher frequency.

Change-Id: Iea9f542e0b925a9ecb063c11b1827f31164f5a7b
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-06 14:17:21 -07:00
qctecmdr
1695b926ee Merge "video: driver: remove capability pointer" 2023-04-06 11:17:25 -07:00
Ankush Mitra
6bdbae50f2 video: driver: remove core capability pointer
Remove core capability pointer.

Change-Id: I42f4c5cb7f8a0791b8c5f84d5f0d953be3bf80d6
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-06 10:56:57 +05:30
Mihir Ganu
b803968cf6 video: driver: Move private color definitions from UAPI
Move private color definitions from UAPI to driver internal header
file to reduce UAPI dependencies.

Change-Id: I667c3efc965fdc7b7dc1ad52e1b0bcf0c964e979
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-05 10:51:34 -07:00
Megha Byahatti
9c8c04c7b3 video-driver: Move decoder port PSC and properties to platform data
- Add changes in platform/waipio.c to fix failure
in Upstream decoder usecase

Change-Id: Iea470afadb5b489ac28cd3b0b36c0caf8528be14
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-04-05 15:21:40 +05:30
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
Maheshwar Ajja
78c90f4173 video: driver: set QOS registers
Move Qos register programming to driver. Use reset_control_acquire
api to ensure xo clk is on before programming

Change-Id: I52bf416da42675d206e1124368f75f627b8b2e9f
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-04-04 15:07:31 -07:00
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
4fad39a956 Merge "video: driver: Remove metadata definitions from UAPI" 2023-03-31 20:05:54 -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
Mihir Ganu
54c1508e60 video: driver: Remove metadata definitions from UAPI
Remove metadata definitions from UAPI.

Change-Id: I27c5474c5124a6d69d815f2277fc92b090e4011f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-03-28 15:28:50 -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
qctecmdr
71ea6f5807 Merge "video-driver: support for bazel compilation" 2023-03-21 10:21:20 -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
Rakshitha Shakamuri
90bd776440 video-driver: support for bazel compilation
Adding Bazel files and making changes to support same.

Change-Id: I95656a9b36b86010bd74896b0d7394d72c9b0f5d
2023-03-20 12:39:07 -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