Commit graph

712 commits

Author SHA1 Message Date
Linux Build Service Account
38d8bd482f Merge 3fedfd9225 on remote branch
Change-Id: I4a79a5f629e58416a4abfab5430b2abe2e815752
2025-06-11 07:35:44 -07:00
Vasantha Balla
3fedfd9225 msm: vidc: Fix use after free in driver
Use after free can happen in below scenario.
[1] In msm_vidc_open, When instance count reaches max count or when
open failed it waits for core lock before removing instance from
instance list.
[2] During this time backward thread can get invoked to handle firmware
response for cmds, It increments reference count and gets instance.
[3] If forward thread resumes after this, and frees intance,
backward thread will end up using freed instance.
[4] To address this, calling kref_put(&inst->kref) and freeing instance
immediately if ref count is zero, if recount is not zero, backward
thread frees instance memory in put_inst_helper.

Change-Id: I58c81d4d9fda1523d0fa29ebdb33455db839d46f
Signed-off-by: Vasantha Balla <quic_c_vballa@quicinc.com>
(cherry picked from commit ccddad0c4992ab7b4e3651e2c5c8df3e79bb7c43)
(cherry picked from commit cc9f3cc50311796626b2c40b049daeef0a5719ea)
2025-05-19 18:06:46 +05:30
Agnimitra Sen
8a055950fd msm: vidc: Enable hybrid mode only for HFR usecase
Dynamic properties such as IDR insertion is not supported
when hybrid layers are enabled . Hybrid layers required only
HFR usecase. Hence enabling hybrid only when VBR+noLTR+HFR
use cases.

Change-Id: I36e4ecb9c98135790cff0487a237a1a4fd33d241
2025-04-21 23:54:03 -07:00
Linux Build Service Account
88e1c5058e Merge 9699c3bab5 on remote branch
Change-Id: Ia691118dc8176dbe430b97e50c871ae01ef29309
2023-11-14 03:48:39 -08:00
Madhukumar S J
a9fc34c76d msm: vidc: fix tier and level issue for hevc
- Bits: 0-27 are used to specify the level
  information and bits 28-31 are reserved for
  non-level information. For HEVC, these 4 bits(MSB)
  are used for communicating the tier info.
- CTS tc will set the tier first, the level
  next and the same is set to firmware. In
  doing so, the level will override the tier value
  which is set earlier and the same is communicated to
  the firmware resulting in level info mismatch.
- Fix here is to extract the 4 MSB bits containing the
  tier info and add it to the level value, then communicate
  it to the firmware.

Change-Id: I530f0a0a92417f2076d5a1f93f724b6514ae9309
Signed-off-by: Madhukumar S J <quic_msj@quicinc.com>
(cherry picked from commit 51311d2374)
2023-10-04 23:12:51 -07:00
qctecmdr
9699c3bab5 Merge "msm: vidc: fix tier and level issue for hevc" 2023-08-14 03:24:30 -07:00
Madhukumar S J
51311d2374 msm: vidc: fix tier and level issue for hevc
- Bits: 0-27 are used to specify the level
  information and bits 28-31 are reserved for
  non-level information. For HEVC, these 4 bits(MSB)
  are used for communicating the tier info.
- CTS tc will set the tier first, the level
  next and the same is set to firmware. In
  doing so, the level will override the tier value
  which is set earlier and the same is communicated to
  the firmware resulting in level info mismatch.
- Fix here is to extract the 4 MSB bits containing the
  tier info and add it to the level value, then communicate
  it to the firmware.

Change-Id: I530f0a0a92417f2076d5a1f93f724b6514ae9309
Signed-off-by: Madhukumar S J <quic_msj@quicinc.com>
2023-08-11 11:25:10 +05:30
Linux Build Service Account
79b173e596 Merge 81426844a2 on remote branch
Change-Id: I01a209ad4ed0355032e5fe374ae244d88f7215c1
2023-07-13 06:13:05 -07:00
Rahul Ratneshwar Mandal
81426844a2 msm: vidc: Update avc/hevc dec capability as per PRD
allow support upto level 6.2 for AVC/HEVC decoder.

Change-Id: I095373a8dbbccee37e16f64d820261efeccbbd44
2023-04-27 16:09:58 +05:30
Vasantha Balla
0fbffa4b55 msm: vidc: Add clock/bus votes for eos/flush commands
If voting is not added for eos and flush command processing,
Firmware is processing only high priority session commands
which causes non real time session to wait for completion of
realtime session for its eos processing. So adding votes for eos
and flush commands.

Change-Id: I9de8c1d0dc79e93d991d34d2d687e2fa1910531b
Signed-off-by: Vasantha Balla <quic_vballa@quicinc.com>
2023-03-19 22:30:22 -07:00
Vasantha Balla
c57e83cd4b msm: vidc: Add clock/bus votes for eos/flush commands
If voting is not added for eos and flush command processing,
Firmware is processing only high priority session commands
which causes non real time session to wait for completion of
realtime session for its eos processing. So adding votes for eos
and flush commands.

