Commit Graph

540 Commits

Author SHA1 Message Date
qctecmdr
500619a0d8 Merge "msm: vidc: keep memory_size_limit check for new session" 2020-05-26 10:21:53 -07:00
qctecmdr
e8968dd197 Merge "msm_vidc: venc: update HEIF output buffer count" 2020-05-25 23:04:07 -07:00
Shi Zhongbo
5ffcf2bdc2 msm_vidc: venc: update HEIF output buffer count
1. Update buffer count after setting bitrate mode
2. Update HEIF output buffer count to 12

Change-Id: Ibbe80bc219b51db7d9c10cb001932d8e55a6f086
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-05-25 09:38:17 +08:00
Shi Zhongbo
0429942772 msm: venc: update min input buffer count for HEIC
After grid flag enabled for HEIC, update min
input buffer count to 2.

Change-Id: Ia279b571af8c15e029a1cc77e3cbd3f6e51448f7
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-05-24 18:07:53 -07:00
Manikanta Kanamarlapudi
c13ea9ecdb msm: vidc: Adjust the load for concurrent sessions
Adjust the load by max image spec for concurrent
video and image sessions.

Change-Id: I433b3a4fb4436589b930a842a02033ac665a826c
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-05-23 09:22:27 -07:00
Qiwei Liu
70c6739172 msm: vidc: fix input port enum_fmt
Assign enum_fmt_out to support input port enum_fmt.
Fix encoder enum_fmt compressd flag.

Change-Id: I822ee81586fe50bfe1fbfd8a808307051e639a79
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-05-22 20:47:56 +08:00
Govindaraj Rajagopal
8eaf9d9bc8 msm: vidc: add active session check for clk and bus vote calculation
After couple of buffer transaction, sometimes session will be idle,
So do not consider inactive sessions for clk scaling and bus vote
calculation.

Change-Id: Ib4cc7606da6c828ce1d9108528a2cbbad4e5f6e4
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-22 12:58:17 +05:30
Govindaraj Rajagopal
5b0dfe97c8 msm: vidc: fix dpb buffer count validation
Shouldn't use count_min to validate dpb buffer count, as it
has already been modified when received seq change event.
Use dpb buffer_count_actual instead.

Change-Id: Iad4117e4d0045859312d726caae1c8801ba1b897
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-22 12:57:33 +05:30
Govindaraj Rajagopal
343e1966ff msm: vidc: update dpb buffer requirements
buffer counts(min_cnt, min_host, actual_cnt) is updated in
hal_buffer_requirements only for internal buffers. Currently
for dpb, we are updating only actual_cnt, due to that
msm_vidc_verify_buffer_counts check is failing. So updated
all 3 variables (min_cnt, min_host, actual) for dpb.

Change-Id: Ib6e476fae57407a2b5fb55b1b73986dfca410ae6
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-22 12:54:03 +05:30
Govindaraj Rajagopal
809cf3a2e5 msm: vidc: restrict non_secure iova usage
check total non_secure memory usage, reject the new
non-secure session, if total non-secure memory usage
exceeds the non-secure region size.

Change-Id: I2b0aaae061e5b022237a4c49c66e92461fb40fca
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-22 12:50:05 +05:30
Govindaraj Rajagopal
9f4d365098 msm: vidc: keep memory_size_limit check for new session
do not allow to open new session, if total video consumed
memory is beyond allowed memory_size_max_limit for video.

Change-Id: I6bfade01f99bae24691254744adf7ce38de51fdd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-22 12:13:49 +05:30
qctecmdr
21b711e085 Merge "msm:vidc: Modify input buffer size calculation" 2020-05-21 21:11:52 -07:00
qctecmdr
ca0e7dd803 Merge "msm: vidc: remove usage of core 1" 2020-05-21 18:46:47 -07:00
Manikanta Kanamarlapudi
ec7ac2c5f2 msm:vidc: Modify input buffer size calculation
calculate buffer size as per the max resolution
for the targets that does not support 4k and also
ensure the size is equal to YUV size by overriding
the div factor to 1.

Change-Id: Ia63676d30d1ee1e697518780a03a48010380555d
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-05-21 11:20:55 -07:00
Govindaraj Rajagopal
07430ccb14 msm: vidc: add support for enc_chroma_qp_offset
[1] add support for HFI_PROPERTY_PARAM_HEVC_PPS_CB_CR_OFFSET
[2] send (cb_qp_offset << 16 | cr_qp_offset) to firmware
[3] default:0 and overridden: -12
[4] firmware will subtract 12 from driver sent value.
      0 maps to 12 to fw and bitstream has 0
    -12 maps to  0 to fw and bitstream has -12

