Commit Graph

347 Commits

Author SHA1 Message Date
Priyanka Gujjula
41d0edcaa2 video: driver: diwali: Add core caps
Add core caps for all diwali variants

Change-Id: I8917c574becd5923b7767404f81c01341ba29276
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 16:29:34 +05:30
Priyanka Gujjula
043ab4c9f7 video: driver: diwali: Add SKU clock data
Add clock corners for diwali v1 and v2
variants.

Change-Id: I1322dada7dafed10cb17b9ab4bcef45f102d371c
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:50:32 +05:30
Priyanka Gujjula
f352311f44 video: driver: Add diwali SKU's
Add support for diwali AA/AB(v1) & AC(v2) SKU.

Change-Id: I8afdf0529016e9cdbe72da8e57d7f35194cf9026
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:47:21 +05:30
Priyanka Gujjula
e710c6f974 video: driver: diwali: Configure hbb value
Configure hbb value as '14' for lp4
ddr variant.

Change-Id: Id3fa3028f38dabb81d1b1fc5b117c6d10e4d45b5
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 15:44:48 +05:30
Priyanka Gujjula
c3440c6ade video: driver: Add support for diwali variant
Add support for diwali variants.

Change-Id: Idf322e674818642a9c886fe8707e5ff8f64c4db5
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-11-03 07:39:48 +05:30
Priyanka Gujjula
e786da48eb video: driver: Use max fps from inst caps
Use maximum framerate from published
instance caps to make it platform
agnostic.

Change-Id: I319768e722774969287abb9e782ddbece7593ff9
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-10-25 21:38:58 +05:30
Priyanka Gujjula
4970193ad1 video-driver: add mmrm query support
[1] Disable MMRM if platform feature
    does not support.
[2] Query for scaling support from
    mmrm driver and enable/disable
    based on queried support
    accordingly.

Change-Id: I34cf9a9e150b0823828507e3f5d680aae6eb14d4
Signed-off-by: Priyanka Gujjula <quic_pgujjula@quicinc.com>
2021-10-21 23:16:13 +05:30
qctecmdr
b1c38f2133 Merge "video: driver: add all intra encoding support" 2021-10-06 13:26:49 -07:00
Darshana Patil
fc6c35e8de video: driver: add all intra encoding support
add ALL_INTRA database entry and its dependencies.
implement adjust functions.

Change-Id: Ib4522666b6c2ef7dcb5adf9110a2fd5d2daf4654
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-10-04 10:40:32 -07:00
Akshata Sahukar
6df2a1bfcd video: driver: enable lossless encoding via debuf fs property
enable lossless encoding via debuf fs property "lossless_encoding".

Change-Id: Ic7f7341ecf3ad07e55434339a0c5789334bf7929
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-10-01 11:54:06 -07:00
Akshata Sahukar
98dfab8584 video: driver: prioritize MIN_QUALITY adjustment over BLUR_TYPES
MIN_QUALITY is parent of BLUR_TYPES, hence prioritize MIN_QUALITY
control adjustment over BLUR_TYPES.

Change-Id: I8498760d7b3ecd1546c2be43d2ae945781d4a84d
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-09-17 14:57:57 -07:00
Gaviraju Doddabettahalli Bettegowda
9110a87846 video: driver: Update msm_vidc statistics delay from command-line
Currently, statistics is printing for every 2 second
And these delay is hardcoded.
So changes added to update the statistics delay from the command-line.

- adb shell "echo 200 > /d/msm_vidc/core/stats_delay_ms"
- adb shell cat /d/msm_vidc/core/stats_delay_ms

Use above command to update & read statistics delay.

Change-Id: I523a870203ee460d1dba8208b798f28253407e73
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <gdoddabe@codeaurora.org>
2021-09-09 11:24:23 +05:30
qctecmdr
404bc1d0cb Merge "video: driver: allow two 8k sessions support" 2021-08-27 10:01:26 -07:00
Darshana Patil
e17abd45c1 video: driver: limit max number of sessions based on resolution
add checks to limit max number of sessions supported based on
resolution.
max number of 720P sessions: 16
max number of 1080P sessions: 8
max number of 4K sessions: 4
max number of 8K sessions: 2

Change-Id: I2a784a0d28ba050923bdc7f42a21ee9801d01d86
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-26 15:51:34 -07:00
Darshana Patil
b965b9307f video: driver: allow two 8k sessions support
Allow one 8k + one 4k realtime sessions.
Maximum allow two 8K sessions which includes RT and NRT sessions.

Change-Id: I68acfc4942c5c930bed7d9584cd82f2667010136
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-26 15:51:23 -07:00
Manikanta Kanamarlapudi
6ace5b4227 msm: vidc: update capabilities as per PRD
update profile/level capabilities as per
PRD.

