GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
3 years agoscripts/setlocalversion: Improve -dirty check with git-status
Brian Norris [Thu, 15 Nov 2018 02:11:18 +0000 (18:11 -0800)]
scripts/setlocalversion: Improve -dirty check with git-status
 --no-optional-locks

[ Upstream commit ff64dd4857303dd5550faed9fd598ac90f0f2238 ]

git-diff-index does not refresh the index for you, so using it for a
"-dirty" check can give misleading results. Commit 6147b1cf19651
("scripts/setlocalversion: git: Make -dirty check more robust") tried to
fix this by switching to git-status, but it overlooked the fact that
git-status also writes to the .git directory of the source tree, which
is definitely not kosher for an out-of-tree (O=) build. That is getting
reverted.

Fortunately, git-status now supports avoiding writing to the index via
the --no-optional-locks flag, as of git 2.14. It still calculates an
up-to-date index, but it avoids writing it out to the .git directory.

So, let's retry the solution from commit 6147b1cf19651 using this new
flag first, and if it fails, we assume this is an older version of git
and just use the old git-diff-index method.

It's hairy to get the 'grep -vq' (inverted matching) correct by stashing
the output of git-status (you have to be careful about the difference
betwen "empty stdin" and "blank line on stdin"), so just pipe the output
directly to grep and use a regex that's good enough for both the
git-status and git-diff-index version.

Change-Id: Ieb6e2ff2db99c081b17332136db860260d165385
Cc: Christian Kujau <lists@nerdbynature.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Tested-by: Genki Sky <sky@genki.is>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
3 years agoarm64: dts: Import sabrina
deadman96385 [Sun, 25 Jul 2021 20:18:55 +0000 (15:18 -0500)]
arm64: dts: Import sabrina

* From QTS2.200918.032-sabrina TAR release.

Change-Id: Ibd5200f2af59cdf70316d4b0dee89983da5dce3e

3 years agoarm64: dts: Add wifi overlay for m5
Stricted [Sat, 17 Jul 2021 12:00:22 +0000 (12:00 +0000)]
arm64: dts: Add wifi overlay for m5

Change-Id: I338d01d750a701c64f2af488e6f95cf8adf978d1

3 years agoarm64: dts: sm1_s905y3_bananapim5: Apply changes for bananapim5
Stricted [Tue, 6 Jul 2021 17:42:39 +0000 (17:42 +0000)]
arm64: dts: sm1_s905y3_bananapim5: Apply changes for bananapim5

Change-Id: If09571483ae6f68f52c86041669f1054cd216b20

3 years agoarm64: dts: Rebrand odroidc4 for bananapim5
Stricted [Tue, 6 Jul 2021 17:41:17 +0000 (17:41 +0000)]
arm64: dts: Rebrand odroidc4 for bananapim5

Change-Id: I682a92fefeef88d1965fd09e15cc25342f51e331

3 years agoarm64: dts: sm1_s905y3_odroidc4: Apply changes for odroidc4
Stricted [Fri, 2 Jul 2021 04:59:07 +0000 (04:59 +0000)]
arm64: dts: sm1_s905y3_odroidc4: Apply changes for odroidc4

Change-Id: I2ee6b8645002d98631496587055dcaece9d9ca8d

3 years agoarm64: dts: Rebrand SM1 deadpool variant for odroidc4
Stricted [Fri, 2 Jul 2021 04:58:23 +0000 (04:58 +0000)]
arm64: dts: Rebrand SM1 deadpool variant for odroidc4

Change-Id: I1a64dd7831fe776999ac1c21e4c5b8ce57dc0694

3 years agoarm64: dts: sti6140d350: Enable IR
deadman96385 [Thu, 1 Jul 2021 23:34:15 +0000 (16:34 -0700)]
arm64: dts: sti6140d350: Enable IR

* wade has an IR module, and it's stock remote works with it,
  even in recovery, which is awesome.
* `arch/arm64/boot/dts/amlogic/Makefile` apparently had no
  UNIX file-end newline, so now it does.

Change-Id: I19fbd84981f11af75b5e4ae10533d164cbcf18a3

3 years agoarm64: dts: sti6130d3x0: Apply dopinder/wade's stock DTS changes
deadman96385 [Thu, 1 Jul 2021 22:48:53 +0000 (15:48 -0700)]
arm64: dts: sti6130d3x0: Apply dopinder/wade's stock DTS changes

* Dummy-Charger/Battery added to main DTB instead of DTBO.
* IR Remote disabled in main DTS, enabled in Wade DTBO.

Change-Id: I9ae1d2a56596e5f3c3ed4d3d08fda6b8b45efe8b

3 years agoarm64: dts: sti6130d3x0: Rebrand to track device-specific changes
deadman96385 [Thu, 1 Jul 2021 22:47:37 +0000 (15:47 -0700)]
arm64: dts: sti6130d3x0: Rebrand to track device-specific changes

Change-Id: I738ae3065b9a932619c7774d543031e829432892

3 years agoarm64: configs: Create sabrina variant defconfig
Stricted [Mon, 26 Jul 2021 16:57:37 +0000 (16:57 +0000)]
arm64: configs: Create sabrina variant defconfig

* Generated by comparing deadpool Android 10 defconfig to
  sabrina Android 10 defconfig (both ran through savedconfig
  first), with extraneous changes dropped.

Change-Id: I26c6ba841e840a7b0500ec3158a82e599c7776c8

3 years agoarm64: configs: Add beast defconfig
Nolen Johnson [Tue, 13 Jul 2021 23:56:28 +0000 (19:56 -0400)]
arm64: configs: Add beast defconfig

* Extracted from stock package: adt2-user 9 PTT5.190307.001 5360859 dev-keys.
* Ran through `make savedconfig` to sanitize/minimalize.

Change-Id: I8807d0fbc1035b0d30f66248927cb5039d3fdfe8