Change-Id: I286c7088640349691930c95e9b176e4e748c669a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-05-21 08:03:30 +05:30
qctecmdr
b80bcd6127 Merge "msm: vidc: add RGBA UBWC colorformat support" 2020-05-20 16:13:28 -07:00
qctecmdr
2ea1272898 Merge "msm: vidc: Skip AON register programming for IRIS2 1pipe" 2020-05-19 19:14:57 -07:00
qctecmdr
a214a5b9ca Merge "msm: vidc: Remove support for noc error info registers on IRIS2 1pipe" 2020-05-19 18:01:28 -07:00
qctecmdr
d7718d9d7b Merge "msm: vidc: Enable work mode 2 for image sessions" 2020-05-19 13:45:54 -07:00
Dikshita Agarwal
690e327f30 msm: vidc: remove usage of core 1
Remove usage of core 1 since there is no support of IRIS1.

Change-Id: I5588b452455b592b8156ea4f46cb8e3171e14947
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
2020-05-19 15:02:47 +05:30
Priyanka Gujjula
201523fbce msm: vidc: Skip AON register programming for IRIS2 1pipe
AON register programming is used to set NOC to low
power mode during IRIS2 power off sequence. However
AON register memory map is not applicable and hence
skipping AON register programming for lagoon.

Change-Id: Ib63248d118ed9fecfa5fa87925e8f69625dc1ba8
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-05-19 11:50:25 +05:30
Priyanka Gujjula
6d5c90a321 msm: vidc: Remove support for noc error info registers on IRIS2 1pipe
a. NOC error info registers are different for IRIS2_1 pipe HW
   to IRIS2 HW. FW can retrieve the same info without NOC error
   info registers. Hence removing the support to print NOC
   error info registers for lagoon.
b. Since IRIS2 has noc error recovery enabled and same FW is
   used for IRIS2 and IRIS2_1 pipe, only printing NOC error
   info registers is disabled with out disabling noc error
   recovery.

Change-Id: I936629e4f53faa5e25b2a64fb92378a26499ed57
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-05-19 11:48:41 +05:30
qctecmdr
eff8274f54 Merge "msm: vidc: Update HFI enc_scratch1_size for lahaina" 2020-05-18 17:25:14 -07:00
qctecmdr
97f11a69f3 Merge "msm: vidc: Add IRIS2 1pipe support" 2020-05-18 17:25:14 -07:00
qctecmdr
4a6a89f80d Merge "msm: vidc: Add log to indicate image session" 2020-05-18 17:25:14 -07:00
Chinmay Sawarkar
71bfe61fda msm: vidc: Initialize ubwc_stats_lock
Initialize ubwc_stats_lock before use and destroy it before
video instance is destroyed.

Change-Id: I4ecc02109d9d1c3f8b7cfe28c49b5467866b4d3e
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2020-05-17 14:37:12 -07:00
Shi Zhongbo
c291a1bcb5 msm: venc: add bitrate boost mode
Add to enable bitrate boost mode when rate
control mode is VBR and CAC is enabled.
The default boost margin is 25. This value
can be config from 0 - 100 by the client.

Change-Id: I4c3d0ae557052d3e615aee4c74b52ce0596fcfcc
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-05-14 10:15:18 +08:00
Priyanka Gujjula
196a38b647 msm: vidc: Update HFI enc_scratch1_size for lahaina
Update colrcbuf_size calculations with frame width/height
in MB's instead of frame width/heigt in LCU's.

Change-Id: Ia84609e90c3bd6fb626cf759090e9ddcd1f86435
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-05-10 21:37:15 -07:00
qctecmdr
0cc830f0c4 Merge "msm: vidc: Add support to Adaptive Blur" 2020-05-09 12:17:12 -07:00
qctecmdr
75cce59c6e Merge "msm: vidc: Add control to configure latency hint" 2020-05-09 12:17:12 -07:00
Manikanta Kanamarlapudi
bc16bc24aa msm: vidc: Change default width & height
Change default width & height for 1080p to
QVGA. Having 1080p as default, creates issue in
concurrent sessions for low end targets where
max capability is 1080p.

CRs-Fixed: 2602438
Change-Id: I0ca9d8633af1882abd5dbfd113c7dd55cd399f0a
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-05-08 12:16:04 -07:00
Priyanka Gujjula
7d5566a34a msm: vidc: Add IRIS2 1pipe support
Add vpu_ver as IRIS2_1 for lagoon and its
corresponding checks such as no CVP, ROI type,
buffer size calculators based on vpu version.

Change-Id: Ie26c015413c551ca430bb70822a4a65d61d56e11
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-05-09 00:17:34 +05:30
Vikash Garodia
6a73486000 msm: vidc: Add log to indicate image session
During multiple error scenario, video driver prints
the properties of ongoing video instances. Add a log
to indicate if the session is of type image.

Change-Id: Ie23522bd31c9f5188c204c4a1eeae59a627d1976
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-05-08 04:42:11 -07:00
qctecmdr
98bdda2be1 Merge "msm: vidc: Cleanup VP8 on lahaina" 2020-05-08 00:22:18 -07:00
qctecmdr
97637f4b3c Merge "msm: vidc: update extradata size for input buffer packet" 2020-05-08 00:22:18 -07:00
Vikash Garodia
8e325f5302 msm: vidc: Add control to configure latency hint
The control would hint the video driver to prepare
for latency mode during the video session.