Change-Id: If1c4ff304a5febaeb3a567416d7c66eaca0f47c4
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2021-08-16 11:16:30 +05:30
Darshana Patil
05270719fb video: driver: add max num reorder frames support
add support for HFI_PROP_MAX_NUM_REORDER_FRAMES.
add ctrl for this metadata for avc and hevc.

Change-Id: I9a7b95f130e58f810255aff23e9b605304841072
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-09 11:39:57 -07:00
Govindaraj Rajagopal
5c297b7d26 video: driver: print buffer statistics once at every sec
- Added change to print buffer statistics like total and avg
etb, ebd, ftb, fbd counts, client set fps, actual fps,
bitrate values in 1 sec window and these stats currently
configured to print at every 1sec boundary.
- Convert meta buffer prints to low level logs.

Change-Id: I1c93eea90fbd5460eb51bbf133c513157003d51e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-07-22 19:13:19 +05:30
Akshata Sahukar
c533b92361 video: driver: Disable RGBA/RGBAC encoder
Since CTSEncodeDecode test cannot handle BT 709LR,
disabled HW RGBA encoding.

Change-Id: Ic451d8444a2ec502ded7fba008233b2e288826bf
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-07-19 14:15:04 -07:00
Akshata Sahukar
942f406c42 video: driver: Cap chroma qp offset value other than -12 as 0
Cap chroma qp offset value other than -12 as 0.

Change-Id: I0ca9c4844ab835a9365e695f38deff90768191aa
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-07-15 10:23:02 -07:00
Vikash Garodia
3b67d6b2f9 driver: video: Reset sequence change request property only during psc handling
Sequence change property would configure firmware to generate psc at every
key frame. This property is configured based on low latency settings from
the client.
For cases, when client sets low latency from 1 to 0, the hardware would
continue to run in direct mode (low latency mode). Since the sequence
change property gets disabled, there would not be psc from firmware to
change the mode to 2 stage. Hence the sequence change property to be reset
only during psc handling.

Change-Id: Ie8e17e44c921f036763f6f390397d4d812120e23
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-07-01 16:54:30 +05:30
qctecmdr
0df7a874b9 Merge "video: driver: Add support for enc auto framerate" 2021-06-18 10:32:00 -07:00
Darshana Patil
bd41af8c21 video: driver: handle dynamic qp setting
- make B and P frame QP controls as dynamic.
- enable I/P/B QP to fw as and when these
  controls are set to the driver.
- remove HEIC qp support.

Change-Id: I7f45ab0bda75df8128bbbdfcebe66c2cae208b06
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-06-17 18:11:55 -07:00
Priyanka Gujjula
e61b55879b video: driver: Add support for enc auto framerate
1. Calculate framerate based on buffer timestamp
2. If framerate changed and stable for 2 frames,
   update it to firmware and in driver internally.

Change-Id: I7feda86dec8fcfc1dff6defac8c15a97c1b8393e
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2021-06-17 22:54:34 +05:30
Akshata Sahukar
36a4971392 video: driver: Add enc vbr min quality restrictions
Do not support vbr min quality with below configs:
- HEVC 10bit
- Bitstream fps > 60
- ROI enabled/support
- HP encoding
- External Blur
- Resolution beyond 1080P.

Change-Id: I5e4a420abdd0c6fee4342c3c097684ef69bb0597
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-06-15 18:23:36 -07:00
qctecmdr
71bb59790c Merge "video: driver: Add encoder complexity to decide power mode" 2021-06-11 01:21:50 -07:00
Akshata Sahukar
973d1f0b38 video: driver: allow adaptive/external blur along with rotation/flip
[1] Allow adaptive/external blur along with rotation/flip.
[2] Update HFI_BUFFER_VPSS_ENC macro to align with CL: 30984523.

Change-Id: Ibca9f273da4a8204f586e952aeb9b2e78b5ff941
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-06-10 11:58:05 -07:00
Vikash Garodia
72699f7278 video: driver: Add encoder complexity to decide power mode
Client can choose to run an encode session to acheive maximum
performance rather than maximum quality.
Add the handling to configure video core accordingly for the
configured video session.
Such configuration is only applicable for non-realtime session.

Change-Id: Ife290b377c844e5b1d3be93b2509c787f8e05c59
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-06-10 05:43:00 -07:00
Govindaraj Rajagopal
2c0d2faefa video: driver: limit vp9 max spec to 4K@60
Added change to limit VP9 decode max spec is upto 4K@60.