3 years agoarm64: configs: Add deadpool defconfig
Stricted [Sat, 19 Jun 2021 23:30:26 +0000 (23:30 +0000)]
arm64: configs: Add deadpool defconfig

* Extracted from stock package: adt3-user 11 RTT1.200909.003.A2 6832896 release-keys.
* Ran through `make savedconfig` to sanitize/minimalize.

Change-Id: I55fc74de8ab3c6eeef072c95dc6b7f589ed8922c

3 years agoarm64: dts: amlogic: Build all DTBs
Stricted [Sat, 19 Jun 2021 23:28:55 +0000 (23:28 +0000)]
arm64: dts: amlogic: Build all DTBs

Change-Id: I424c2f57b537371d980f4f1ead3d4c4516d67161

3 years agodrivers: net: usb: Import Google's Realtek RTL8152/RTL8153 changes
deadman96385 [Thu, 22 Jul 2021 00:31:04 +0000 (19:31 -0500)]
drivers: net: usb: Import Google's Realtek RTL8152/RTL8153 changes

Change-Id: I310354ab560e53b1d93bb9414423f51eabfb6b52

3 years agodrivers: amlogic: Import Google's OTG changes
deadman96385 [Thu, 22 Jul 2021 00:22:32 +0000 (19:22 -0500)]
drivers: amlogic: Import Google's OTG changes

Change-Id: I79dfd43e7fae1f79cac2e45e5bf081b2d16240db

3 years agodrivers: usb: Import Google's Type-C driver
deadman96385 [Thu, 22 Jul 2021 00:19:50 +0000 (19:19 -0500)]
drivers: usb: Import Google's Type-C driver

Change-Id: Ib224baf7f88334a07f1f1d106f4d0af36b59c72d

3 years agodrivers: usb: Import Google's role switch driver
deadman96385 [Thu, 22 Jul 2021 00:21:31 +0000 (19:21 -0500)]
drivers: usb: Import Google's role switch driver

Change-Id: Ie8e5b6759feea920d6fe903be43e94a8762842c1

3 years agodrivers: google: Import USB power monitor driver
deadman96385 [Wed, 21 Jul 2021 23:54:28 +0000 (18:54 -0500)]
drivers: google: Import USB power monitor driver

Change-Id: I5f56663798cbd790f4ec9f164e83d07404c157a3

3 years agoUPSTREAM: seq_file: Introduce DEFINE_SHOW_ATTRIBUTE() helper
Andy Shevchenko [Mon, 22 Jan 2018 16:05:43 +0000 (18:05 +0200)]
UPSTREAM: seq_file: Introduce DEFINE_SHOW_ATTRIBUTE() helper
 macro

The DEFINE_SHOW_ATTRIBUTE() helper macro would be useful for current
users, which are many of them, and for new comers to decrease code
duplication.

Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Bug: 136497735
(cherry picked from commit a08f06bb7a0743a7fc8d571899c93d882468096e)
Change-Id: Ib60cf57dc5e979915a83848919644150d82e7058
Signed-off-by: Hridya Valsaraju <hridya@google.com>
3 years agolib/string: add sysfs_match_string helper
Heikki Krogerus [Tue, 21 Mar 2017 11:56:46 +0000 (13:56 +0200)]
lib/string: add sysfs_match_string helper

Make a simple helper for matching strings with sysfs
attribute files. In most parts the same as match_string(),
except sysfs_match_string() uses sysfs_streq() instead of
strcmp() for matching. This is more convenient when used
with sysfs attributes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Icf173608d9814e1aaf6bc05ed4223f893763960b

3 years agodrivers: base: Unified device connection lookup
Heikki Krogerus [Tue, 20 Mar 2018 12:57:02 +0000 (15:57 +0300)]
drivers: base: Unified device connection lookup

Several frameworks - clk, gpio, phy, pmw, etc. - maintain
lookup tables for describing connections and provide custom
API for handling them. This introduces a single generic
lookup table and API for the connections.

The motivation for this commit is centralizing the
connection lookup, but the goal is to ultimately extract the
connection descriptions also from firmware by using the
fwnode_graph_* functions and other mechanisms that are
available.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I5dd10228fc5a1e2c96a116b0de547dae35a3cddb

3 years agoDon't require a VARIANT_DEFCONFIG
Christopher R. Palmer [Tue, 12 Aug 2014 09:43:23 +0000 (05:43 -0400)]
Don't require a VARIANT_DEFCONFIG

Change-Id: I4a652c22ad4e29cd2a7eb31ae533d1e09a015ced

3 years agoscripts: Add support for variant and selinux defconfig
dhacker29 [Fri, 23 Aug 2013 22:29:35 +0000 (17:29 -0500)]
scripts: Add support for variant and selinux defconfig

3 years agoAdd toggle for disabling newly added USB devices
Daniel Micay [Tue, 16 May 2017 21:51:48 +0000 (17:51 -0400)]
Add toggle for disabling newly added USB devices

Based on the public grsecurity patches.

Change-Id: I2cbea91b351cda7d098f4e1aa73dff1acbd23cce
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
3 years agoAndroid: Add empty Android.mk file
LuK1337 [Tue, 11 Dec 2018 08:50:01 +0000 (09:50 +0100)]
Android: Add empty Android.mk file

* This prevents inclusion of drivers/staging/greybus/toolsAndroid.mk
  which will conflict in case we have more than 1 kernel tree in AOSP
  source dir.

Change-Id: I335bca7b6d6463b1ffc673ab5367603347516e13

3 years agoubifs: Remove unnecessary assignment
Stefan Agner [Sun, 11 Feb 2018 22:17:36 +0000 (23:17 +0100)]
ubifs: Remove unnecessary assignment

