Commit Graph

670 Commits

Author SHA1 Message Date
Govindaraj Rajagopal
36d91e66e0 msm: vidc: set chroma_qp_offset only for client set cases
Set chroma_qp_offset hfi to firmware only for client set cases.
Supported value: 0 & -12

If hfi not set, firmware proceeds with its own default value.
10-bit: default: 0
8-bit : default: Adaptive chroma_qp

Change-Id: I40262aae87b2a385c6cd7d60faa19b6adfe8b151
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-08-12 18:56:04 +05:30
Govindaraj Rajagopal
be77d74ff1 msm: vidc: update vsp_cycle entries for shima
Updated VSP base cycle entries for Shima to inline
with vperf.

Change-Id: I26e7a521434765b97cc1a508b714652d14adf2aa
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-08-11 20:21:52 +05:30
qctecmdr
c1ad7b0054 Merge "msm: vidc: revise timestamp data type to s64" 2020-08-10 16:04:35 -07:00
Shi Zhongbo
b1a132ad57 msm: vidc: revise timestamp data type to s64
Revise internal timestamp data type from u64
to s64 in case of negative timestamps.

Change-Id: Ib026d504a08ce5ac67d1d962b671c37637761321
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-08-10 13:05:17 -07:00
Mihir Ganu
4be4e326bf msm: vidc: Fix incorrect VP9 scratch buffer calculation
Fix the incorrect VP9 decoder scratch buffer calculation
and match it with firmware definition of scratch buffer size.

Change-Id: Ie901082760d675153d1eb898cbe665cc6ad59bd1
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-08-10 13:04:57 -07:00
Shi Zhongbo
460c45b72a msm: vidc: fix time stamp store after EOS for decoders
1. Add a new EOS flag to denote EOS pending status;
2. Set all existed time stamps with EOS flag as true
   after inserting EOS time stamp;
3. Ignore time stamp sorting to buffers with EOS pending
   flag as true;

Change-Id: I72b041150973e2a28d1039c5f906fdb222a86081
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-08-10 13:04:38 -07:00
qctecmdr
10fbc8019e Merge "msm: vidc: fix less_or_equal resolution check" 2020-08-10 09:10:00 -07:00
Govindaraj Rajagopal
5e7df6ab91 msm: vidc: Deprecate Mpeg2 secure decode support
Remove secure deocde support for Mpeg2 codec.

Change-Id: Ieec132b0c86aa6be3e382c091acdf734d1e1c31e
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-08-10 14:03:22 +05:30
Rakshitha Shakamuri
d36983b6f6 Revert "msm: vidc: Update timer API"
This reverts commit a03df1c593.

Change-Id: I65a664bfcb25a534fc71be238dae8560cea3fd6c
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
2020-08-08 21:58:35 -07:00
qctecmdr
1f1189b278 Merge "msm: vidc: Update timer API" 2020-08-05 12:16:50 -07:00
Govindaraj Rajagopal
cd778f6988 msm: vidc: always read fuse value irrespective of sku-index
[1] Only one vidc node is maintained, so "sku-index" entry is
    removed in dtsi.
[2] In video driver, always read fuse value if efuse_data entry
    is populated

Change-Id: I86b8c38f1e71491678b54a11783292e1281f90d3
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-08-04 23:59:55 -07:00
qctecmdr
a742fc9e9a Merge "msm: vidc: Update DCVS thresholds for sufficient seq change" 2020-08-03 17:44:15 -07:00
Chinmay Sawarkar
912bb52fc1 msm: vidc: Update DCVS thresholds for sufficient seq change
1. Sufficient event should use fw min count for DCVS.
2. Input buffer count calculation is independent of Realtime/Non-Realtime.
3. Batching should be disabled if it is non-realtime session.
4. Removed misleading logs and changed buffer count logs to
convey the correct meaning.

Change-Id: Ieba6fc022549f5e767a833410ead5aa7fb52e14b
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2020-08-03 11:12:44 -07:00
Shi Zhongbo
21cba5ad49 msm: vidc: fix time stamp store and fetch
Fix to skip time stamp store and fetch for buffers
with codec config flag.

Change-Id: I867db519c45751ef2dadef5a323c7a4ad2741385
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-08-03 16:23:43 +08:00
Mihir Ganu
a03df1c593 msm: vidc: Update timer API
Replace the obsolete do_gettimeofday API with ktime API.

Change-Id: Id105d2c531f8b9aa3315800ab3312bc6a619b792
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-08-02 20:14:27 -07:00
qctecmdr
9fa91852ca Merge "msm: vidc: Copy hfi buf req to hal buf req" 2020-08-01 14:09:39 -07:00
qctecmdr
d2eb76acdc Merge "msm: vidc: check for cvp support" 2020-08-01 14:09:39 -07:00
Qiwei Liu
e05aff730d msm: vidc: fix less_or_equal resolution check
For less_or_equal check, need to meet all the
conditions when return true, not only one condition.

