Commit Graph

446 Commits

Author SHA1 Message Date
Vedang Nagar
c98002d4fe Video: Driver: Configure CSC on BITSTREAM port according to HFI
According to HFI definition, HFI_PROP_CSC needs to be configured
on BITSTREAM port, but during msm_vidc_set_cap, CSC is being
configured on PORT_NONE leading to error in FW.
Added change to configure CSC always on BITSTREAM port.

Change-Id: I3e9511ec40cd25687048f0739c57d164dd7a1c43
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-08-16 17:39:41 +05:30
Vedang Nagar
3d17324c68 Video: Driver: Modify platform specific changes for cliffs
Modify platform specific driver changes for cliffs target.

Change-Id: Ib02b1402c5bd6eb7f785f1459ee0bdc3f77a19ac
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-08-12 20:25:26 +05:30
qctecmdr
6fbf971e5e Merge "Video: Driver: Add support for Cliffs" 2023-08-09 10:25:26 -07:00
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
Megha Byahatti
99cccf72d8 video: driver: fix alignment and blank line warning
- Fix Alignment should match open parenthesis and
  Please use a blank line after

Change-Id: I5155f3037ab3b65a0456a18eb8c98b54760204f9
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-07-26 19:08:55 +05:30
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
050aed5c35 Merge "video: driver: fix space around '|' warning" 2023-07-24 16:42:41 -07:00
qctecmdr
e71d0da561 Merge "video: driver: fix few checker warning" 2023-07-24 16:42:41 -07:00
Ankush Mitra
9d62fcdd3a video: driver: fix space around '|' warning
Fix some of the checker warning.

Change-Id: Ia9854b515185b41673d37bdbb861993badd7d130
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-07-21 14:45:30 +05:30
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
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
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
Govindaraj Rajagopal
c484af4e69 video: driver: remove duplicate static array inclusion from header
pineapple_technology.h contains multiple static array and it is
getting included from msm_vidc_bus.c & msm_vidc_clock.c files.
So in generated build is having 2 copies of static arrays in
code segment.

So added changes to avoid duplication in generated bin.

Change-Id: Ifcfa07331e868440d033d2c7d65555810ad4d1b3
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-07-06 19:27:02 +05:30
qctecmdr
d174ba4539 Merge "video: driver: fix MAX_NUM_REORDER_FRAMES property usage" 2023-06-29 12:04:03 -07:00
Akshata Sahukar
07116875d4 video: driver: fix MAX_NUM_REORDER_FRAMES property usage
MAX_NUM_REORDER_FRAMES is 32 packed with MSB 16 bits representing
reorder frame count. Instead, this has been used as integer with
all bits reprsenting reorder frame count. Fix this.

Change-Id: I275a0be71ecf89c44374782445f66ac7e709e2a7
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-06-27 10:23:15 -07:00
Vedang Nagar
e05b1f39c9 video: driver: Remove core check from video driver
Remove core check from all the functions in video driver.
ore check is present in most of the functions in video
driver which is not required.
Keep check only at root level functions and remove
the check from rest all of the functions.

Change-Id: I5f6374b68dd739b7ab563f32f64bb90e368c4085
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-06-22 20:53:42 +05:30
Akshata Sahukar
907ea75504 video: driver: Add support to enable output tx sw fence by default
As part of default enablement of output tx type sw fence,
add this support in driver to disable fence based on
below conditions for INPUT_PSC propertities:
- If session is interlace type
- If OUTPUT_ORDER is 0 and HFI_PROP_MAX_NUM_REORDER_FRAMES > 0

Change-Id: If861129ba96329c0277a9c9698f67baf25e5d82e
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-06-15 16:11:58 -07:00
qctecmdr
2c5cd81fe8 Merge "video: driver: cleanup driver remove sequence" 2023-06-15 09:01:57 -07:00
Govindaraj Rajagopal
29d10ac07b video: driver: cleanup driver remove sequence
Remove deinit sequence calls and register devm
managed callbacks, so that kernel can invoke
then, when dev scope ends and cleansup all
associated resources.

Change-Id: I729fd21fe32d9f39240d0b743f910409d93a00c5
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-06-13 13:17:23 +05:30
Gaviraju Doddabettahalli Bettegowda
4bab4056f6 video: driver: Encode with multi slice mode
Bitrate is not a mandatory parameter for setting multi-slice encode configuration.
If the client not setting bitrate then default value can be used to
calculate slice count incase of byte mode multi slice encode,
and it's not needed for macro-block mode multi slice encode.

Currently, multi slice encode is enabled only when client set bitrate
explicitly otherwise it's configuring single slice encode mode.

So added change to remove the bitrate dependancy for configuring multi slice encode.

Change-Id: Ia9c541d693107b9eb57e530c6e44cad70216f1dc
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
2023-06-11 22:05:20 -07:00
Ankush Mitra
e1cb32c5de video: driver: resolve some checker err
Resolve some static checker err.

Change-Id: I0aa1d8c905ac7fd1defa16dd28d4386465f09ff3
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-06 11:57:20 +05:30
Vedang Nagar
89d31c2d86 video: driver: Configure BaseLayer PID at RAW port
Currently BASELAYER Priority ID was being configured at BITSTREAM
PORT, For dynamic configuration, baselayer priority ID needs to be
configured at RAW port. Added change for the same to configure this
property at RAW port.

Change-Id: Ice927aae4d8ed5228ef1b31da7ec58bb81f2aea8
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-06-02 18:47:00 +05:30
Ankush Mitra
542b9f9736 video: driver: enclosed macros with complex values within bracket
This is resolve some of this kind of checker err.

