커밋 그래프

440 커밋

작성자 SHA1 메시지 날짜
qctecmdr
db3c2f79da Merge "video: driver: Update MBPF session admission check" 2021-05-20 23:17:47 -07:00
qctecmdr
a4038a8565 Merge "video: driver: fix core lock acquire and release sequence" 2021-05-20 18:12:48 -07:00
qctecmdr
1b620d866b Merge "waipio: driver: Fix decoder log during low latency" 2021-05-20 15:17:18 -07:00
Mihir Ganu
4eda00e068 video: driver: Update MBPF session admission check
Update session admission check to enforce max MBPF limit
by considering both realtime and non-realtime sessions.

Change-Id: I2556a6d7e4220f3151406febef3f0ebde9b4a20b
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-05-20 10:51:34 -07:00
Govindaraj Rajagopal
7f084e9a18 video: driver: add additional profile support for image session
Added main & main10 profile support for HEIC image session.

Change-Id: I738c6e55c361bdccac7c4d1165abcf9363d80eb7
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-20 16:27:15 +05:30
Govindaraj Rajagopal
53578c8ec2 video: driver: fix core lock acquire and release sequence
[1] Added return type to strict_check() api and bail out if
    strict_check fails.
[2] Fix all the failures with #1.
[3] Added WARN_ON() for strict_check failure.
[4] Ensured &core->lock is acquired before calling below api's.
    - __write_register
    - __write_register_masked
    - __iface_cmdq_write_relaxed
    - __suspend
    - __resume
    - venus_hfi_core_init
    - venus_hfi_core_deinit.

Change-Id: I7f0a3ca6c2aec2758220c90bff9260367f10820b
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-20 14:34:11 +05:30
Vikash Garodia
cc037ae3de waipio: driver: Fix decoder log during low latency
In low latency mode, for a decode session, low latency
is being configured properly. But the log still indicates
that low latency is not enabled. The change fixes the same.

Change-Id: I65a88fb6dff639dd78522316e839fc05d43ec39c
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-05-20 10:08:50 +05:30
Akshata Sahukar
945883602d video: driver: add support to set csc coefficients
Add support to honor client enablement of csc custom
matrix and set csc coeff to video firmware.

Change-Id: I14d702eb7033541aa439bebe11df7fc4aa49ffdb
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-19 17:17:01 -07:00
Darshana Patil
6a6a3cba5c video: driver: update alignment for p010
update alignment to 128 for stride in  pixel
calculation for p010 color format.

Change-Id: I0fda66f06409bb9947c88a60a88a9ea8f70505a5
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-18 12:41:51 -07:00
qctecmdr
c3bed56c94 Merge "video: driver: modify bytesused if DPB tag list enabled" 2021-05-17 21:49:01 -07:00
qctecmdr
0287f0d1f4 Merge "video: driver: modify unmap excess mappings" 2021-05-17 21:49:01 -07:00
Darshana Patil
cad8267eca video: driver: modify bytesused if DPB tag list enabled
vb2 is not allowing client to pass data in output meta plane.
adjust the bytesused as client will send buffer tag metadata
in output meta plane if DPB_TAG_LIST metadata enabled.

Change-Id: I2d99d0acf559c4b92e0610d518f6cfbdd54a2c19
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-17 18:43:37 -07:00
Darshana Patil
da09aa48ed video: driver: modify unmap excess mappings
Unmap only those entries with refcount 1 and
which are not present in read_only buffers
list.

Change-Id: I0bc918c3f5c1fe1a1ed62a0c16b578155a8e6d6e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-17 17:15:29 -07:00
Govindaraj Rajagopal
d9518d9182 video: driver: fix list usage without init
If workqueue creation fails, driver is accessing buffer lists
in session close sequence, which is not yet inited and leading
to NULL ptr dereferrence issue, while traversing uninitialized
list. So added change to avoid accessing list without init
completion.

Change-Id: Icb3aa6b7edaf27e73873ec289d6a921a2613e77e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-17 21:51:03 +05:30
qctecmdr
288887b59d Merge "video: driver: hb layer buf count and hfi buffer macro CL:30683524 changes" 2021-05-15 14:39:13 -07:00
qctecmdr
279c643900 Merge "msm: vidc: Add support of timestamps based frame rate" 2021-05-15 14:09:18 -07:00
qctecmdr
76b516e7e6 Merge "video: driver: Add index check in enum format" 2021-05-14 21:48:57 -07:00
Akshata Sahukar
724e5f525e video: driver: hb layer buf count and hfi buffer macro CL:30683524 changes
[1] Update enc input min count buffers count when HB layer encoding
    is enabled.
[2] Also align hfi buffer macro file with CL: 30683524.
[3] This change also fixes VPSS buffer size mismatch issue.