Change-Id: I9de8c1d0dc79e93d991d34d2d687e2fa1910531b
Signed-off-by: Vasantha Balla <quic_vballa@quicinc.com>
2023-03-14 14:02:34 +05:30
Linux Build Service Account
214fecd891 Merge 6a0ea99fe2 on remote branch
Change-Id: I8a1e4970b1858a7ac9a43f1216c5ccd29eeb0244
2022-12-15 08:59:43 -08:00
Miaomiao Chen
6a0ea99fe2 msm:vidc: add enums for crop event
Add crop-left/right/width/height into enum msm_vidc_cb_event_types
to support reporting crop infomation from driver side. Video framework
can get crop info during output port reconfiguration.

Change-Id: I59a77ad698b586c197de735ee65ec049e42cbc7f
Signed-off-by: Miaomiao Chen <quic_miaochen@quicinc.com>
2022-11-22 05:38:58 -08:00
Vasantha Balla
679dbb6bea msm: vidc: Fix coverity static code analysis violations
Debug prints modified to fix type mismatch errors.

Change-Id: I194ff4842f79f5cc32df8686855b88d3f6f4c5e8
2022-01-21 08:15:48 +05:30
Linux Build Service Account
768890dfbb Merge 6602b657ee on remote branch
Change-Id: I4c45f22b375406ebaed1d5939edc22350a38ba8e
2021-11-10 22:23:35 -08:00
qctecmdr
6602b657ee Merge "msm: vidc: Cancel batch work in case of pm_suspend" 2021-10-18 23:17:08 -07:00
Linux Build Service Account
934a73e8ce Merge 446693d0b9 on remote branch
Change-Id: I14351c9a564a06130095938b571bbf1b82c2d41a
2021-10-11 07:03:26 -07:00
Linux Build Service Account
5f90e1aac0 Merge ebf28bcfef on remote branch
Change-Id: I60b65dbae481087a68f4c4b2555f81ea06f0a029
2021-09-25 03:44:48 -07:00
Gaviraju Doddabettahalli Bettegowda
446693d0b9 msm: vidc: update VP9 level ranges
Added changes to update decoder VP9 level ranges
According to the platform specific.

Change-Id: Ie0115bf255fa2edc2ebed047d095e086cb18b3e0
2021-09-21 07:35:39 -07:00
Priyanka Gujjula
565adaa83c msm: vidc: Cancel batch work in case of pm_suspend
Cancel batch work when core is suspended due to
pm suspend.

Change-Id: I5c6e4f0eb0883a9c3cd2711f65e0d74a6cced310
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2021-09-20 12:16:06 +05:30
Fudong Zhang
ebf28bcfef msm: vidc: Add max supported instances for scuba target
Add MAX_SUPPORTED_INSTANCES

Change-Id: I615745e486155b156ba2637ccd2ab89f4adee1bf
2021-09-08 19:10:35 -07:00
Fudong Zhang
548cf4ba56 msm: vidc: Enable v4l2 for bengal
Enable v4l2 enc/dec for bengal target.

Change-Id: I06411b9cf1a6ae846ec3243bd5e8e8bd9c9189a7
2021-09-08 19:10:21 -07:00
Linux Build Service Account
1b5d816a6f Merge 667025ee57 on remote branch
Change-Id: Ia633b0c68557869950a217402ed769465a491a89
2021-09-08 04:33:09 -07:00
Linux Build Service Account
092fe75114 Merge 0e56923f41 on remote branch
Change-Id: I6fca01d9e0362c24ec91294dfeb9f9421755a804
2021-08-20 09:22:41 -07:00
Vikash Garodia
667025ee57 msm: vidc: Ping hardware during timeouts
Added PING command. Send the command to video firmware
when any awaited response is not received within the
stipulated time.
PING would help firmware to check if some commands or
messages are not processed in queue. At the same time,
the interrupts for handling PING command would clear
up the queues processing, if any.

Change-Id: Iee981dde3b3a1a21b74639703f86881fd5779027
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-08-20 11:43:46 +05:30
Linux Build Service Account
199c2584e0 Merge 1d97a50965 on remote branch
Change-Id: Ia57bcf671e2b0cab1c0777b13da817e1320037e1
2021-08-11 00:29:45 -07:00
Vikash Garodia
0e56923f41 msm: vidc: set ib bandwidth for holi
For holi, there is a requirement to vote for ib
bandwidth as twice the ab. Configuring the same.

Change-Id: Idccc40669c8d84bbe9a1f536ea230c2f1cae6662
2021-08-09 03:54:04 -07:00
qctecmdr
1d97a50965 Merge "msm: vidc: support input crop feature for encoder" 2021-08-03 18:16:38 -07:00
qctecmdr
0c5245b9cc Merge "msm: vidc: Add platform capabilities for scuba" 2021-08-03 18:08:25 -07:00
qctecmdr
362689d1df Merge "msm: vidc: Add config files for scuba" 2021-08-03 18:00:48 -07:00
Fudong Zhang
43cb7c3234 msm: vidc: support input crop feature for encoder
Support input crop feature for encoder