Assigning a value of a variable to itself is not useful. This
fixes a warning shown when using clang:
  warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign]

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Richard Weinberger <richard@nod.at>
Change-Id: I282cad6e2d0c820e7dbece2f61ce046646aac3c9

3 years agoubifs: Remove unnecessary assignment
Stefan Agner [Mon, 17 Apr 2017 02:22:43 +0000 (19:22 -0700)]
ubifs: Remove unnecessary assignment

Assigning a value of a variable to itself is not useful.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Richard Weinberger <richard@nod.at>
Change-Id: I0ac4db5bb670dde5e86af187a209fbbade6a3ba5

3 years agonet: wireless: ath10k: Fix null check warnings
Stricted [Sat, 19 Jun 2021 23:14:08 +0000 (23:14 +0000)]
net: wireless: ath10k: Fix null check warnings

Change-Id: If6625cd0ddb96f6c056a8068efe033c69dc80bc3

3 years agomedia: dvb-frontends: Remove extra parentheses
Stricted [Wed, 23 Jun 2021 22:14:25 +0000 (22:14 +0000)]
media: dvb-frontends: Remove extra parentheses

Change-Id: I43119a75f3cb9d14e052c26e249d3215e60add99

3 years agomedia: dvb-frontends: Fix self assign warning
Stricted [Sat, 19 Jun 2021 23:13:05 +0000 (23:13 +0000)]
media: dvb-frontends: Fix self assign warning

Change-Id: Ie343bf04cdc1843395663d1ac5a09cd3a49a43ca

3 years agoamlogic: usb: Remove extra parentheses
Stricted [Sat, 19 Jun 2021 23:12:06 +0000 (23:12 +0000)]
amlogic: usb: Remove extra parentheses

Change-Id: Ide547d68899ef8150344b1f9d43e8db843317f63

3 years agoamlogic: mtd: Remove extra parentheses
Stricted [Sat, 19 Jun 2021 23:11:27 +0000 (23:11 +0000)]
amlogic: mtd: Remove extra parentheses

Change-Id: If0265d086d1f0453c0080b372878390f0050856f

3 years agoamlogic: mmc: Fix null check
Stricted [Sat, 19 Jun 2021 23:10:46 +0000 (23:10 +0000)]
amlogic: mmc: Fix null check

Change-Id: I08b33f1971b753cd443ac2006c08642414cee5fb

3 years agoamlogic: memory_ext: Fix sizeof-array-div warning
Stricted [Sat, 19 Jun 2021 23:09:39 +0000 (23:09 +0000)]
amlogic: memory_ext: Fix sizeof-array-div warning

Change-Id: Ief3bec13d2096c4d94bbbcb0e2654feec2c5dce9

3 years agoamlogic: tvout: Remove extra parentheses
Stricted [Sat, 19 Jun 2021 23:07:43 +0000 (23:07 +0000)]
amlogic: tvout: Remove extra parentheses

Change-Id: I4ec4b04576d043c5898263905a5db3ffa81a6c11

3 years agoamlogic: tvin: Fix enum conversion warnings
Stricted [Sat, 19 Jun 2021 23:06:58 +0000 (23:06 +0000)]
amlogic: tvin: Fix enum conversion warnings

Change-Id: Ib93abbeb272370b9e520a6eabdae8d9f1ca061cc

3 years agoamlogic: osd: Fix self assign warnings
Stricted [Sat, 19 Jun 2021 23:05:13 +0000 (23:05 +0000)]
amlogic: osd: Fix self assign warnings

Change-Id: Ib7cbf268dcaf9115c423f5fea3eb88c5819aea24

3 years agoamlogic: osd: Fix comparsion checks
Stricted [Sat, 19 Jun 2021 23:04:31 +0000 (23:04 +0000)]
amlogic: osd: Fix comparsion checks

Change-Id: Ide1f24ad8b6e6348df9ea5b1902116a2dc6ecae3

3 years agoamlogic: amvecm: Fix if check warnings
Stricted [Sat, 19 Jun 2021 23:03:23 +0000 (23:03 +0000)]
amlogic: amvecm: Fix if check warnings

Change-Id: If3696b4a33677f1a3d4db2fade1524a363d90fc7

3 years agoamlogic: di_multi_v3: Fix enum conversion warning
Stricted [Sat, 19 Jun 2021 23:01:47 +0000 (23:01 +0000)]
amlogic: di_multi_v3: Fix enum conversion warning

Change-Id: I6f6a60055a0cd0d488dc36dcf2aada17edeba3bb

3 years agoamlogic: di_multi: Remove extra parentheses
Stricted [Sat, 19 Jun 2021 23:00:44 +0000 (23:00 +0000)]
amlogic: di_multi: Remove extra parentheses

Change-Id: Ie65d8205da31350a13a1f66d78b7b631989d46bf

3 years agoamlogic: di_multi: Fix dolby_sys header guard
Stricted [Sat, 19 Jun 2021 22:57:25 +0000 (22:57 +0000)]
amlogic: di_multi: Fix dolby_sys header guard

Change-Id: I8d4080e9d6d40b294ca7dc4d3770aa2069a30e5c

3 years agoamlogic: di_multi: Fix enum conversion warnings
Stricted [Sat, 19 Jun 2021 22:56:03 +0000 (22:56 +0000)]
amlogic: di_multi: Fix enum conversion warnings

Change-Id: Ie4c96994a79d1e824ef375d2bb4868da1d41750a

3 years agoamlogic: film_mode_fmw: Fix self assign warning
Stricted [Sat, 19 Jun 2021 22:54:21 +0000 (22:54 +0000)]
amlogic: film_mode_fmw: Fix self assign warning

Change-Id: I237fb28693706c491a3f2ea4b09730bb705a7c8c

3 years agoamlogic: deinterlace: Fix indentation
Stricted [Sat, 19 Jun 2021 22:53:25 +0000 (22:53 +0000)]
amlogic: deinterlace: Fix indentation

