Commit Graph

481 Commits

Author SHA1 Message Date
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
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
Govindaraj Rajagopal
96620e5dff msm: vidc: update hbb bit based on ddr type for shima
Update highest_bank_bit for shima based on ddr type.
LPDDR5 - 15, LPDDR4 - 14.

Change-Id: I04d404da18fe9acea4564e4cefe89e3293f5ae13
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-15 11:34:41 +05:30
Govindaraj Rajagopal
588b71a376 msm: vidc: update workroute settings for shima
use num_vpp_pipes from platform_data to configure
workroute.

Change-Id: I5fea0d381402f9877fdb5d0df179bc0857016c56
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-15 11:34:06 +05:30
Govindaraj Rajagopal
aa1e0df29b msm: vidc: add fuse support for shima
shima supports 3 target variants.

[1] fuse IRIS_MULTIPIPE_DISABLE - max 4K@30
[2] fuse IRIS_4K60_FMAX_LIMIT_EFUSE - max 4K@60
[3] no fuse blown - max 4K@120 decode

Change-Id: I2a42fd80f067202b4b9ac62a0c6d548fcb2705c8
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-15 11:32:59 +05:30
Govindaraj Rajagopal
d9dcb1e6a3 msm: vidc: add shima platform configs
Add configurations specific to shima platform as per
H/W and spec.
Eg: Codec data, performance configs, fuse etc.

Change-Id: I4918af58dcafba3aaafa5eeaaaec256f8cbdca37
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-15 11:26:13 +05:30
Mihir Ganu
dfe241edf2 msm: vidc: Increase reset delay to 400us
Increase the delay between reset assert and deassert to a minimum of
400us, as required for Lahaina power sequence.

Change-Id: I8fb77b0746a7cc68ad3925b2e22b402cd0ff8070
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
2020-06-12 13:30:10 -07:00
qctecmdr
7c0902f1a1 Merge "msm: vidc: Add platform capabilities for holi" 2020-06-11 00:34:34 -07:00
Priyanka Gujjula
e98028956e msm: vidc: Ignore thumbnail session load
Thumbnail sessions are considered to be non realtime
sessions. Hence ignore the thumbnail sessions load on
device while calculating the load and mark thumbnail
sessions as perf session.

Change-Id: Ifa89c2f670fa631b6805a5d796a04e07e294ca4c
Signed-off-by: Priyanka Gujjula <pgujjula@codeaurora.org>
2020-06-10 19:59:30 +05:30
qctecmdr
c3021e92a6 Merge "msm: vidc: Configure video context bank for best fit" 2020-06-09 17:16:44 -07:00
Manikanta Kanamarlapudi
5640d13718 msm: vidc: Update min resolution capability
Update min resolution support from 128x128
to 96x96 for decoder

Change-Id: Ib6b09af6c00323b67a1f50887d80e59148e6cfd8
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-06-09 03:40:02 -07:00
Govindaraj Rajagopal
b62727af64 msm: vidc: Bail_out missing platform_data cases during probe
During msm_vidc_probe, core->platform_data will be NULL, if
there is no match with compatible string in the of_dt table.
In msm_decide_dt_node sku-index check will be by passed due
to default value(0) i.e leading to NULL ptr dereference
exception in msm_vidc_init_core_clk_ops. So added check to
avoid subsequent calls, if core->platform_data is NULL.

Change-Id: I335a2836b2e34e79dcb8743816205d23f798617d
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2020-06-09 13:03:55 +05:30
qctecmdr
1583bee5f8 Merge "msm: vdec: configure latency mode for decode session" 2020-06-07 13:23:29 -07:00
Vikash Garodia
0db29bbac3 msm: vidc: Configure video context bank for best fit
With best fit configuration, the probability of getting
a mapping for video buffer increases even when the system
is fragmented.

Change-Id: I8689447ce1341fd1189b543eb9fb6a2e03edcc94
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-06-05 02:22:35 -07:00
Manikanta Kanamarlapudi
77ffbca8eb msm: vidc: Add platform capabilities for holi
Add platform capabilities for holi target.

CRs-Fixed: 2684474
Change-Id: I15560796a4297632d58556f2027494d26e0855c5
Signed-off-by: Manikanta Kanamarlapudi <kmanikan@codeaurora.org>
2020-06-05 00:17:32 -07:00
Vikash Garodia
5de4c1dce4 msm: vidc: configure work mode for 720p
For 720p or lower, video hardware can run only in
a specific work mode. Fix the condition, so that
the work mode is configured as desired by firmware

CRs-Fixed: 2699234
Change-Id: I8f9ad5030e7a83075a9d2d1bfe2fc39774f4aa56
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-06-04 00:32:30 -07:00
Qiwei Liu
930011097f msm: vidc: support encoder auto dynamic fps
Encoder calculate fps based on timestamp,
if fps changes and stable for 2 frames,
set to firmware to facilitate rate control.
Use closest rounding instead of floor rounding
when calculate fps.

Change-Id: Id2420729a309378107ff6f7830515fae31512ddd
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-06-02 04:32:26 -07:00
Vikash Garodia
e55786492d msm: vdec: configure latency mode for decode session
Static - Enable latency hint which indicates that the
decode session may go into low latency mode during the
session. With this configuration, video driver disables
DCVS and decode batching.
Dynamic - Enable or disable low latency control during
the session. Based on it, video driver would decide the
work mode and set the same.

Change-Id: If6e85b7adb1bbe4b4bec9e4a8671db64f240cfe8
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2020-06-01 00:55:49 -07:00
Chinmay Sawarkar
6ec572de63 msm: vidc: Ignore vpp delay in thumbnail usecase
VPP delay is not applicable to Thumbnail usecase. Hence buffer
counts should not include VPP delay, in thumbnail usecase.

Change-Id: Iba7d3efec48c08c160eb602d946643d620d2a36f
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2020-05-29 16:09:38 -07:00
qctecmdr
2005f62619 Merge "msm: vidc: add active session check for clk and bus vote calculation" 2020-05-29 12:16:34 -07:00
qctecmdr
dbea17c4cb Merge "msm: vidc: Change default width & height" 2020-05-29 12:16:34 -07:00
qctecmdr
4447b8f0ba Merge "msm: venc: uncomment bitrate boost HFI calling" 2020-05-29 12:16:34 -07:00
qctecmdr
25fb9b2451 Merge "msm: vidc: restore native recorder interface" 2020-05-29 12:16:34 -07:00
qctecmdr
36d864b37f Merge "msm: vidc: modify driver output min buffer count" 2020-05-29 12:16:33 -07:00