Change-Id: Icf103721596cdcb6a4a90e1def67f3151140db85
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-07-29 11:35:59 +08:00
Manikanta Kanamarlapudi
7ae805aa63 msm: vidc: check for cvp support
check for cvp support before any cvp
related operation.

CRs-Fixed: 2741030
Change-Id: I7a457608321f0aa5b93b6f62d7ceb76c0b00fb93
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-07-28 11:55:57 +05:30
Manikanta Kanamarlapudi
e2a2a4a190 msm: vidc: Copy hfi buf req to hal buf req
copy hfi buf req to hal buf req element by
element. Due to change in structure sizes,
memcpy may lead to memory corruption.

CRs-Fixed: 2741030
Change-Id: Ie4a3aeba7cac78af99355eb766a5ead755cf654b
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-07-28 00:25:43 +05:30
qctecmdr
7fc1d99c4b Merge "msm: vidc: disable DCVS for camera encode batching" 2020-07-26 12:20:17 -07:00
Mihir Ganu
f8eaa17bf0 msm: vidc: Enable 8-bit chroma QP offset support
Enable support for 8-bit chroma QP offset.

Change-Id: I296f7a5669439c21d9727b1b731cfce14cbcd529
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-07-24 16:14:08 -07:00
Priyanka Gujjula
4f287b68ad msm: vidc: disable DCVS for camera encode batching
Disable DCVS for encode usecases if the control
V4L2_CID_MPEG_VIDC_SUPERFRAME is enabled.

Change-Id: I72a4bebbd79c42988867572d69f6833629054cba
2020-07-24 12:48:34 +05:30
Mihir Ganu
fbc3b10e06 msm: vidc: Update power sequence to match Lahaina HPG steps
Update power sequence by removing all resets during power down.

Change-Id: I88610e9c71a91a32332626bf6da88f0f64ed1c65
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
(cherry picked from commit 5cffae52eacaaf6b0698de06c11397339d904f35)
2020-07-21 09:35:17 -07:00
Amit Shekhar
59ca4e2365 msm: vidc: Fix p-frame count
Fix p-frame count during intra-period setting for HEVC session without
layer encoding.

Change-Id: I796cac16fbb0538012f9fc97262e1877285e1803
CRs-Fixed: 2735233
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2020-07-20 17:14:08 -07:00
Akshata Sahukar
1fd9cfcf2e msm: vidc: Fix to add correct superframe buffer timestamps
Avoid adapting driver framerate to camera qbuf rate in superframe
enabled case to avoid setting incorrect hfr buffer timestamps.

Change-Id: I354e7517b9aeef7f1b01f33089b81bf7122e12e2
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-07-20 10:32:32 -07:00
qctecmdr
b14f4c13bc Merge "msm: vidc: Check validity of a timestamp before inserting it to list" 2020-07-17 18:24:53 -07:00
Mihir Ganu
6b73bf247d msm: vidc: Check validity of a timestamp before inserting it to list
In steady state, the first entry in the linked list of timestamps is
always invalid. When adding a new timestamp entry, adding the
timestamp which is a duplicate of first entry leads to duplicate
linked list nodes. To avoid this, check for validity of an entry
before inserting duplicates to the linked list.

Change-Id: I47dd8fb06b9e4eb307605df6b0e2b352a2e263fe
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-07-17 11:31:48 -07:00
qctecmdr
fdffed7083 Merge "msm: vidc: fix sub_frame flag when fetch ts" 2020-07-17 11:31:01 -07:00
qctecmdr
5a51ddcaba Merge "msm: vidc: Fix static analysis issues" 2020-07-17 11:31:01 -07:00
Qiwei Liu
b226cd01b3 msm: vidc: fix sub_frame flag when fetch ts
Need to check against v4l2 flag instead of
hfi flag.

Change-Id: Ib15974b1cc2ee23861b47425ebe21d25ff6dc694
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-07-16 18:30:43 +08:00
Amit Shekhar
209b06e403 msm: vidc: Fix static analysis issues
Fix uninitialized access issue with a few variables.

Change-Id: Ib79186e0b837ce1d020546c8a3436745c5d50532
CRs-Fixed: 2729628
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2020-07-15 22:58:11 -07:00
Amit Shekhar
911dc56174 msm: vidc: Add support for Hier-B
Add support for Hier-B.

Change-Id: I2bd6f1b6525224795500d8a260de3d78a78d2163
CRs-Fixed: 2637948
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
2020-07-15 22:55:27 -07:00
Vikash Garodia
f171a0918b msm: vidc: Update perf mode spec for shima
As per the recommended configuration, the max spec
for running an encode session in high quality is
1080p@30. Updating the same.