Change-Id: Ief665e17045c3b6a6ff636ab6404c6e0c93e9460
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-01 12:32:01 +05:30
Ankush Mitra
7d25fa161b video: driver: changing "foo* bar" to "foo *bar"
This change will resolve this
checker err from all directory.

Change-Id: I7b7b3af554c97fef9d81210fdf8984d2a53facbc
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-31 19:47:02 +05:30
Vedang Nagar
e2663ce820 video: driver: Remove inst check in video driver
Remove inst check from all the functions in video driver.
Inst check is present in most of the functions in video
driver which is not required.
Keep check only at root level functions and remove
from rest all of the functions.

Change-Id: Ib310cd3df5e8612a9fc3a5aa654dff4203a12906
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-25 21:04:49 +05:30
qctecmdr
bc8e64cf79 Merge "video: driver: ring buffer enhancements" 2023-05-25 08:23:45 -07:00
qctecmdr
2e53705d7c Merge "video: driver: Update session priority setting" 2023-05-24 13:15:07 -07:00
Vedang Nagar
3018f2c1d3 video: driver: Update session priority setting
Modify session priority controls -
  ___________________________________________________________
 |  Description    |    HAL Value     |Driver value|FW Value|
 |_________________|__________________|____________|________|
 |Critical Priority| Vendor Extension | Via control|   0    |
 |      RT         |        0         |      0     |   1    |
 |      NRT        |     -1 to -4     |     1-4    |  2-5   |
 |_________________|__________________|____________|________|

Change-Id: I7b28109bde3968f38c2e3cc42cf4cf5dd195cc10
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-23 20:58:04 +05:30
Deepa Guthyappa Madivalara
def6b6328b video: driver: ring buffer enhancements
1. use max of operating and frame rate for fps
2. vpp_cycles is considered close to frequency
   corner if vpp_min_freq is greater than max
   required frequency

Change-Id: I9dc995ca16e4eeae18497a8648dfef64e16dfbc2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-19 15:22:26 -07:00
Darshana Patil
3424965c49 video: driver: enable EOS event for encoder
In case of encoder drain followed by immediate
stop usecase, fw might send drain last flag info
packet instead of last flag buffer due to
insufficent output buffers. In this scenario, driver
signals EOS through an event. To avoid sending last
flag buffer in some usecases and EOS event in other
usecases, to maintain consistency, always send last
flag information via EOS event to client.

Change-Id: Ib816603fb171a5f3f72f163614588490514f8c59
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-05-18 14:05:54 -07:00
qctecmdr
8c6659988d Merge "video: driver: operating rate changes for latency improvements" 2023-05-16 12:27:37 -07:00
Deepa Guthyappa Madivalara
2ba0f6e1e7 video: driver: operating rate changes for latency improvements
1. allow any client set operating rate (less than 2^15)
2. remove operating rate dependency for admission control
3. allow turbo for low latency case as well

Change-Id: I4b0f29c3756a592a9baedec8996653e5cb5292d5
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-05-15 16:54:49 -07:00
Vedang Nagar
4ccc58cfa9 video: driver: Update BaseLayer priority ID as Dynamic Property
Update BaseLayerPriority ID as dynamic property for pineapple

Change-Id: Ib036c8c47190842dff76fa45d50a65385ef28dca
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2023-05-15 23:57:31 +05:30
Mihir Ganu
ebf3410136 video: driver: Remove the unsupported ARGB32C format.
Remove the unsupported ARGB32C (RGBA8888 UBWC) pixel format.

Change-Id: Ia5ce610c4d3306b5f50f5132c9533bd9e86f0a6f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-05-04 11:21:48 -07:00
qctecmdr
205e95cd3d Merge "video: driver: separate i/o subscribe prop codec wise" 2023-05-01 10:29:51 -07:00
Akshata Sahukar
982e626d00 video: driver: Add support to 1kx1k tile for HEIC encoding
- Introduce new control to set HEIC encoder tile size from HAL
- Support 1k x 1k tile encoding along with existing 512 x 512
  tiling

Change-Id: Iaeffe421f8311d818695c3ae9af7cabcc8892043
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-04-28 10:07:48 -07:00
Ankush Mitra
2468a6c91b video: driver: separate i/o subscribe prop codec wise
Separate i/o subscribe prop codec wise.

Change-Id: Ia7f63b571142507eb4d7d5ea1c0197aa74679448
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-28 22:31:19 +05:30
Ashish Patil
c7216017e1 video: driver: moving private controls to common platform folder
Move private controls from each platform source files to
common header file

Change-Id: I22d8aa7f81919d950eed6b1f4ccd020c803a7ce9
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-04-27 12:59:14 -07:00
qctecmdr
76ac7dd6d5 Merge "video: driver: separate i/o subscribe prop codec wise" 2023-04-25 18:48:57 -07:00
Mihir Ganu
ed0cdf0c3f video: driver: Move private controls from UAPI
- Move vendor private controls from UAPI to internal headers.
- Add guards for AV1 format.

Change-Id: Ida6348aa393be26f0be1b18ed4e08477bdaabac0
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-21 15:05:33 -07:00
Ankush Mitra
0a26c4b8ce video: driver: separate i/o subscribe prop codec wise
Separate i/o subscribe prop codec wise.

Change-Id: Ib4ba9d6d491f26bad9798c0d4d9be62b272d6421
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-04-20 17:56:09 +05:30
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
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
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