Commit Graph

486 Commits

Author SHA1 Message Date
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
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
9ea86bc34d msm: vidc: Add config files for holi
Add video config files for holi to enable
the video driver for holi target

CRs-Fixed: 2684474
Change-Id: I7aaf47f2616300665bfe155aface8aa5ed9e4d6e
2020-06-05 00:18:42 -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
qctecmdr
bee11d8578 Merge "msm: vidc: Adjust the load for concurrent sessions" 2020-05-29 08:35:49 -07:00
Shi Zhongbo
8fc8209df6 msm: venc: uncomment bitrate boost HFI calling
Uncomment HFI calling part for bitrate boost
setting.

Change-Id: I289b1866089fff883d624bb505b37cca4061a626
Signed-off-by: Shi Zhongbo <zhongbos@codeaurora.org>
2020-05-27 14:34:22 +08:00
Darshana Patil
bdd837dd06 msm: vidc: modify driver output min buffer count
Modify output driver min count to 4 for HEVC/H264.

Change-Id: I8efa986b693804392a6178b369ef43c7edf9e0d4
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2020-05-26 18:14:54 -07:00
qctecmdr
c0688d995a Merge "msm: vidc: fix dpb buffer count validation" 2020-05-26 13:25:59 -07:00
qctecmdr
6b5fa66b10 Merge "msm: vidc: update dpb buffer requirements" 2020-05-26 12:26:45 -07:00
qctecmdr
1208e22ffb Merge "msm: vidc: restrict non_secure iova usage" 2020-05-26 11:24:23 -07:00
Qiwei Liu
03507c27f6 msm: vidc: restore native recorder interface
Restore native recorder interface to keep driver
interface aligned with kona.

Change-Id: I8588bd6d85b024556c78d269c7e8d5c0b1518209
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
2020-05-27 01:28:44 +08:00
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