CRs-Fixed: 2681306
Change-Id: Ied0307ff66b755005dcd4fe05189d7e864be208e
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-05-08 02:59:19 +05:30
Vikash Garodia
23e16e4dcd msm: vidc: update extradata size for input buffer packet
As per the interface agreement, rg_data would communicate
the size of extradata. Update the same while creating the
packet.

Change-Id: Id61bce9486a11db5263c336b3284e81953a9a070
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-05-07 13:09:50 -07:00
Manikanta Kanamarlapudi
7aac68f40e msm: vidc: Enable work mode 2 for image sessions
Enable work mode 2 for image sessions where rc type
is Constant Quality(CQ).

Change-Id: I55b6abe8a0e28b3afc55c83456c02be19cf1e7cb
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-05-07 10:50:43 -07:00
Akshata Sahukar
71e99d72e2 msm: vidc: Add support to Adaptive Blur
Updated BRS control to accept 0,1,2,3 values instead of boolean.
0 -> disable
1 -> 8-bit
2 -> 10-bit
3 -> both
Also, Internal blur is treated as adaptive in firmware with new
restrictions. Adding internal blur conditions accordingly.

Change-Id: I0aa525bc333acaeeddb5b68cf947030c25466154
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-05-06 18:23:48 -07:00
Karthikeyan Periasamy
b4510a377b msm: vidc: add RGBA UBWC colorformat support
Video hardware supports RGBA888 compressed colorformat.
So, adding RGBA support in driver.

CRs-Fixed: 2610032

Change-Id: I5f69961c2df365058406fb8a1e5cb62e283385d0
Signed-off-by: Karthikeyan Periasamy <kperiasa@codeaurora.org>
2020-05-06 14:30:27 -07:00
Akshata Sahukar
db9f5f903c msm: vidc: Introduce ETB flag for Enc Superframe handling
Driver will internally produce subframe flag for all ETB of
a Superframe to firmware (except last ETB). Firmware will
propagate subframe flag to FBD. Driver client will receive
multiple FBDs with subframe flag for single Superframe ETB
(except last FBD). This subframe flag indicates that more
FBD expected for same input.

Change-Id: I627123ee2500dd7846363d8b819c3fa56234a494
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-05-06 12:39:17 -07:00
Rakshitha Shakamuri
c599ea068f msm: vidc: Cleanup VP8 on lahaina
Remove all VP8 profiling on lahaina for both encoder and decoder.

Change-Id: I575ffdced1dbe3db0b55243acb88de4fc8971f86
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
2020-05-05 17:31:22 -07:00
qctecmdr
bfdd3e8866 Merge "msm: vidc: Enable msm_vidc_events tracing" 2020-05-05 09:54:41 -07:00
qctecmdr
303075dcf4 Merge "msm: vidc: delayed start of dec vpp processing in work mode 2" 2020-05-01 14:11:48 -07:00
Mihir Ganu
e12a799745 msm: vidc: Add frame rate control entry
Add entry for decoder frame rate control.

Change-Id: I1ccc750dbed69d302d88ca7c0f209a2e10a0578e
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-05-01 10:45:18 -07:00
Mihir Ganu
39bfdaa636 msm: vidc: Enable msm_vidc_events tracing
Enable tracing by adding trace function definitions
and remove stubbed trace functions.

Change-Id: I49902273b78265dabb43ef4a8ef1b8f2fe0529cc
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-05-01 09:07:47 -07:00
qctecmdr
5d2ebfcdfb Merge "msm: vidc: Fix NULL pointer error when DEBUG_FS is disabled" 2020-04-30 22:22:03 -07:00
Prakruthi Deepak Heragu
9903d41e30 msm: vidc: Fix NULL pointer error when DEBUG_FS is disabled
Add extra check to avoid NULL pointer derefernce when DEBUG_FS is
disabled.

Change-Id: Id89e5422c5afce0428dd77280788d50af0a22fec
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-04-30 15:59:31 -07:00
Chinmay Sawarkar
7fe6ac1624 msm: vidc: delayed start of dec vpp processing in work mode 2
Introduced new property to configure start up delay for vpp processing.
This feature is enabled for AVC/HEVC 8k resolution case. Due to the delay
in vpp processing, ubwc stats structure is moved from ebd to fbd.
Ubwc stats changed from per buffer stat to worst case stat from current
dpb list. Introduced debugfs control "vpp_delay" to control delay of vpp
processing, range 0 to 31.
Updated min buffer count requirement due to vpp delay as well.

Change-Id: Ib2a07e4b5d7a9cbf3661258790276843ad714d37
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2020-04-28 15:24:55 -07:00
Mihir Ganu
a707b90ff2 msm: vidc: Remove PM QoS functionality
Remove deprecated PM QoS functionality from vidc driver.

Change-Id: I922fdb2f2037a8fc820ebf4f2aa6d35a16c6b589
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-04-28 12:30:41 -07:00