Change-Id: Ia49e62bcab7d4a0d49088e77b15234e8e783b096

3 years agoamlogic: hifi4dsp: Fix null check
Stricted [Sat, 19 Jun 2021 22:52:22 +0000 (22:52 +0000)]
amlogic: hifi4dsp: Fix null check

Change-Id: I3b8bc51863bb69662193d8e5e3f99f4319b81e65

3 years agoamlogic: esm: Fix indentation
Stricted [Sat, 19 Jun 2021 22:51:24 +0000 (22:51 +0000)]
amlogic: esm: Fix indentation

Change-Id: I48cb46f9b6bc1222a5a83273ed6e7f8329a5f2b9

3 years agoamlogic: clk: Remove unused variables
Stricted [Sat, 19 Jun 2021 22:50:37 +0000 (22:50 +0000)]
amlogic: clk: Remove unused variables

Change-Id: I252bdd6b66bc87db7a4242ef5ffdf880bc931a3a

3 years agovmscan: Fix enum conversion warning
Stricted [Sat, 19 Jun 2021 22:48:54 +0000 (22:48 +0000)]
vmscan: Fix enum conversion warning

Change-Id: Ib06e0e5ec2660eb63c14c5e4ad2b5d8bb2261467

3 years agotreewide: Remove unknown warning build flags
Stricted [Sat, 19 Jun 2021 22:46:42 +0000 (22:46 +0000)]
treewide: Remove unknown warning build flags

Change-Id: Ia6ebfc9a9438a0aff23a58fbb660b4e10f144db4

3 years agokernel: source code upgrade for adt3-R [1/1]
Liang Ji [Fri, 19 Mar 2021 02:37:59 +0000 (10:37 +0800)]
kernel: source code upgrade for adt3-R [1/1]

in amlogic side
the tot CL:
    commit a02cbbb86f9a570b88f6a52d1fed52c8481f61f2
    Author: binqi zhang <binqi.zhang@amlogic.com>
    Date:   Mon Mar 15 17:27:12 2021 +0800

    uvm: fix kernel panic after exit playback [2/2]

    PD#SWPL-45047

    Problem:
    fixed realloc buffer size is not reasonable

    Solution:
    realloc buffer size need real buffer size

    Verify:
    adt3

    Change-Id: I307b37d4b12daf23eb4b8612e71af0452932a75a
Signed-off-by: binqi zhang <binqi.zhang@amlogic.com>
Signed-off-by: Liang Ji <liang.ji@amlogic.com>
Change-Id: Iead8da7ba7c8eef9767ce87cf22ac515d78feb91

4 years agocec: pw down save phy addr [1/1]
Yong Qin [Tue, 21 Jan 2020 12:53:16 +0000 (20:53 +0800)]
cec: pw down save phy addr [1/1]

PD#SWPL-19940

Problem:
sometime uboot got wrong phy addr

Solution:
power down save phy addr again

Verify:
g12a

Change-Id: I0a4c468e1c1752c4dcdc4d33a32e14db60dd67b5
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
4 years agoosd: fix osd bootanimation shift [2/2]
Pengcheng Chen [Mon, 2 Mar 2020 07:40:20 +0000 (15:40 +0800)]
osd: fix osd bootanimation shift [2/2]

PD#SWPL-19862

Problem:
osd regs init are different with meson-hwc setting

Solution:
osd regs init are different with meson-hwc setting

Verify:
franklin

Change-Id: Ic9f19a82859e1e18e57084935873b10057436e3b
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
4 years agohdr: hdr10+ color abnormal for androidQ [1/1]
Cheng Wang [Fri, 27 Dec 2019 06:13:47 +0000 (14:13 +0800)]
hdr: hdr10+ color abnormal for androidQ [1/1]

PD#SWPL-18339

Problem:
play source of hdr10+ color abnormal on hdr_policy always
caused by PROC_MATCH value.

Solution:
Modify PROC_MATCH value.

Verify:
on newton

Change-Id: I3f86f67040b2e408dd92bcaaeceaa6dcb8b638cc
Signed-off-by: Cheng Wang <cheng.wang@amlogic.com>
4 years agodts: add new unifykey [2/2]
Liang Ji [Wed, 11 Dec 2019 08:05:14 +0000 (16:05 +0800)]
dts: add new unifykey [2/2]

PD#SWPL-17914

Problem:
need a new unifykey for google smoking test

Solution:
add a new unifykey named oemkey

Verify:
x301, franklin, ampere

Change-Id: I64fbee1f2e2ae9d9c71fa02b0be033d7cd6c8a9d
Signed-off-by: Liang Ji <liang.ji@amlogic.com>
4 years agodeadpool-y3: add oemkey [1/1]
Liang Ji [Wed, 5 Feb 2020 08:58:36 +0000 (16:58 +0800)]
deadpool-y3: add oemkey [1/1]

BUG=148900449

Problem:
deadpool y2 has the unifykey named oemkey
but deadpool y3 does not

Solution:
add the unifykey

Verify:
deadpool-y3

Change-Id: Ia4609709f277a90eca104bde7b21708ec2e4cd91
Signed-off-by: Liang Ji <liang.ji@amlogic.com>
4 years agosuspend: fix freeze abort hangup which caused by insmod [1/1]
Qiufang Dai [Thu, 26 Dec 2019 04:05:22 +0000 (12:05 +0800)]
suspend: fix freeze abort hangup which caused by insmod [1/1]

PD#GH-134

Problem:
When freeze abort happen, it will lose device_unblock_probing(),
so device probe is blocked.

Solution:
When freeze abort happen, release device_block_probing

Verify:
SM1_S905D3_AC200