Change-Id: I5939a8cf6cd227d2cced5adb3628b36493b7b1fc
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-09 21:07:54 +05:30
Darshana Patil
87452bbf17 video: driver: encoder default level as HFI_LEVEL_NONE
set encoder default level as HFI_LEVEL_NONE

Change-Id: Ibe566a50c9c09a337fdf75f80bd3c37c7a5d0d4e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-06-08 17:21:08 -07:00
qctecmdr
8818dd8215 Merge "video: driver: Set secure mode in encoder" 2021-06-07 22:18:03 -07:00
Chinmay Sawarkar
83f9b26441 video: driver: Set secure mode in encoder
Enable HFI_PROP_SECURE when secure session is enabled
in encoder. Same behaviour as Decoder.

Change-Id: I5edfe3d735fda8edea9e491ae17546945b4431a1
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2021-06-07 13:45:43 -07:00
Mihir Ganu
3a7632ca4d video: driver: Update session admission and work modes
- To determine if session is admissible, check only the
  decoder input width/height and encoder crop width/height.
- Update session MBPF Calculations.
- Amend work mode setting to consider decoder input width,
  height and GOP size.

Change-Id: If4053c222de2a55ad5b85a8ab96c12c47b145aa3
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-06-04 17:08:23 -07:00
Darshana Patil
5b276d076e video: driver: encoder fix for frame qp and level
- misc fix for setting frame qp, min qp, max qp.
- seperate LEVEL database entry for encoder and
  decoder as max level supported by encoder is 6_0,
  but decoder supports upto 6_2.

Change-Id: Ia0a0a717e73e55a8b6933421e3eb55c3831524b2
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-06-03 13:57:49 -07:00
Govindaraj Rajagopal
a33041f799 video: driver: add scaling checks for encode session
Encoder supports downscale with scaling ratio upto 1/8 of width
and 1/8 of height. So added necessary scaling checks at streamon.

Change-Id: I3a29b43c79cf4e693ba2c0d9f98ec24410d50fbd
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-06-02 11:26:12 +05:30
Darshana Patil
65636fd2ad Revert "video: driver: always caliberate gop size"
This reverts commit b35579ad54.

Change-Id: I5ba0b244f53068ae6f0d3225b278e1ddafc360c5
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-06-01 11:12:02 -07:00
Govindaraj Rajagopal
b2e9fada31 video: driver: restrict image load to 16K x 16K
Add strict check in msm_vidc_check_mbpf_supported() to
reject image session, if total image load exceeds 16K.
Added msm_vidc_print_insts_info() support to print all
running instance info, if new session is rejected due
to mbpf/mbps checks.

Change-Id: I98bab985fcf4f4d20c6f263c48e0c701ec86ab6f
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-31 17:11:46 +05:30
Vikash Garodia
c1bf1d2bc9 video: driver: Set proper HFI during low latency for decoder
Decoder supports dynamic low latency. When client configures the
video session in low latency mode, driver would configure the
firmware such that HFI_CMD_SETTINGS_CHANGE is triggerred on
sync frame boundary.

Change-Id: Ie70eaaeb8ad420db926f0d99f77723476deee400
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-05-28 21:38:05 +05:30
qctecmdr
337953d000 Merge "video: driver: Add missing H264 levels" 2021-05-26 19:50:13 -07:00
Akshata Sahukar
6e9150c232 video: driver: Enable low latency mode for CBR rc type
Enable low latency mode for CBR rc type.

Change-Id: I80230e5d2acab94820b1401ffa6e6fe372398397
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-26 13:42:17 -07:00
Akshata Sahukar
b35579ad54 video: driver: always caliberate gop size
[1] Irrespective of layer encoding type P or B, always
    caliberate gop size to have gop size multiple
    of sub gop size.
[2] Do not cap enh layer count value to max 1 value when
    cvp is disabled.

Change-Id: I10f602202ce007707c0fee76d9f847db70798754
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-26 11:47:40 -07:00
Mihir Ganu
9c7b878359 video: driver: Add missing H264 levels
Add the missing H264 levels supported currently.

Change-Id: Iea071aef46ea6be6f6f10c3a799b7f8aba26c08f
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2021-05-26 11:31:10 -07:00
Akshata Sahukar
079b161c66 video: driver: modify VBV delay min value to 200
min VBV delay value supported is changed from 100 to 200
in firmware. Pick up the change in driver.

Change-Id: I200bdd4c35aa463d64baee0fa2ca330dc1eb0ad2
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-05-25 19:02:29 -07:00
qctecmdr
a4038a8565 Merge "video: driver: fix core lock acquire and release sequence" 2021-05-20 18:12:48 -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
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
qctecmdr
cdda26a16e Merge "video: driver: define hfi setter for configuring pipe" 2021-05-14 16:18:08 -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