Commit Graph

31 Commits

Author SHA1 Message Date
Megha Byahatti
9df60c1fa4 video: driver: Add pipes scalability for multi slice count
- Add pipes check to support different Tile sizes based on
number of VPP Pipes for HFI_IRIS3_ENC_TILE_SIZE_INFO,
HFI_IRIS3_ENC_MB_BASED_MULTI_SLICE_COUNT.

HFI review done with ccb id 3284017.

Change-Id: I2e403ac712143635fd9ff5167260e23d6b48c482
Signed-off-by: Megha Byahatti <quic_mbyahatt@quicinc.com>
2023-12-20 19:41:25 +05:30
Jiajia Cong
d9fe02d49a video: driver: fix roi metadata size calculation
lcu_size shouldn't be changed by shift op, it is still
needed in alignment calculation.

Change-Id: I3c0ebfaee84389926ba3e191d901006065598182
Signed-off-by: Jiajia Cong <quic_jcong@quicinc.com>
2023-08-07 22:01:06 -07:00
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
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
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
Akshata Sahukar
b6fba340c3 video: driver: fix hfi_buffer_iris3.h premerge failures
remove macro brackets in hfi_buffer_iris3.h to
fix premerge failures

Change-Id: I30f2cb656376cefc632cc3fd64dc979a903bfdc0
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-06-09 19:19:26 -07:00
Anshul Agarwal
65d28b3cab video: driver: fix some checker err
Fix some checker err.

Change-Id: I6704727abf49c8c55ac9c213dec180c93928961f
Signed-off-by: Anshul Agarwal <quic_anshagar@quicinc.com>
2023-06-08 12:00:19 +05:30
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
Ankush Mitra
400a782851 video: driver: add space and move "{" to previous line
This change will fix some checker err.

Change-Id: I93da24e9b54bb1d5f6145b438858a977b06ca09c
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-06-04 21:08:33 +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
a04f985cda video: driver: move "{" to the previous line
This will fix some static code checker err.

Change-Id: I664e96dd2d65f694c3f2523e1f4aeb08a40f660a
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-30 22:21:18 +05:30
Ankush Mitra
e3415ddbef video: driver: changing "foo* bar" to "foo *bar"
This change will resolve some of the static code
checker err.

Change-Id: I62edcbc8740dd932f5662b0bad1548374a0c9188
Signed-off-by: Ankush Mitra <quic_ankumitr@quicinc.com>
2023-05-30 22:14:30 +05:30
Govindaraj Rajagopal
c3c85e9653 video: driver: remove config dependencies
remove all conditional compilation in video driver.
With this change, all files willbe always compiled
and will be available in final kernel object file.

Change-Id: I9843c246e23bd1ee4fb8918e5cfa840e2defd432
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2023-02-21 14:33:41 +05:30
Chinmay Sawarkar
6e414ca7a7 video: driver: kalama power calculations
New bandwidth and frequency calculation functions
for kalama.

Change-Id: Iaca0be832c42e00bb7404f7cfbac5bbf03427144
Signed-off-by: Ashish Patil <quic_ashpat@quicinc.com>
2023-02-16 20:08:14 -08:00
Darshana Patil
ea34534af0 video: driver: update copyright markings to 2023
update copyright markings to 2023 in all files.

Change-Id: I6842d56c4a8fff6a7a93d0c1d4bc049041297b02
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-13 14:58:17 -08:00
Mahesh Kumar Sharma
7d00efc5dc video: driver: fix encoder output buffer size requirement
For some resolutions memory requirement was coming as 4 * yuv_size
and for CQ/RC_OFF it was 8 * yuv_size. With this fix it will be 
max 2 * yuv_size (+ 25% for 10 bit). Fix typo in 720P resolution check.

Change-Id: Ib5908f1eef8dca92dac46c5c195cd47ba28a4df4
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-08-22 16:00:50 -07:00
Mihir Ganu
1e87ceec2b video: driver: Introduce a property to set COMV bufcount
Certain codecs/use cases require larger COMV buffer sizes to achieve
performance. Introduce a property to set COMV bufcount and calculate
COMV buffer size based on the bufcount.

Change-Id: Ib0ed8afe77708dc453cbcc121bcd8606db637152
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:19:20 -07:00
Sachu George
b79ec844f2 video-driver: Updating H264 Decoder CMD_BUF size calculation.
Internal Buffer(CMD_BUF) size calculation is changed from (3 * 4) to 48
in firmware for H264 decoder. Aligning with same calculation in driver.