Change-Id: Ic7b5a273fc589b917b4b7672d67026cda7264941
2021-07-22 01:33:28 -07:00
qctecmdr
c121e47aad Merge "msm: venc: set auto frame rate only for VBR CFR native recorder" 2021-07-20 10:29:10 -07:00
Priyanka Gujjula
046dec9f65 msm: vidc: Add support for cx_ipeak
Add supporting changes in video driver for
cx_ipeak feature

Change-Id: Iea30144b52dce525c6abc80f415c859fffdb0b2d
2021-07-12 12:04:12 +05:30
Fudong Zhang
ad091aa6ae msm: vidc: Add platform capabilities for scuba
Add platform specific capabilities for scuba target.

Change-Id: I1296b4934b1d3e2fb338fd0eff2617d45d406286
2021-07-09 01:02:59 -07:00
Fudong Zhang
a65ceebe83 msm: vidc: Add config files for scuba
Add video config files for scuba to enable
the video driver for scuba target

Change-Id: I2ee99356ab66f81e2b1a15b4a76155938ffe0db5
2021-07-09 14:42:44 +08:00
Linux Build Service Account
9d2893824e Merge 171f80434d on remote branch
Change-Id: Ib2bc955fc0524fc72534f4d4936eaff12a32f2a6
2021-07-07 23:45:29 -07:00
qctecmdr
171f80434d Merge "msm: vidc: Fix low latency log print" 2021-07-04 18:21:53 -07:00
Yang Xiaoqin
a2e13c93b9 msm: venc: set auto frame rate only for VBR CFR native recorder
Don't set AUDO_FRAME_RATE for non camera-recorder usercase.

Change-Id: I1e072538d2a7f431653c7bfd933b5d1c0b83f906
Signed-off-by: Yang Xiaoqin <quic_xiaoqiny@codeaurora.org>
2021-07-01 23:27:08 -07:00
Sayantan Majumder
6ac9be10aa msm: vidc: enabling dynamic session context for different targets
Adding support to enable dynamic maximum no of instances for
video sessions based on the different platforms.

Change-Id: I16b92cc8cc740809042947590dcd73dcf4801f96
Signed-off-by: Sayantan Majumder <smajumde@codeaurora.org>
2021-06-24 06:10:10 -07:00
Sayantan Majumder
9f18b35929 msm: vidc: enabling new DTSI compatibility for IOT specific target
Added new compatibility string to enable video H/W acceleration
for qcm6490

Change-Id: I51fcc010cc85e05f26ac5b1e8d3ba4ad5fa8b052
Signed-off-by: Sayantan Majumder <smajumde@codeaurora.org>
2021-06-24 06:08:43 -07:00
Linux Build Service Account
8cd4f38697 Merge d8e78d23c3 on remote branch
Change-Id: I2a28934698886330f7ce014fb3e408578a0949d0
2021-06-22 23:53:37 -07:00
Priyanka Gujjula
763a8236a8 msm: vidc: Fix low latency log print
Fix low latency log print for decoder

Change-Id: I9fbcb0650a1c89ef4863866225c0e98092f51409
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2021-06-22 10:19:33 +05:30
Sayantan Majumder
20846af219 msm: vidc: enabling dynamic session context for different targets
Adding support to enable dynamic maximum no of instances for
video sessions based on the different platforms.

Change-Id: I16b92cc8cc740809042947590dcd73dcf4801f96
Signed-off-by: Sayantan Majumder <smajumde@codeaurora.org>
2021-06-17 00:52:55 +05:30
Sayantan Majumder
b1b38cd347 msm: vidc: enabling new DTSI compatibility for IOT specific target
Added new compatibility string to enable video H/W acceleration
for qcm6490

Change-Id: I51fcc010cc85e05f26ac5b1e8d3ba4ad5fa8b052
Signed-off-by: Sayantan Majumder <smajumde@codeaurora.org>
2021-06-17 00:31:15 +05:30
qctecmdr
d8e78d23c3 Merge "msm: vidc: Add support for encoder complexity" 2021-06-15 00:47:01 -07:00
Santhosh Behara
ca17de823f msm: vidc: Add support for encoder complexity
Add support for encoder complexity handling.
Enable lowpower mode if the complexity is 0.

Change-Id: Ife290b377c844e5b1d3be93b2509c787f8e05c59
Signed-off-by: Santhosh Behara <santhoshbehara@codeaurora.org>
2021-05-29 03:14:58 -07:00
Priyanka Gujjula
f0556555c7 msm: vidc: Allow adaptive B frame encode for hevc
Both H264 and HEVC can support adaptive B frame
encoding.

Change-Id: I4b51a224d9ed9bb173f40ea5c4c919ff2800a85c
2021-05-24 15:04:35 +05:30
Linux Build Service Account
56e3e9164e Merge d435c9e7f1 on remote branch
Change-Id: I28b5b4940b146f71f504eb413656255fa03946b3
2021-05-23 12:51:26 -07:00
qctecmdr
d435c9e7f1 Merge "msm: vidc: Resolve compilation erorr on 32bit device" 2021-05-06 20:55:14 -07:00
qctecmdr
797c9a6a15 Merge "msm: vidc: fix memory leak in open/close" 2021-05-02 01:04:47 -07:00