Change-Id: I3e591fe9ed392b6a4d30285817a91fbfec25336f
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
4 years agodeadpool: enable new mailbox routine for G12A [1/1]
Xindong Xu [Mon, 6 Jan 2020 10:07:42 +0000 (18:07 +0800)]
deadpool: enable new mailbox routine for G12A [1/1]

PD#SWPL-19014

Problem:
BL30 enable new mailbox routine for SM1
So G12A also need use the same mailbox routine

Solution:
Enable new mailbox routine in dts

Verify:
deadpool

Change-Id: I17ff88facb1763b22735d46e83bac493bbaec368
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
4 years agouvm: add meson uvm driver [1/1]
Tellen Yu [Fri, 20 Dec 2019 10:44:10 +0000 (18:44 +0800)]
uvm: add meson uvm driver [1/1]

PD#SWPL-18288

Problem:
For video display pipe, we need a way to avoid passing non-afbc data.

Solution:
add a new dma-buf allocation driver to do delay allocation.
trunk cl:http://scgit.amlogic.com:8080/#/c/94164/

Verify:
u212

Change-Id: I77ba7afc97ec7607700f3fdeb8baa147fa1483ad
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
4 years agoMerge remote-tracking branch 'remotes/trunk/bringup/amlogic-4.9/sync20190611_forQ...
Xindong Xu [Fri, 3 Jan 2020 05:06:11 +0000 (13:06 +0800)]
Merge remote-tracking branch 'remotes/trunk/bringup/amlogic-4.9/sync20190611_forQ' into ref_head

4 years agodv: fix first frame garbage with dual dv [1/1]
Brian Zhu [Mon, 30 Dec 2019 16:09:21 +0000 (00:09 +0800)]
dv: fix first frame garbage with dual dv [1/1]

PD#SWPL-19310

Problem:
When playing dual layer dv streaming, first frame
may display green. BL layer is out of sync with EL
layer.

Solution:
Fix the case which will toggle one more EL vframe incorrecly.

Verify:
Verified by AC214

Change-Id: I13b4a05716e800b8d25564a82d1d34d7198bf467
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
4 years agoG12A: enable new mailbox routine for G12A [3/3]
Qiufang Dai [Mon, 30 Dec 2019 08:58:09 +0000 (16:58 +0800)]
G12A: enable new mailbox routine for G12A [3/3]

PD#SWPL-19014

Problem:
BL30 enable new mailbox routine for SM1
So G12A also need use the same mailbox routine

Solution:
Enable new mailbox routine in dts

Verify:
S905D2_U200

Change-Id: I3582c9351c362d255996fed593ebed8581f82ae6
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
4 years agoMailbox: fix mailbox rx_size issue.[2/3]
Qiufang Dai [Mon, 30 Dec 2019 08:53:33 +0000 (16:53 +0800)]
Mailbox: fix mailbox rx_size issue.[2/3]

PD#SWPL-19014

Problem:
m3 channel (low mailbox) use wrong rx_size in mbox_handler

Solution:
m4 channel use read back rx_size, m3 use rx_size from package

Verify:
S905X3-AC214

Change-Id: I44a5a038b14f3d6860ffb01e733d56795696024f
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
4 years agovpp: add vframe src_fmt struct and function [1/1]
Brian Zhu [Fri, 27 Dec 2019 18:24:22 +0000 (02:24 +0800)]
vpp: add vframe src_fmt struct and function [1/1]

PD#SWPL-17729

Problem:
In new video pipeline, vfm map is changed. So vpp
can not get aux data from decode directly. It cause
the format of dv or hdr10+ content is incorrect.

Solution:
Add src_fmt struct in vframe, and whole src_fmt interface.
Let front-end updates src_fmt directly. Then vpp, dv or
hdr10+ module can get the sei data from it.

Verify:
Verifed on AC214

Change-Id: I96b7f84fa72c51ceec9e3ec28288ea0e7a726139
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
4 years agouvm: copy the vframe to dma_buf one time [1/1]
Ao Xu [Wed, 25 Dec 2019 04:13:24 +0000 (12:13 +0800)]
uvm: copy the vframe to dma_buf one time [1/1]

PD#SWPL-19184

Problem:
1. When playing 4K video and pressing the power button,
it will stuck for more than 2s.
2. For some memory pressue condition, ion_alloc will
alloc fail for CMA memory.

Solution:
1. only do the data copy from vframe once.
2. change heap type to system heap for afbc video case.

Verify:
u212

Change-Id: I778541577004fa77e0917ca612a48745d92f2fb7
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
4 years agocodec_mm: fix fastplay can not alloc twice [2/3]
Jian Wang [Tue, 24 Dec 2019 09:39:01 +0000 (17:39 +0800)]
codec_mm: fix fastplay can not alloc twice [2/3]

PD#SWPL-18391

Problem:
codec_mm_extpool_pool_release use
mgt->tvp_pool.total_size, not it
parm tvp_pool, when extpool is
cma_pool not tvp pool will duo to
total_size set error.

Solution:
use codec_mm_extpool_pool_release
parm tvp_pool total_size to set

Verify:
verify on u212

Change-Id: I83a5d988d7701cf6291250bd739c1c5b43143764
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
4 years agodi: copy vframe pts_us64 to start_pts64 [1/1]
rongrong zhou [Wed, 25 Dec 2019 09:51:02 +0000 (17:51 +0800)]
di: copy vframe pts_us64 to start_pts64 [1/1]

PD#SWPL-18928

Problem:
DI first frame pts_us64 cause video discontinue

Solution:
copy pts_us64

Verify:
local

Change-Id: I86adf0e6221083a4205a07f7920a6d443b447c15
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agovideo_composer: window position is abnormal. [1/1]
renjiang.han [Tue, 24 Dec 2019 14:17:44 +0000 (22:17 +0800)]
video_composer: window position is abnormal. [1/1]

PD#SWPL-18923

Problem:
window position is abnormal.

Solution:
axis and crop need to be done at the same time.