Change-Id: I63d91ff204f1e11e71e3c0633b582c47c5e9b102
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-14 21:40:28 -07:00
qctecmdr
cdda26a16e Merge "video: driver: define hfi setter for configuring pipe" 2021-05-14 16:18:08 -07:00
Mihir Ganu
3f52f1e392 video: driver: Add index check in enum format
Add index check in enum fmt call and add the missing
break statement in handle_session_property.

Change-Id: Ida294f9ad4b8fa5c86d73b0e5bbd5297d8dbcd1b
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-05-14 14:46:12 -07:00
Darshana Patil
e7c7a2fb02 video-driver: add decode QP metadata support
add v4l2 extension and necassary support for
decoder QP metadata.

Change-Id: I364ef9b7b3a63bef0a59c955018bc8456f12d03f
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-14 13:43:16 -07:00
Vikash Garodia
90d7de5658 video: driver: define hfi setter for configuring pipe
Deprecate custom pipe setting and use the hfi setter
to configure it alongwith other configurations.

Change-Id: Iffbd25df89f43cf77c1fa85ffa97601a31998410
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-05-14 23:48:15 +05:30
Vikash Garodia
75ecec1bb5 video: driver: Add support dynamic low latency for decoder
Latency property is set to firmware during streamon output port,
if set as part of initial configuration by client.
During runtime, the property is set as and when configured by
client.

1. Make the latency property dynamic for decoder.
2. For encoder, the same gets set to firmware with regular
   v4l2 set properties.
3. For decoder, set the property explicitly during streamon
   output port.

Change-Id: I35990614b95e57f113ddacfc2272cad6ae0dde82
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-05-14 23:47:30 +05:30
Darshana Patil
af0c91ca4c video-driver: update min resolution for secure session
update minimum resolution for secure decode sessions as
96x96.

Change-Id: I7a0bee2330a235498179f490a9343ff1fa655737
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-05-13 17:05:17 -07:00
Govindaraj Rajagopal
003d8a79fa msm: vidc: Add support of timestamps based frame rate
Add timestamp based frame rate detection.

Change-Id: Id0c522e01769ea6cf214c7b84c11faae6049e2ef
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-12 21:50:05 +05:30
qctecmdr
992a58254f Merge "video: driver: update proper state in vb2_buffer_done" 2021-05-11 20:49:09 -07:00
qctecmdr
6f7a39d1d4 Merge "video: driver: report system error when packet validation fails" 2021-05-11 18:24:02 -07:00
Akshata Sahukar
967d049715 video: driver: Support max 1 enh HB layer when cvp is disabled
Allow max 1 enh layers when cvp metadata is disabled for HB
layer type.

Change-Id: If6e33462e8be36a4ca1fb1f253875678b697c05a
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-11 16:47:14 -07:00
Akshata Sahukar
4a81629d7c video: driver: report system error when packet validation fails
Report system error when packet validation fails to avoid
unpredictable failures.

Change-Id: I196c21aba1d19846fe766585e4955b3aca3fd59e
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-11 13:12:26 -07:00
qctecmdr
849dab200f Merge "video: driver: handle race condition in msm_vidc_core_init" 2021-05-11 00:44:17 -07:00
qctecmdr
4837c16676 Merge "video: driver: add frame_skip mode control setting for heic" 2021-05-10 18:11:09 -07:00
Govindaraj Rajagopal
9a7e929dfe video: driver: handle race condition in msm_vidc_core_init
Core is moved to init state before completing full init sequence.
So subsequent new open request assumes core is already inited and
attempts to initiate a hfi_session with firmware, which is not
correct and core_init is a sync cmd, so core->lock() is released,
so that reverse thread can issue sys_init_done. But new session is
acquiring core->lock() and corroupting core->init_done.task_list
completion structure variable i.e leading to list_corruption issues.
So added change to address these issues.

Change-Id: I0b983a06b8ea58134ea93831246309c9ccbdf0d1
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-10 17:20:58 +05:30
Govindaraj Rajagopal
57180ce6f2 video: driver: update proper state in vb2_buffer_done
V4l2 clears buffer state related flags. So for driver errors
send state as error to avoid skipping V4L2_BUF_FLAG_ERROR
flag at v4l2 side.

Change-Id: Ifcb96d390746a71e8dbcf261f718439ef9ecfc91
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-10 10:48:15 +05:30
Qiwei Liu
2e2fbdb7e5 video: driver: support non-zero data_offset
In V4L2 definition, bytesused contains both data_offset
and actual payload size, whereas in HFI definition, data_size
only contain actual payload size after data_offset.
Add conversions to correctly support non-zero data_offset.

