Commit Graph

833 Commits

Author SHA1 Message Date
Maheshwar Ajja
db8a8959e2 video: driver: update input, output and crop dimensions
Update input, output and crop resolution based in client provided
resolution on input port as per the v4l2 compliance test expectation.

Change-Id: I56f197d72cc132f38c00842b28b23b20c508cf23
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-03-23 20:11:42 +05:30
qctecmdr
2d2e07aee9 Merge "video: driver: AV1 power changes" 2022-02-17 22:19:05 -08:00
Chinmay Sawarkar
48f1d09c2f video: driver: AV1 power changes
AV1 power changes.

Change-Id: If05c52cb6f30152b773389cc4127bf2514765170
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-02-17 17:15:37 -08:00
qctecmdr
0841c8daa7 Merge "video: driver: Enhance fence support" 2022-02-17 17:00:57 -08:00
Akshata Sahukar
22cc24de7f video: driver: Enhance fence support
- Introduce V4L2_EVENT_VIDC_METADATA to post fence fd returned in
  ETB metadata done buffer.
- V4L2_CID_MPEG_VIDC_SW_FENCE_FD g_ctrl support for client to get
  fence fd for requested fence id.
- Addition of fence delivery and subscribtion support.
- Fence property packetization to send to firmware via FTB buffer.

Change-Id: Ifb289849e352af2c4729aa95040bd83753979970
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-17 13:16:53 -08:00
Govindaraj Rajagopal
93b88b9d69 video: driver: re-organize enums and add comments
Re-organized enums(msm_vidc_inst_capability_type) in below
order.

[1] Root(no parents) enums,
[2] Intermittent(having both parents & children) enums,
[3] Leaf(no children) enums.

Also added proper comments in header file.

Change-Id: I2bda51b54b6fa6e190098f16dd60090004cfbecf
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-17 10:33:11 -08:00
Deepa Guthyappa Madivalara
43e71fff42 Revert "video: driver: utilize v4l2_m2m_ioctl_streamon helper function"
This reverts commit e5189157f1.

Change-Id: I33e6e45ea6a08370ef8b80cddce9916bf08e613f
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-02-16 16:35:49 -08:00
qctecmdr
7373cc5efe Merge "video: driver: add request api controls for metadata" 2022-02-15 16:26:52 -08:00
qctecmdr
ef7ec4e390 Merge "video: driver: check proper DDR type" 2022-02-15 08:52:52 -08:00
Darshana Patil
7a27860070 video: driver: add request api controls for metadata
- Added an extension to enable sending input metadata
  via request.
- Added an extension for client to send input metadata
  buffer fd via request api.

Change-Id: I503ea2cbfb02831d9cfd475e83c94eee72545836
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-14 16:17:54 -08:00
Akshata Sahukar
0a5549a6a9 video: driver: decouple fence structure from video buffer
Decouple fence structure from video buffer. Also add some
misc fence flow setup support.

Change-Id: Ia4e223a3a288f0dae3238850685f3a73d4b9400a
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-14 09:46:11 -08:00
qctecmdr
d10f2f9108 Merge "video: driver: utilize v4l2_m2m_ioctl_streamon helper function" 2022-02-11 18:19:50 -08:00
Mahesh Kumar Sharma
3552fff0cf video: driver: check proper DDR type
Different DDR types are required for different UBWC configs.
LPDDR5 and 5X are the only supported DDR types on Kailua.

Change-Id: I33e486bef79d919f0d790734acd4be05c51a39e0
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-02-11 17:11:35 -08:00
Deepa Guthyappa Madivalara
e5189157f1 video: driver: utilize v4l2_m2m_ioctl_streamon helper function
Use v4l2_m2m_ioctl_streamon helper function for input and output ports

Change-Id: I20375259321cc5925ccaf7f8eab95a94f55d2821
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-02-11 16:49:44 -08:00
qctecmdr
dde62fecf8 Merge "video: driver: check whether meta buffers dequeued from FW" 2022-02-10 22:35:17 -08:00
qctecmdr
528845d245 Merge "video: driver: propagate i/p port color info to o/p port" 2022-02-10 22:35:17 -08:00
qctecmdr
8a7f66a9f4 Merge "video: driver: handle invalid format in s_fmt" 2022-02-10 22:35:17 -08:00
Akshata Sahukar
71f8dcf2f2 video: driver: Align hfi property file with CL: 35116137
Align driver hfi property file with fw file of CL: 35116137

Change-Id: Ic5abbb9212b664b55f16afa4c79e00fb0d76ae89
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-10 15:01:22 -08:00
Darshana Patil
18e6df6689 video: driver: check whether meta buffers dequeued from FW
when metadata is enabled check if the meta buffers are dequeued
from FW before sending vb2 buffer done on corresponding input
or output buffers.

Change-Id: Icabeaf08b398b9be0159d5db68c94734351b3a5a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-09 11:53:54 -08:00
Mahesh Kumar Sharma
4597327ed8 video: driver: change maximum frame rate to 480fps
In order to avoid performance issues when encoding
1280x720p frames with 960fps, change maximum frame
rate to 480fps on Kalama.