Change-Id: I649790bbf8a3c2264bfe6c36769717df2d2f2a55
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-07-16 00:14:31 +05:30
qctecmdr
d80c41100d Merge "msm: vidc: use clock-rates from static table instead from dtsi" 2020-07-10 04:00:57 -07:00
Maheshwar Ajja
f9f0304009 msm: vidc: use v4l2 standard h264 profile and levels
Startdard v4l2 uapi header introduced h264 profile
and levels and hence remove internal profile and
levels to resolve compilation issues.

Change-Id: I9e077066f9983b9a9e1b089457c060fd83d86860
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2020-07-09 13:08:40 -07:00
Govindaraj Rajagopal
9f8094a79d msm: vidc: use clock-rates from static table instead from dtsi
Currently video has multiple nodes in dtsi to support/limit
sw capabilities via sku-index. Mostly restriction comes in
terms of allowed-clock-rate. So created static entries in
platform.c to configure clocks based on plaform fuse value.
So that single vidc dtsi node is sufficient and there will
not be a probe defer/failure during bootup.

For ex. Shima supports 3 sku's.
AB - max 364.8 MHz - sku_version(1) - picked from dtsi(default sku)
AA - max 201.6 MHz - sku_version(2) - clock_data_v2
AC - max 444 MHz   - sku_version(0) - clock_data_v0(no fuse)

Single vidc node - "aa00000.qcom,vidc"

Change-Id: I870f1e3a24c0cbfdd92c537d3e40c4cf5400326d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-07-08 20:09:15 +05:30
Manikanta Kanamarlapudi
8fa3a6f8a4 msm: vidc: Update min resolution capability
Update min resolution support from 128x128
to 96x96 for decoder.

CRs-Fixed: 2724675
Change-Id: I230d3c5fbdc1d476a634160de30b20e207a5f315
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-07-04 10:16:42 +05:30
Govindaraj Rajagopal
7b3b1524c4 msm: vidc: fix deadlock between queue and flush buffer handling
qbuf ioctl acquired bufq[port].lock in one thread and flush
call acquired registeredbufs.lock in another thread. So
thread-1 is waiting for registeredbufs.lock & thread-2 is
waiting for bufq[port].lock i.e leading to deadlock. So
added change to avoid above mentioned deadlock.

Change-Id: Ie21984fdb562ca7a09f801f036f3a78429ceab94
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-30 09:46:54 +05:30
Priyanka Gujjula
bc901f21ba msm: vidc: Align per pipe usage with DMA alignment
Currently, total buffer size across pipes is
aligned with 256. It should be per pipe usage
aligned with 256.

Change-Id: I389f2a0539bb04b9d038fe44122da70690c43466
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-06-25 16:42:54 +05:30
qctecmdr
8da86217fe Merge "msm: vidc: configure work mode for 720p" 2020-06-24 22:18:39 -07:00
qctecmdr
0867d447c9 Merge "msm: vidc: Ignore thumbnail session load" 2020-06-23 10:23:45 -07:00
qctecmdr
a8e346cb9b Merge "msm: vidc: increase h265 decoder max slice count" 2020-06-18 21:53:34 -07:00
qctecmdr
240140e711 Merge "msm: vidc: Delay force firmware unload by 1sec" 2020-06-18 21:53:34 -07:00
qctecmdr
2265fed004 Merge "msm: vidc: Fix KW error" 2020-06-18 03:39:31 -07:00
Rakshitha Shakamuri
53de1be852 msm: vidc: Fix KW error
Fixing KW error with ID: 72859, 72860, 72861, 72862, 111827.

Change-Id: Ia37cb77b27689c2064e0c4d5138d4f9d95c84455
Signed-off-by: Rakshitha Shakamuri <rshakamu@codeaurora.org>
2020-06-17 15:26:23 -07:00
Akshata Sahukar
8dc245dc59 msm: vidc: Delay force firmware unload by 1sec
Video instances might still be alive at the time firmware unload
handler is called. As a result, firmware unload request is not propagated
to firmware. Add place holder to increase default delay for this request
to 1sec to wait until all instances are closed and successfully unload
firmware.

Change-Id: Id1e7455d40c1808690148046f9a839f1b79574ae
2020-06-17 10:30:41 -07:00
Qiwei Liu
d0d60bbc2a msm: vidc: increase h265 decoder max slice count
For 8K video, bse-vpp delay is 6, and one frame may
have maximum 600 slices according to h265 spec, so
need to increase max slice count to 3600 to allocate
large working buffer size for worst case.

Change-Id: Iab035b4cbe8c0121bf1e63d4f3e18c9436a16f5d
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-06-17 15:20:06 +08:00
qctecmdr
55e747f481 Merge "msm: vidc: update hbb bit based on ddr type for shima" 2020-06-15 12:52:35 -07:00
qctecmdr
13b88d4af2 Merge "msm: vidc: Bail_out missing platform_data cases during probe" 2020-06-15 12:52:35 -07:00