Verify:
on U212

Change-Id: I9c3e2d16588b83734fa2d7d1dcf7acee21d0af02
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
4 years agovpp: check the vframe type for recycle buffer [1/1]
Brian Zhu [Thu, 26 Dec 2019 04:16:57 +0000 (12:16 +0800)]
vpp: check the vframe type for recycle buffer [1/1]

PD#SWPL-19012

Problem:
If the vframe is not from DI post wr, it may crash
in recycle flow.

Solution:
Double check the vframe type if it is DI post wr.
Filter the invaild buffer.

Verify:
Verified on AC214

Change-Id: I8d469ea578bd308bfe930a97b4182b6218c079ce
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
4 years agocodec_mm: add protect secure memory in codec_mm [1/1]
shipeng.sun [Mon, 23 Dec 2019 08:59:53 +0000 (16:59 +0800)]
codec_mm: add protect secure memory in codec_mm [1/1]

PD#SWPL-17811

Problem:
add protect secure memory in codec_mm

Solution:
add protect secure memory protect in codec_mm and
add flags to change old mode to debug

Verify:
Android Q + franklin

Test:
1. If tvp_mode set to 0 can be compatibility with
old mode.
2. In tvp_mode 1, if no protect tvp, the play will
full screen mosaic

Change-Id: Ie3b04c0a06377610f9a5a18fdec2feba70ba2f8d
Signed-off-by: shipeng.sun <shipeng.sun@amlogic.com>
4 years agotee: add api tee_protect_tvp_mem [1/1]
Pengguang Zhu [Tue, 3 Dec 2019 07:15:10 +0000 (15:15 +0800)]
tee: add api tee_protect_tvp_mem [1/1]

PD#SWPL-17811

Problem:
need API to protect mem for tvp

Solution:
add api tee_protect_tvp_mem

Verify:
Android Q + franklin

Test: manual

Change-Id: I46daec70a843524789aa63b32ef5e43111b65c66
Signed-off-by: Pengguang Zhu <pengguang.zhu@amlogic.com>
4 years agov4lvideo: add support for multiple input formats. [1/1]
renjiang.han [Tue, 24 Dec 2019 12:47:06 +0000 (20:47 +0800)]
v4lvideo: add support for multiple input formats. [1/1]

PD#SWPL-18704

Problem:
v4lvideo only supports NV21 input format.

Solution:
add support for multiple input formats.

Verify:
on U212

Change-Id: I1dc4a4cc863fe4e8e2c540e22642d828f8aef7df
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
4 years agovpp: add recycle buffer q after unreg [2/2]
Brian Zhu [Mon, 23 Dec 2019 06:27:26 +0000 (14:27 +0800)]
vpp: add recycle buffer q after unreg [2/2]

PD#SWPL-18786

Problem:
Need recycle the kept buffer from DI module. Otherwise
buffers will be leaked.

Solution:
Record pointers of the kept buffer vframe and call release
function of DI.

Verify:
Verified on newton

Change-Id: Id62adea0bdde5e3b14a2ca00f45bf9e61be40d02
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
4 years agodeintlace: add recycle buffer q after unreg [1/2]
qianqian.cai [Mon, 23 Dec 2019 01:51:11 +0000 (09:51 +0800)]
deintlace: add recycle buffer q after unreg [1/2]

PD#SWPL-18786

Problem:
keep the buffer from DI need release

Solution:
modify the recycle flow

Verify:
newton

Change-Id: I2f7647468964236ac087704f60ef975c43549776
Signed-off-by: qianqian.cai <qianqian.cai@amlogic.com>
4 years agomailbox: sm1: pass irdeto ifcp testing [1/2]
Wayling Chen [Thu, 31 Oct 2019 11:05:08 +0000 (19:05 +0800)]
mailbox: sm1: pass irdeto ifcp testing [1/2]

PD#SWPL-15621

Problem:
1.irdeto ifcp can't work on amlogic mailbox.

Solution:
fix completion usage and mailbox payload offset
fix mailbox send buffer size to fit bl40_msg_buf struct

Verify:
    test pass on sm1 skt

Change-Id: Iea33427125b1f221241331730e2869d3b2b369f2
Signed-off-by: Wayling Chen <wayling.chen@amlogic.com>
4 years agodts: sm1: add dts parameters [1/1]
Shunzhou Jiang [Tue, 22 Oct 2019 07:08:54 +0000 (15:08 +0800)]
dts: sm1: add dts parameters [1/1]

PD#SWPL-15621

Problem:
add new feature

Solution:
add devnode and support duplex

Verify:
test pass on sm1 skt

Change-Id: I379800eda0090055a8af8e401f6413708e1a2466
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
4 years agotsync: fix video not smooth in vmaster mode [1/1]
Chao Liu [Thu, 21 Nov 2019 02:44:27 +0000 (10:44 +0800)]
tsync: fix video not smooth in vmaster mode [1/1]

PD#SWPL-15541

Problem:
video not smooth during playing dvb demo source.
When tsync in vmaster mode, the pcrscr increase video in every vsync,
no matter whether video buffer is enough or not.

Solution:
When underflow occurs, if tsync in vmaster mode, decrease pcrscr pts.
This will increase the buffer time and make playback smooth

Verify:
AC214

Change-Id: Ief0fc8aa1c79a48cfc6f2d6bb6964a8b193b7bf9
Signed-off-by: Chao Liu <chao.liu@amlogic.com>
4 years agovpp: init the blackout_policy as 0 [1/2]
Brian Zhu [Thu, 19 Dec 2019 13:17:02 +0000 (21:17 +0800)]
vpp: init the blackout_policy as 0 [1/2]

PD#SWPL-18346

Problem:
The default value of blackout_policy is incorrect. It
caused the black screen when decode reset

Solution:
init the blackout_policy as 0

Verify:
Verified on AC214