Change-Id: Ib581e942e39e0adbb673c53d1b31e669bdb2b998
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2021-05-07 07:31:39 -07:00
Govindaraj Rajagopal
0995dfc215 video: driver: add frame_skip mode control setting for heic
Added V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE support for
heic codec type.

Change-Id: I4eaca697729c45ebf72067a9d34a7dc8d607f0fa
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-07 14:21:48 +05:30
qctecmdr
cfd1584e2a Merge "video: driver: add support for main10StillPic profile" 2021-05-06 23:16:26 -07:00
Akshata Sahukar
1739ce7b92 video: driver: modify blur resolution setting and fix b_frames
[1] External blur is disbled to firmware if either blur width or
    blur height exceeds driver crop width or crop height.
    Also, it is disabled when both blur width and blur height is
    equal to blur width and blur height.
[2] fix b_frame adjustment calculation formula.

Change-Id: I71458b72095542f12c31094f7b9fc3bd34a7c66b
Signed-off-by: Akshata Sahukar <asahukar@quicinc.com>
2021-05-06 14:01:02 -07:00
Govindaraj Rajagopal
f05007686d video: driver: add support for main10StillPic profile
Added support for V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE.
It willbe used in 10bit image encoding usecases.

Change-Id: I14877547f1f4792eefb0ea6bcecf2643627c125a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-06 22:09:25 +05:30
Govindaraj Rajagopal
03db3bfd7f video: driver: add check_session_supported for session admission
- check total mbps is within range(including current session)
- check total mbpf is within range(including current session)
- image session:
    - decode: Only non-secure allowed
    - encode: check basic image_encode requirements
        - wxh should be within allowed cap range
        - only linear fmt
        - input & output is 512 aligned
        - only CQ bitrate mode
        - GOP size should be zero
        - b-frame count is zero
        - timedelta based RC disabled
        - still-pic profile for 8bit and main10 for 10bit
- interlace resolution should be less than (1920*1088)/256.
- reject odd input or output resolution
- output resolution is with in inst->cap [min, max] range.
- current session mbpf is less than inst->cap[MBPF].max

Change-Id: I81c46950a8ef5b64bf5ac94564613998b1079b52
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-05-04 14:21:57 -07:00
qctecmdr
1ecbcd6110 Merge "video: driver: fix layer bitrate dynamic setting" 2021-05-04 11:30:31 -07:00
qctecmdr
ebefd21553 Merge "video: driver: tune bitdepth settings" 2021-05-04 11:30:30 -07:00
qctecmdr
c4692136e5 Merge "video: driver: avoid race between core_timeout and handle_response" 2021-05-04 11:30:30 -07:00
qctecmdr
090dae75e4 Merge "Revert "video: driver: power collapse only if no sessions present"" 2021-05-04 11:30:30 -07:00
Govindaraj Rajagopal
8b019a5057 video: driver: tune bitdepth settings
if any one of the luma/chroma is not 8 bit, then treat as
10 bit content. So expose only 10-bit colorfmts for such
contents during enumFmt ioctl.

Change-Id: Ied6bacae25aa900918744730807a476f5762d49d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-04 22:39:09 +05:30
Akshata Sahukar
78bd0f54eb video: driver: fix layer bitrate dynamic setting
Fix the issue where bitrate cap database value is
incorrectly updated to dynamically client set layer bitrate
value when layer bitarte is not set.

Change-Id: I0f66c056c8ea0d053f8347dd003b61193258687e
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-03 19:12:33 -07:00
qctecmdr
db185fcf81 Merge "video: driver: free children and firmware list memory" 2021-05-03 15:24:29 -07:00
qctecmdr
5f1d6bd23a Merge "video: driver: fix to allocate enc VPSS buffers in CB7" 2021-05-03 13:28:53 -07:00
Govindaraj Rajagopal
b0997af910 video: driver: avoid race between core_timeout and handle_response
In fwd thread, for sync cmd timeout, core->response_packet willbe
freed as part of venus_hfi_core_deinit. So i.e leading to a crash
at reverse thread, which is, in the middle of processing response
packet as part of handle_response api. So added change to avoid
this race issue.

Change-Id: Ice7e52c46e8858c89439c17213a08d01b358fe9d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-03 18:26:08 +05:30
Akshata Sahukar
ce09f77e44 video: driver: free children and firmware list memory
To avoid memory leakage, clean children and firmware lists
at session close, error cases, and at the end of each usage.

Change-Id: I1eadbf81da207bd987c50428c0c7cf4967a8885f
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-04-30 18:42:34 -07:00
qctecmdr
401b0010e7 Merge "video: driver: tune image_encode_session settings" 2021-04-30 12:22:31 -07:00