Change-Id: I0ca44ebf9524583a0a3ffc32423b0bb63acd0d47
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-02-09 09:54:58 -08:00
qctecmdr
5f23b44d6d Merge "video: driver: update iris3 power collapse sequence" 2022-02-08 19:06:27 -08:00
qctecmdr
fe6594bcce Merge "video: driver: add support to send input meta buffer via request" 2022-02-07 20:52:22 -08:00
Chinmay Sawarkar
776fb518c8 video: driver: update iris3 power collapse sequence
1. Set Iris CPU NoC to Low power
2. Remove Debug bridge Low power
3. Reset MVP QNS4PDXFIFO
4. Remove Disable GCC_VIDEO_AXI0_CLK clock

Change-Id: I4a88589cacc894dc5717e8ccb5f731f62e82202d
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-02-07 18:32:39 -08:00
qctecmdr
ca802f423a Merge "video: driver: Update power down sequence" 2022-02-07 17:46:21 -08:00
Dikshita Agarwal
4d8dedc066 video: driver: handle invalid format in s_fmt
Handle invalid format 0xfffff by invoking try_fmt in
s_fmt. It is expected from driver to return EINVAL for only
unsupported buf type and if color format is unsupported,
driver should fill the fmt structure with valid values.

Partially Fixes: v4l2-compliance:
			TestSetFormat(VIDIOC_S_FMT)

Change-Id: I27e82866e8ad4a13661431f2a38a66ac3ef7dd80
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-02-07 11:20:13 +05:30
Chinmay Sawarkar
f7c4e2fe65 video: driver: Update power down sequence
Copy fixes in power down sequence from Iris2 to Iris3.

Change-Id: I0ec94dbe064e10b6c4172b206561d8951c00a26b
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-02-04 15:53:23 -08:00
Chinmay Sawarkar
784cc63c21 video: driver: reset video_cc_mvs0_clk_src clock_rate
Reset video_cc_mvs0_clk_src value to resolve MMRM high video
clock projection issue.

Change-Id: Ieb937dfdc7d48e1a95a0052a32189d00eeac70cf
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-02-04 15:39:48 -08:00
Darshana Patil
9978dc376e video: driver: add support to send input meta buffer via request
Client can enable V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE
control and send input metadata buffer via request.

Change-Id: Icccdada8253d1d0291c01e2e539968141f7ddd2c
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-04 13:47:34 -08:00
Akshata Sahukar
9df792a982 video: driver: propagate i/p port color info to o/p port
Client may do g_fmt on output port to fetch output port
color info. Hence, update output port color info with
client set input port color info.

Change-Id: Ifa3b16763d7389cd063493e25ce8b266ce1cb8c6
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-04 10:33:43 -08:00
Chinmay Sawarkar
000a10db56 video: driver: Port fixes from iris2 to iris3
1. Change format specifier and API clean-up
2. Remove HEIC from Lossless Encoding
3. add support for timestamp reorder
4. alter bitrate_mode child adjust sequence
5. disable dynamic low latency

Change-Id: I57d8150bac123cdfd8a0d14a2422246b87b4abfa
Signed-off-by: Chinmay Sawarkar <quic_chinmays@quicinc.com>
2022-02-03 16:02:23 -08:00
Darshana Patil
7c4952934b video: driver: packetize dynamic controls with buffer
packetize dynamic controls set via request api along
with corresponding input buffer under the same hfi header
and queue to FW.

Change-Id: I8bf82f7ccb1ab16c42ce02189a208f5f7cb8dc70
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-03 15:08:02 -08:00
qctecmdr
dc71b3eaf1 Merge "video: driver: misc video changes" 2022-02-03 14:48:53 -08:00
Mihir Ganu
4a74cbd8bd video: driver: Update IRIS3 HFI buffer macros
Update HFI buffer macros to avoid declaring variables
after statements.

Change-Id: If7584d14e426be1a2f681dae36334d4913b06a90
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-02-03 13:01:47 -08:00
Maheshwar Ajja
ef829ce44f video: driver: add fence support
Add fence support for decoder output buffers for
the consumer to use it to improve latency.

Change-Id: I7384b4a9793248988a2d2d546a535f26636d5bb3
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-02-02 21:43:52 -08:00
Govindaraj Rajagopal
0ba80e3956 video: driver: misc video changes
[1] Remove CAP_FLAG_ROOT flag. Root willbe identified
    with has_parents() api.
[2] Replace field(struct msm_vidc_inst_cap) cap -> cap_id.
[3] Rename below pool apis.
    msm_memory_alloc    -> msm_memory_pool_alloc
	msm_memory_free     -> msm_memory_pool_free
[4] Remove struct msm_vidc_inst_cap_entry usage in inst.
	inst->firmware.list -> inst->firmware_list
	inst->children.list -> inst->children_list
[5] Organize msm_vidc_inst_capability_type enums in such
    a way that all parents placed first then children. It
	will save CPU cycles while preparing caps_list.