Change-Id: I24d8120b2268e176231995db1048ade688bbe19f
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
4 years agombox: sm1: add devnode and supoort duplex [1/1]
Shunzhou Jiang [Tue, 22 Oct 2019 07:54:40 +0000 (15:54 +0800)]
mbox: sm1: add devnode and supoort duplex [1/1]

PD#SWPL-15621

Problem:
add new feature

Solution:
add devnode and support duplex

Verify:
test pass on sm1 skt

Change-Id: I0990a08d611d039eb33e5f2a4ac4e8b86453c367
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
4 years agodvfs: update cpufreq tables for ac214 [1/1]
Hong Guo [Mon, 25 Nov 2019 01:52:07 +0000 (09:52 +0800)]
dvfs: update cpufreq tables for ac214 [1/1]

PD#SWPL-16915

Problem:
update cpufreq tables for ac214

Solution:
update cpufreq tables for ac214

Verify:
test pass on ac_214

Change-Id: I62941d8fe25d4e326fba06d1ba15a46ace3eff7c
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
4 years agodts: add video_composer for tm2_t962e2_ab311. [1/1]
renjiang.han [Thu, 19 Dec 2019 12:59:39 +0000 (20:59 +0800)]
dts: add video_composer for tm2_t962e2_ab311. [1/1]

PD#SWPL-18651

Problem:
dts of tm2_t962e2_ab311 has no video_composer.

Solution:
add video_composer for tm2_t962e2_ab311.

Verify:
on T962E2-AB311

Change-Id: Ib2c845179cb9954e2f3c658958af21341b402b9f
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
4 years agocec: no port out define in g12a, g12b dts [1/1]
Yong Qin [Thu, 12 Dec 2019 06:23:43 +0000 (14:23 +0800)]
cec: no port out define in g12a, g12b dts [1/1]

PD#SWPL-17700

Problem:
g12a, g12b android P,Q can't got port in/out info
at power on sequence.

Solution:
add output port define, modify dts, and port out
define

Verify:
g12a U212

Change-Id: I83120e56edb60c54d9868e0635f1b4bf517eb4d4
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
(cherry picked from commit 0c0dd13f356d8349513d0a72e98538b84d946027)

4 years agovideo_composer: fix black when hdmi hou-plug [1/1]
jintao xu [Wed, 18 Dec 2019 03:13:46 +0000 (11:13 +0800)]
video_composer: fix black when hdmi hou-plug [1/1]

PD#SWPL-17376

Problem:
black when hdmi hou-plug

Solution:
init last_vf when enable video_composer

Verify:
U212

Change-Id: I3ca03d0bf737ce142e1d25de8dd83986645a9870
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agoRevert "ftrace: enable preempt and irqsoff tracer default [1/1]"
Hanjie Lin [Thu, 5 Dec 2019 06:05:29 +0000 (23:05 -0700)]
Revert "ftrace: enable preempt and irqsoff tracer default [1/1]"

PD#SWPL-17514

This reverts commit feae23f568845360069cae8dfff155209c827276.

Change-Id: Id683e0b558b6255f53f4cfde0854cd53a01f2fab
Signed-off-by: Hanjie Lin <hanjie.lin@amlogic.com>
4 years agouvm: add meson uvm driver [1/1]
Ao Xu [Tue, 10 Dec 2019 14:41:47 +0000 (22:41 +0800)]
uvm: add meson uvm driver [1/1]

PD#SWPL-18288

Problem:
For video display pipe, we need a way to avoid passing non-afbc data.

Solution:
add a new dma-buf allocation driver to do delay allocation.

Verify:
u212

Change-Id: I77ba7afc97ec7607700f3fdeb8baa147fa1483ad
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
4 years agohdmitx: Fix parsing of HDR10plus and Dovi VSVDBs [1/1]
Zongdong Jiao [Tue, 3 Dec 2019 07:53:48 +0000 (15:53 +0800)]
hdmitx: Fix parsing of HDR10plus and Dovi VSVDBs [1/1]

PD#SWPL-17786

Problem:
No dolby vision on latest Vizio TVs providing an EDID containing
both dolby vision and HDR10plus VSVDBs in the EDID.

Solution:
If an EDID contains both HDR10plus and Dovi VSVDBs, we are
incorrectly resetting both dovi and hdr10plus parsed info structs.
As a result, we are only left with the parsed info of the later
VSVDB in the EDID. So, if we have a hdr10plus VSVDB after dovi
VSVDB, dovi info will be reset while parsing for hdr10plus, and
we will not report any dovi capabilities to the frameworks. This
is what is happening on these TVs in question.

Parse HDR10plus and Dovi VSVDBs independently of one another. Do
not reset parsed info of one while parsing for the other.

Since Dovi->HDR10+->Dovi transitions are not defined, send zero
drm/vsif packets while exiting HDR10+ playback if going to dovi
mode next.

Verify:
HDR10plus and Dovi capabilities can be simultaneously and correctly
reported to the frameworks.

Change-Id: I7a344638e5a923c88ef23f0b3a03480c5a564548
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
4 years agodv: Coverity defect cleanup [1/1]
yao liu [Thu, 14 Nov 2019 12:15:21 +0000 (20:15 +0800)]
dv: Coverity defect cleanup [1/1]

PD#SWPL-16534

Problem:
1.Null-checking vinfo
2.dead_error_condition
3.Err data type

Solution:
1.Add Null-checking
2.fix dead_error_condition in dump_setting
3.correct first_reseted data type

Verify:
U212

Change-Id: I1fd7d4059a231160f38684f92bd36866b6a569ba
Signed-off-by: yao liu <yao.liu@amlogic.com>
(cherry picked from commit a0e07f94dbe72dddd6839f418baa554a4d62b4ec)