Change-Id: I974bca7d2e128cee24bf237b6f9ea606f386031d
2022-08-01 16:23:49 -07:00
Mihir Ganu
ec484c856b video: driver: Optimize HEVC Bin buffer allocation
Optimize HEVC Bin buffer allocation by allocating 25% additional
bitstream buffer size for 10 bit HEVC usecase and avoiding the
extra memory allocation for 8 bit usecases.

Change-Id: Iebbedf43e80fad852807349cbe7f70cf7a632a73
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-06-02 10:59:49 -07:00
Zhongbo Shi
f781c619a9 video-driver: add to support DolbyVision metadata
1. add DolbyVision metadata cap and V4L2 id;
2. Increase decoder persist buffer size;
3. Increase decoder output meta buffer size;
4. Increase encoder input meta buffer size;
5. Parse buffer overflow flag and set buffer flag
   accordingly;

Change-Id: I8fa5e89068dd479033d28f627e585edc3a1c58bb
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
2022-06-01 16:29:30 +08:00
Mihir Ganu
444e7763ee video: driver: Optimize encoder bin buffer size
Reduce bin buffer size to detect buffer overflows in first
stage, which allows frame to be re-encoded with a different QP.

Change-Id: Ifaa5f744491ba35ceee164afeae7d9de90f81e18
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-05-25 16:30:18 -07:00
Chandrakant I Viraktamath
308499361d video: driver: Add support for slice encode delivery
Add support to enable slice encode delivery for
HEVC and AVC codec. Basically in this mode, each
encoded slice is given as a separate FBD to the client.

Change-Id: Ia30fde9abaf2b38fb486113807fbb7f19110225c
Signed-off-by: Chandrakant I Viraktamath <quic_civirakt@quicinc.com>
2022-04-29 22:18:06 +05:30
qctecmdr
8c00483b2c Merge "video: driver: decouple min quality, CAC and quality boost" 2022-03-30 10:28:20 -07:00
Mihir Ganu
0acf5e0082 video: driver: Increase persist buffer size for AV1 metadata
Increase AV1 persist buffer size to accommodate AV1 HDR and
other metadata.

Change-Id: Ib29ed9eb18e39e6f711c5bed7a67366161bf053b
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-03-24 08:04:25 -07:00
Mahesh Kumar Sharma
5ae6ad83d2 video: driver: decouple min quality, CAC and quality boost
Remove dependency between min quality, CAC and quality boost.
Accept quality boost value from client and if client did not
set then enable max quality boost upto 4k@60fps and disable after that.

Change-Id: I0685065b8dee8754aff2cf5f176a2f40e9e080dd
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-03-23 19:20:20 -07:00
Mihir Ganu
96358cee7d video: driver: Add support for AV1D IBC feature
Add support for AV1D Intra-Block Copy (IBC) feature. This requires a
dedicated internal buffer (HFI_BUFFER_IBC_AV1D), which was previously
part of LINE buffer. A new internal buffer type called
HFI_BUFFER_PARTIAL_DATA is introduced, and this buffer type holds
HFI_BUFFER_IBC_AV1D for AV1D. HFI_BUFFER_PARTIAL_DATA is mapped to
NON_SECURE_PIXEL context bank for non-secure and to SECURE_PIXEL
context bank for secure use case.

Change-Id: If7ae22495f9981f275d54acc342c25ccdfc0c7b9
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-03-16 16:48:08 -07:00
Mahesh Kumar Sharma
e3f2139586 video: driver: decrease heap usage for 24 session support on IRIS3
Originally h26xd and vp9 display buffer was allocated from FW heap.
In order to decrease heap usage for 24 session support on IRIS3,
FW has moved display buffer from FW heap to persist buffer.
Adding this support in driver.

Change-Id: If865748e7c0df5fecd26905f7ef343f465f69967
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-02-28 10:37:41 -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
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
Mihir Ganu
1c5f469b71 video: driver: Add HFI changes for AV1 Decoder
Add the required codec properties and HFI definitions to enable AV1D.

Change-Id: Ib098ed17f8b8e1fe9403f966a2dab97a3c9f96de
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2021-12-02 12:44:12 -08:00
Mihir Ganu
9456cc40fb video: driver: Add support for kalama/iris3 platform
Add the required config and platform files to enable
kalama platform with iris3 VPU.

Change-Id: Ia65d2212b946d0d37fc99e30e25fe408882bdec3
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2021-11-18 22:56:07 -08:00