Change-Id: I376f4e6ddec37ce326c393fba133e19ba70bab09
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-03 09:58:19 +05:30
qctecmdr
4b2e594b7b Merge "video: driver: support for VP9 decoder frame rate and operating rate" 2022-02-02 18:37:16 -08:00
Mahesh Kumar Sharma
cf1a809434 video: driver: support for VP9 decoder frame rate and operating rate
Increase operating rate from 60fps to 120fps with vp9 decoder to allow
application to use vp9 decoder upto 120fps on kalama.
Support of frame rate and opertaing ratear upto 120fps for waipio T.

Change-Id: Ic9149bcb904c3e650f9e97d58080426236a1a4eb
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-02-02 14:15:55 -08:00
qctecmdr
c8b7a6830a Merge "video-driver: prepare conflict free dependency list" 2022-02-02 14:09:20 -08:00
qctecmdr
7f8fc5be92 Merge "video-driver: disable dynamic low latency" 2022-02-02 14:09:20 -08:00
qctecmdr
1f3a7188cb Merge "video: driver: add support for create buf" 2022-02-02 13:53:27 -08:00
qctecmdr
8f0905c717 Merge "video: driver: Add HFI and internal buffer changes for AV1 DRAP" 2022-02-02 13:53:27 -08:00
qctecmdr
444d66c792 Merge "video: driver: update OP port setting if rotation is enabled" 2022-02-02 13:53:27 -08:00
Govindaraj Rajagopal
d9debeed9e video-driver: prepare conflict free dependency list
Convert multi-parent, multi-child based dependency tree
into flattened list. It is organized in such a way that
all parents willbe present before self or any child node.

For some caps, adjust sequence is called without preparing
parent nodes. So that is leading to undefined behaviour.

Added change to address these problems.

Change-Id: Ib28cae8a4ed7e019c80ecfc06519ef78ffa4dc08
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-02 14:59:48 +05:30
Mihir Ganu
9bacc5d124 video: driver: Add HFI and internal buffer changes for AV1 DRAP
Add changes for AV1 DRAP (Delayed Random Access Point) handling:
1) Add config in kalama database to control DRAP and the HFI property
to set DRAP config.
2) Update buffer calculations:
- When DRAP is disabled, COMV buffer must be allocated
and PERSIST buffer must be allocated with total_ref_count = 0
- When DRAP is enabled, COMV buffer must not be allocated -
it is part of PERSIST buffer. Persist buffer must be allocated with
the max_width, max_height and total_ref_count configured for DRAP.

Change-Id: I2d2e8fd3f63ea8f9fc2845acd0b4e16ba4776a6b
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-02-01 15:32:01 -08:00
qctecmdr
8d6bee38b3 Merge "video: driver: fix msm_vidc_remove sequence" 2022-02-01 15:21:17 -08:00
Zhongbo Shi
afa424d529 video-driver: disable dynamic low latency
Dynamic low latency causes decoder input PSC triggered
for every IDR frame, leading to clock increasing.
And this also causes power higher
for VT call. Thus, need the following changes:

1. Disable dynamic low latency when low latency mode
is enabled;
2. DO NOT allow config low latency mode after
stream on.

Change-Id: Ia57f4c75617214b0352b263425ad9b445ff95524
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
2022-02-01 13:54:45 -08:00
Govindaraj Rajagopal
eee7bd1a5e video: driver: fix msm_vidc_remove sequence
of_platform_depopulate() will attempt to call
msm_vidc_remove for each sub device(contextbank)
individually. So added support for sub device
remove sequence.

Change-Id: I74806e30355d69f7d6080db820bad739b556366f
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-02-01 18:41:36 +05:30
Dikshita Agarwal
58e4fd1d8f video: driver: update OP port setting if rotation is enabled
Update the output port setting when set control is called for
rotation irrespective of the value of rotation angle.

Partially Fixes: v4l2-compliance: encoder:
			TestSetFormat(VIDIOC_S_FMT)

Change-Id: Ic5dce8089820f69fd38ac3b394e1c139d5d76f1b
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-02-01 15:13:18 +05:30
Dikshita Agarwal
365d8650f2 video: driver: add support for create buf
Add handling for VIDIOC_CREATE_BUFS ioctl in driver.
    This ioctl is used to create buffers for memory mapped
    or DMA buffer I/O.
    It can be used as an alternative or in addition to the
    ioctl VIDIOC_REQBUFS ioctl, when a tighter control over
    buffers is required.
    This ioctl can be called multiple times to create buffers
    of different sizes.

    Partially Fixes: v4l2-compliance:
                    test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF.

Change-Id: I9dd6c3f48e48e297b3e56fd4c8062869c8b55bee
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-02-01 13:49:53 +05:30
Dikshita Agarwal
bf0e8166d8 video: driver: add support for query buf
Add handling for VIDIOC_QUERYBUF ioctl in driver.
This can be used to query the status of a buffer
at any time after buffers have been allocated with
the VIDIOC_REQBUFS ioctl.

Partially Fixes: v4l2-compliance:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF.

Change-Id: Ifd014bd8a8b02ce9fa15c62d7583bc8bcfb6756a
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-02-01 08:43:40 +05:30