4 years agovideo_composer: fix 3 channel crop error [1/1]
jintao xu [Thu, 12 Dec 2019 09:12:52 +0000 (17:12 +0800)]
video_composer: fix 3 channel crop error [1/1]

PD#SWPL-18034

Problem:
crop error when hdmi is 4k

Solution:
fix crop error

Verify:
Verify on u212

Change-Id: Id7f7599a64ab376e8b84ba891889e0ed38952266
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agoMerge "power: Disable unused modules [1/1]" into bringup/amlogic-4.9/sync20190611_forQ
Tellen Yu [Mon, 16 Dec 2019 10:47:55 +0000 (18:47 +0800)]
Merge "power: Disable unused modules [1/1]" into bringup/amlogic-4.9/sync20190611_forQ

4 years agopower: Disable unused modules [1/1]
henry.tsou [Mon, 16 Dec 2019 09:51:56 +0000 (17:51 +0800)]
power: Disable unused modules [1/1]

PD#GH-152
BUG=145966476

Problem:
Sabrina need to lower down more power

Solution:
Disable dvb/tuner/cvbsout module

Verify:
Sabrina-P2

Change-Id: I82655d038d61b4a9d017fb2d84a1c122a0a9f662
Signed-off-by: henry.tsou <henry.tsou@amlogic.com>
4 years agocodec_mm: enlarge reserved_block_mm_M [1/1]
rongrong zhou [Fri, 29 Nov 2019 12:17:34 +0000 (20:17 +0800)]
codec_mm: enlarge reserved_block_mm_M [1/1]

PD#SWPL-17471

Problem:
No mem ret=-10003, clear scatter cache!!

Solution:
enlarge reserved_block_mm_M

Verify:
U212

Change-Id: I567f6437cbfb5a5157c8903ce70fb5e2fc000e34
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agov4l2: drop frames [1/3]
rongrong zhou [Wed, 4 Dec 2019 07:04:22 +0000 (15:04 +0800)]
v4l2: drop frames [1/3]

PD#SWPL-17328

Problem:
drop frames

Solution:
1. add trace for debug
2. less than 256K, do not use codec_mm allocation
3. osd fence crash

Verify:
local

Change-Id: I3df0a1532b920570365e66cc48d81253831897c0
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agodv: do not use internal chip_id function by other modules [1/1]
Brian Zhu [Thu, 12 Dec 2019 06:46:40 +0000 (14:46 +0800)]
dv: do not use internal chip_id function by other modules [1/1]

PD#SWPL-18367

Problem:
amcsc used the wrong chip_id function from dolby vision driver,
but at the time, the dv driver maybe did not probe. So got the
wrong chip id state.

Solution:
Using the common chip id function.

Verify:
Verifed by u212

Change-Id: If27e861a2c8d8a586448f33cbaa70a81cbe2370f
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
(cherry picked from commit e58914e153138fc9655961a6ec67680e12699710)

4 years agovpp: set dv process after vd1_mif_correct [1/1]
Pengcheng Chen [Wed, 11 Dec 2019 08:02:04 +0000 (16:02 +0800)]
vpp: set dv process after vd1_mif_correct [1/1]

PD#SWPL-17905

Problem:
set corp right/bottom to 1 caused video flash

Solution:
set dv process after vd1_mif_correct

Verify:
Verify on franklin

Change-Id: I040ed7d3e061fe48b29fd17c97d45ad2bfccc58e
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
4 years agov4l2: drop frames [1/3]
rongrong zhou [Wed, 4 Dec 2019 07:04:22 +0000 (15:04 +0800)]
v4l2: drop frames [1/3]

PD#SWPL-17328

Problem:
drop frames

Solution:
1. add trace for debug
2. less than 256K, do not use codec_mm allocation
3. osd fence crash

Verify:
local

Change-Id: I3df0a1532b920570365e66cc48d81253831897c0
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agocodec_mm: enlarge reserved_block_mm_M [1/1]
rongrong zhou [Fri, 29 Nov 2019 12:17:34 +0000 (20:17 +0800)]
codec_mm: enlarge reserved_block_mm_M [1/1]

PD#SWPL-17471

Problem:
No mem ret=-10003, clear scatter cache!!

Solution:
enlarge reserved_block_mm_M

Verify:
U212

Change-Id: I567f6437cbfb5a5157c8903ce70fb5e2fc000e34
Signed-off-by: rongrong zhou <rongrong.zhou@amlogic.com>
4 years agovpp: fix vd1 afbc mif regs overwritten by vd2 [1/1]
Pengcheng Chen [Tue, 10 Dec 2019 09:16:09 +0000 (17:16 +0800)]
vpp: fix vd1 afbc mif regs overwritten by vd2 [1/1]

PD#SWPL-18101

Problem:
vd1 afbc mif regs overwritten by vd2

Solution:
set vd2 afbc mif regs correctly

Verify:
Verify on ab301

Change-Id: I1b761134dd24413ae2af569b6d35b247de21ebcb
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
4 years agoamvideo: fix axis not update when video is paused [1/1]
jintao xu [Thu, 12 Dec 2019 05:47:29 +0000 (13:47 +0800)]
amvideo: fix axis not update when video is paused [1/1]

PD#SWPL-17536

Problem:
axis not update when video is paused

Solution:
update axis every vsync

Verify:
Verify on u212

Change-Id: Iad1629f750e9ba075cbb1737a8c0b66be7f7fed4
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
4 years agodi: increase di_cma for two channel di [1/2]
jintao xu [Tue, 10 Dec 2019 10:49:14 +0000 (18:49 +0800)]
di: increase di_cma for two channel di [1/2]

PD#SWPL-18329

Problem:
enable two channel di

Solution:
increase di_cma for two channel di

Verify:
Verify on u212

Change-Id: I2ec87a52fc3e3beea5daae80c24d877385ec6818
Signed-off-by: jintao xu <jintao.xu@amlogic.com>