Commit Graph

1066174 Commits

Author SHA1 Message Date
Aaron Ding
2ccbb92f7f ANDROID: userfaultfd: Fix merge resolution: validate_range()
On the android12-5.10 branch, commit 4a5cf92412 ("BACKPORT: FROMGIT:
userfaultfd: add UFFDIO_CONTINUE ioctl") added a new call site for the
function validate_range(). Meanwhile, on the 5.10 stable branch, commit
0b591c020d ("userfaultfd: do not untag user pointers") changed the
function signature of validate_range() and updated all call sites
accordingly. However, since these two commits happened on different
branches, the new call site in userfaultfd_continue() has not been
updated accordingly. This has arguably been missed in the merge commit
66379c1ee5 ("Merge tag 'android12-5.10.66_r00' into
android12-5.10").

This patch fixes the following build breakage

./common/fs/userfaultfd.c:1875:32: error: incompatible pointer to integer conversion passing '__u64 *' (aka 'unsigned long long *') to parameter of type '__u64' (aka 'unsigned long long'); remove & [-Werror,-Wint-conversion]

        ret = validate_range(ctx->mm, &uffdio_continue.range.start,
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./common/fs/userfaultfd.c:1245:14: note: passing argument to parameter 'start' here
                                          __u64 start, __u64 len)
                                                ^
1 error generated.

Fixes: 66379c1ee5 ("Merge tag 'android12-5.10.66_r00' into android12-5.10")
Signed-off-by: Aaron Ding <aaronding@google.com>
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I7ad40df213897314c439480f22a2ef4712e84025
(cherry picked from commit 5ec931a853)
2021-10-26 21:43:22 +00:00
Tengfei Fan
09bd9e940e ANDROID: cpuhp/pause: schedule cpu_hotplug_work on resume cpu
Resume cpu need to run cpuset_hotplug_workfn which need take
about several milliseconds, and even more if the system have
more tasks.
This isn't suitable to run in the main task context of resume
cpu.
Due to the cpu which is resuming only have active mask,
but still not rebuild sched domain, make this slow
work run on resuming cpu can not take extra overload to
previous active cpus.

Bug: 203839955
Fixes: 1d3a64fbd2 ("ANDROID: cpu/hotplug: rebuild sched
domains immediately")
Change-Id: Ia7bdd077f982950c02696c3598a41b2482046220
Signed-off-by: Tengfei Fan <quic_tengfan@quicinc.com>
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
2021-10-26 19:57:45 +00:00
Liujie Xie
2a813b466b ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
Update symbols to symbol list externed by oem modules.

Leaf changes summary: 10 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 5 Added variables

5 Added functions:

  [A] 'function int __traceiter_android_vh_mem_cgroup_alloc(void*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_css_offline(void*, cgroup_subsys_state*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_css_online(void*, cgroup_subsys_state*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_free(void*, mem_cgroup*)'
  [A] 'function int __traceiter_android_vh_mem_cgroup_id_remove(void*, mem_cgroup*)'

5 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_alloc'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_css_offline'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_css_online'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_free'
  [A] 'tracepoint __tracepoint_android_vh_mem_cgroup_id_remove'

Bug: 193384408
Change-Id: Ia5112f375626f04481b0042ec808c67f78891086
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
2021-10-26 23:54:35 +08:00
Jiewen Wang
a8c611fa24 ANDROID: GKI: Update symbols list for vivo
Add symbol to symbol list for oem module.

Functions changes summary: 0 Removed, 0 Changed, 2 Added functions
Variables changes summary: 0 Removed, 0 Changed, 2 Added variables

2 Added functions:

  [A] 'function int __traceiter_android_vh_mmap_region(void*,
vm_area_struct*, unsigned long int)'
  [A] 'function int __traceiter_android_vh_try_to_unmap_one(void*,
vm_area_struct*, page*, unsigned long int, bool)'

2 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_mmap_region'
  [A] 'tracepoint __tracepoint_android_vh_try_to_unmap_one'

Bug: 204157239
Change-Id: I52791ae530d94afc0016a845c3649c67fbe37613
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
2021-10-26 17:37:27 +08:00
Cai YiWei
e01e0fd967 media: rockchip: isp: sync multi vir dev stream on/off
Change-Id: I851b0390952a4f3921405a7cd24b8af7fbaff532
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
67a3dbc5af media: rockchip: ispp: remove tnr iir first frame skip
Change-Id: Iac599ac81059c92f929ccd0997d32e419c338642
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
0789dbffc5 media: rockchip: isp/ispp sync alloc buf with dma sg case
Change-Id: If4c80315efd9ce3ac80de3ec72d537ca1c27776d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
97ca039661 media: rockchip: isp/ispp to version v1.7.0
Change-Id: I3c07a83f9e5a4e7b2bfee30cc5e36c252ecc429f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
f871ee03ff media: rockchip: isp: dmatx default config with mipi sensor input
Change-Id: I51f27921b650d614e552d810995172d4ea17ef08
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
96a592ab5e media: rockchip: isp: rawwr and rawrd memory mode
Three mode:
0: raw12/raw10/raw8 8bit memory compact
1: raw12/raw10 16bit memory one pixel
   big endian for rv1126/rv1109
   |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
   | 3| 2| 1| 0| -| -| -| -|11|10| 9| 8| 7| 6| 5| 4|
   little align for rk356x
   |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
   | -| -| -| -|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
2: raw12/raw10 16bit memory one pixel
   big align for rv1126/rv1109/rk356x
   |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
   |11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| -| -| -| -|

Change-Id: Iabd5600d1a880057f0a20e187b15d337079a14c6
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2021-10-26 14:58:10 +08:00
Zefa Chen
e6f02e7287 media: rockchip: cif support config memory mode
cif memory mode
 0: raw12/raw10/raw8 8bit memory compact
 1: raw12/raw10 16bit memory one pixel
    low align for rv1126/rv1109/rk356x
    |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
    | -| -| -| -|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
 2: raw12/raw10 16bit memory one pixel
    high align for rv1126/rv1109/rk356x
    |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
    |11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| -| -| -| -|

 note: rv1109/rv1126/rk356x dvp only support uncompact mode,
       and can be set low align or high align

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I59d619645650dfa10c9b2c168d8c741292f9f90f
2021-10-26 14:58:10 +08:00
Xu Hongfei
01396a8e91 media: rockchip: isp: disable tmo interrupt
remove associated configuration in TMO isr

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: I610bc64aaa2549d10e4383df0d8247f161bc8048
2021-10-26 14:58:10 +08:00
Cai YiWei
338398f63a media: rockchip: isp: unregister dmarx at driver remove
Change-Id: I1146e5c81445980f456bc2ff19810c0ae84d2c7b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
168ca89024 media: rockchip: isp: before frame start to update bridge mi
isp20 bridge will config gain and image dma address when isp
frame start interrupt event, and frame end update. But no
actual update if frame start and frame end together. One read
back is the same as the start interrupt event, so to update
bridge mi this.

Change-Id: I697128fd60c3e38eb2ed163a5a94df8c4c018241
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
41010e1153 media: rockchip: isp: fix default params config for mode switch
Change-Id: I7946d394e0a224ef8f2e1a460b9bf89c9334d015
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
9da4c18433 media: rockchip: isp: rawrd support uncompact mode
Change-Id: If9ff4b2043e3c9b29843b7f3562d107da597c9d8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:10 +08:00
Cai YiWei
fa89913f94 media: rockchip: ispp: fix monitor no working
Change-Id: I13c410af8902f65d5fc855a32c2778e44d369851
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:09 +08:00
Cai YiWei
f0940894ca media: rockchip: ispp: disable scl dma write if no output buffer
Change-Id: I11bbc17dad564510c7cbd37d4ad357f81fe1ecf2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:09 +08:00
Cai YiWei
9ed21d58a9 media: rockchip: ispp: add frame loss info to procfs
Change-Id: I413608060c2245809a4b1f9d908511531901608d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:58:09 +08:00
Cai YiWei
c5650d4372 media: rockchip: ispp: frame start to check stream output buffer
Change-Id: I8ca95767705ffd705c90e22ab5d067fe7d79ad9e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:49:49 +08:00
Cai YiWei
74b2c51e29 media: rockchip: ispp: fix monitor switch if don't power off
Change-Id: Iefe1f7df7417c84a09437d663cca3c342bf3888a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:49:49 +08:00
Cai YiWei
70f1336023 media: rockchip: ispp: off unused interrupt
Change-Id: I72a7d6b494a5bfc9a7b265d6b8a31beb233addac
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-10-26 14:49:49 +08:00
Bicycle Tsai
16493a3c87 Revert "BACKPORT: ASoC: soc-pcm: Get all BEs along DAPM path"
This reverts commit c82dbcbec1.

Reason for revert: use vendor_hook approach instead of adding a new field.

Change-Id: I001dafc1b90cfe4567a13f538c2f8d25a0929504
Signed-off-by: Bicycle Tsai <bicycle.tsai@mediatek.corp-partner.google.com>
2021-10-26 11:13:09 +08:00
Algea Cao
a7c8450f79 drm/rockchip: dw_hdmi: Call get yuv422 format interface in dw_hdmi-rockchip.c
To be compatible with GKI, dw-hdmi driver can't call interfaces in
rockchip-drm directly. In order for dp to be usable, get yuv422
format interface should define in rockchip-drm. So hdmi call
get yuv422 format interface in dw_hdmi-rockchip.c.

Fixes: dbd228a254 ("drm/bridge: synopsys: dw-hdmi: Get edid yuv422 info independently")
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Icc879ff4420357a6becba84371b9e3317583960b
2021-10-26 10:50:21 +08:00
YouMin Chen
6570412992 arm64: dts: rockchip: rk3568: remove ddr_timing node
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Iaef7442a52bfadee989c507e4fb9e60d50f9c49e
2021-10-26 10:45:45 +08:00
YouMin Chen
7252791b6d PM / devfreq: rockchip_dmc: remove of_get_rk3568_timings
For rk3568, ddr timings adjustment is no longer supported in dmc drive.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I63f0c5fea8c5acf8e6ef8f44b62968deb7bd823e
2021-10-26 10:45:45 +08:00
YouMin Chen
1bf9c26feb arm64: dts: rockchip: rk3568: add dmc_fsp node
Add dmc_fsp node for initialize dmc frequency set point on U-Boot.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I9fcd1ae498a64b5a4698c42ad05af96740b59e61
2021-10-26 10:45:45 +08:00
YouMin Chen
e1a47f52bf arm64: dts: rockchip: rk3568-dram-default-timing: add ddr params
Add ddr parameters for initialize dmc frequency set point.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I3445fa2dbabca5774306cc1052cd3c1d472b6867
2021-10-26 10:45:45 +08:00
YouMin Chen
fe28435aba include: linux: rockchip: add share mem page type for ddr fsp
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: Ie12446e746f4990287873d8ca52675f3398f45ae
2021-10-26 10:45:45 +08:00
YouMin Chen
e8c0c03fcc dt-bindings: memory: add macro definition about LPDDR4 and LPDDR4X
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I7bcf1f8c9f1d282a68d59dcc14fecaa7c0f59090
2021-10-26 10:45:45 +08:00
Ding Wei
f4fa6b0a5e video: rockchip: mpp: fix issue for devices register to service
The device must be registered last. If there is an error, the device
should not succeed.

Change-Id: Ie342c8bbf30e8a94822dcb2e0417fe1230e4482a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Ding Wei
616eb53bf1 video: rockchip: mpp: rkvenc: probe issue for devfreq init error
When devfreq initially fails, the device can still continue to execute,
but there is no devfreq function.

Change-Id: I2a39a77e0a85cb43854b6adbe0476905abcc9a3b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Yandong Lin
d6a0a91bc4 video: rockchip: mpp: Fix report wrong dev when pagefault
On some platforms(such as px30), vepu and vdpu shared the
same mmu.So when registering the iommu handle function,
there will be overwriting.Results in the reported device mismatch
when page fault.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id07c7f3088c52fcb987797c689296154c670078c
2021-10-26 10:41:38 +08:00
Ding Wei
4cc0b13369 video: rockchip: mpp: fix issue for CONFIG_IOMMU_SUPPORT=n
if CONFIG_IOMMU_SUPPORT=n, log:
 error: 'const struct iommu_ops' has no member named 'flush_iotlb_all'
   if (domain && domain->ops && domain->ops->flush_iotlb_all)

Change-Id: I8268e0b5d5a513d1c55b0c755c479049b13bdeb7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Ding Wei
a73554c2b3 video: rockchip: mpp: Use CONFIG_CPU_XX to match build target
Using CONFIG_CPU_XX only compiles the code of matching CPU,
then it can reduce the object file.

Change-Id: Ic19345464c802939d08786ae29b34111c3c5a855
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Ding Wei
a58b07b133 video: rockchip: mpp: px30: Use hack_xx.c instead workround funcs
move the workaround functions for px30 to the mpp_hack_px30.c.

Change-Id: I9f9880c28fe1d797b0551d116a66294223a5e251
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Ding Wei
e39950f6fe video: rockchip: mpp: Use ROCKCHIP_MPP_PROC_FS instead of PROC_FS
For kernel-tiny, remove debug relative code, and reduce the size of module.

Change-Id: Ic78a0839a75c9cebb56fa32e87235bd97be0370a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-10-26 10:41:38 +08:00
Jack Pham
a84e45d3c3 FROMGIT: usb: dwc3: gadget: Skip resizing EP's TX FIFO if already resized
Some functions may dynamically enable and disable their endpoints
regularly throughout their operation, particularly when Set Interface
is employed to switch between Alternate Settings.  For instance the
UAC2 function has its respective endpoints for playback & capture
associated with AltSetting 1, in which case those endpoints would not
get enabled until the host activates the AltSetting.  And they
conversely become disabled when the interfaces' AltSetting 0 is
chosen.

With the DWC3 FIFO resizing algorithm recently added, every
usb_ep_enable() call results in a call to resize that EP's TXFIFO,
but if the same endpoint is enabled again and again, this incorrectly
leads to FIFO RAM allocation exhaustion as the mechanism did not
account for the possibility that endpoints can be re-enabled many
times.

Example log splat:

	dwc3 a600000.dwc3: Fifosize(3717) > RAM size(3462) ep3in depth:217973127
	configfs-gadget gadget: u_audio_start_capture:521 Error!
	dwc3 a600000.dwc3: request 000000000be13e18 was not queued to ep3in

Add another bit DWC3_EP_TXFIFO_RESIZED to dep->flags to keep track of
whether an EP had already been resized in the current configuration.
If so, bail out of dwc3_gadget_resize_tx_fifos() to avoid the
calculation error resulting from accumulating the EP's FIFO depth
repeatedly.  This flag is retained across multiple ep_disable() and
ep_enable() calls and is cleared when GTXFIFOSIZn is reset in
dwc3_gadget_clear_tx_fifos() upon receiving the next Set Config.

Fixes: 9f607a309f ("usb: dwc3: Resize TX FIFOs to meet EP bursting requirements")
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Link: https://lore.kernel.org/r/20211021180129.27938-1-jackp@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 876a75cb52
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Bug: 204047971
Change-Id: Ia104c2fa9be36182a23a7e6f923e499ef3bcc3b1
Signed-off-by: Jack Pham <quic_jackp@quicinc.com>
2021-10-25 12:02:09 -07:00
Wesley Cheng
168de6b1d9 FROMGIT: usb: dwc3: gadget: Change to dev_dbg() when queuing to inactive gadget/ep
Since function drivers will still be active until dwc3_disconnect_gadget()
is called, some applications will continue to queue packets to DWC3
gadget.  This can lead to a flood of messages regarding failed ep queue,
as the endpoint is in the process of being disabled.  Change the log
level to debug, so that it can be enabled when debugging issues.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/20211018192647.32121-1-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit b851f7c7b8
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Bug: 203763122
Change-Id: I5120890fa12f707ae54da551db9aab02dded0063
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
2021-10-25 18:34:33 +00:00
Woogeun Lee
6cb41901ea ANDROID: ABI: update allowed list for galaxy
Leaf changes summary: 11 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 10 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

10 Added functions:

  [A] 'function int blkcg_activate_policy(request_queue*, const blkcg_policy*)'
  [A] 'function void blkcg_deactivate_policy(request_queue*, const blkcg_policy*)'
  [A] 'function int blkcg_policy_register(blkcg_policy*)'
  [A] 'function void blkcg_policy_unregister(blkcg_policy*)'
  [A] 'function blkcg_gq* blkg_lookup_slowpath(blkcg*, request_queue*, bool)'
  [A] 'function cgroup_subsys_state* css_next_descendant_pre(cgroup_subsys_state*, cgroup_subsys_state*)'
  [A] 'function int dump_align(coredump_params*, int)'
  [A] 'function int dump_emit(coredump_params*, void*, int)'
  [A] 'function cgroup_subsys_state* kthread_blkcg()'
  [A] 'function cgroup_subsys_state* of_css(kernfs_open_file*)'

1 Added variable:

  [A] 'blkcg blkcg_root'

Bug: 203800167

Signed-off-by: Woogeun Lee <woogeun.lee@samsung.com>
Change-Id: Ide71cb03541352a83466b922951bb9be4aba585f
2021-10-25 17:58:38 +00:00
Guangming Cao
48e5c07fe0 ANDROID: dma_heap: add dma_parms for uncached heap
In system_heap_do_allocate, we will use uncached heap device to call
dma_map_sgtable & dma_unmap_sgtable to do implicitly flush.

However, device of uncached heap is not set dma_parms, default value(64KB)
is too small for dma_heap buffer, it will cause some warning log below when
CONFIG_DMA_API_DEBUG_SG is enabled.

warning log sample:
 |DMA-API: dma_heap system-uncached: mapping sg segment longer than device claims to support [len=1048576] [max=65536]
 |WARNING: CPU: 4 PID: 576 at kernel/dma/debug.c:1173 debug_dma_map_sg+0x214/0x438
 |......

Bug: 199986022
Change-Id: I97076de329f4a50d035d43d69cb17606064c3151
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
2021-10-25 17:34:19 +00:00
Frank Wang
07f556c601 arm64: dts: rockchip: rk3588s: add mailbox nodes
This adds three mailbox nodes for RK3588 SoCs.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I49edf5211a0aab183524aeb37aaed56a2cf2c3ff
2021-10-25 16:27:09 +08:00
Frank Wang
6b4eb82586 arm64: dts: rockchip: rk3588s: add hw spinlock nodes
This adds HW Spinlock nodes for RK3588 SoCs.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I97c9c7292060b8b805353448cf6c47167bb3981d
2021-10-25 16:27:09 +08:00
Jianqun Xu
79c6a1e08b dma-buf: system_heap: adjust orders if swiotlb limit
This patch is useful for board with totalram size larger than 4GB.

Since swiotlb has memory size limitation, this will calculate the
maximum size locally, as a workaround to fix the orders[0].

With this patch:
[    3.921612] orders[0] = 6
[    3.921647] orders[1] = 4
[    3.921715] orders[2] = 0

Change-Id: I9286f6ea53f679816c9afd378a6cfe620ef1b53e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-10-25 16:18:41 +08:00
Liang Chen
0bf8924272 soc: rockchip: rk_fiq_debugger: fix deadlock when printk in try_to_wake_up
Assume p is console task, try_to_wake_up(p) will hold p->pi_lock,
if printk is called in try_to_wake_up(), then printk will call
try_to_wake_up(p) again which cause deadlock on p->pi_lock.

deadlock stack:
Thread #2 2 (Name: cpu1, EL2H) (Suspended : Container)
	queued_spin_lock_slowpath() at qspinlock.c:382 0xffffffc0101359a4
	queued_spin_lock() at qspinlock.h:85 0xffffffc0111ef72c
	do_raw_spin_lock_flags() at spinlock.h:195 0xffffffc0111ef72c
	__raw_spin_lock_irqsave() at spinlock_api_smp.h:119 0xffffffc0111ef72c
	_raw_spin_lock_irqsave() at spinlock.c:159 0xffffffc0111ef72c
	try_to_wake_up() at core.c:3,070 0xffffffc0101059c0
	wake_up_process() at core.c:3,275 0xffffffc010103bcc
	console_write() at rk_fiq_debugger.c:337 0xffffffc010732a50
	fiq_debugger_console_write() at fiq_debugger.c:1,169 0xffffffc010d60004
	call_console_drivers() at printk.c:1,912 0xffffffc01013f2d4
	console_unlock() at printk.c:2,538 0xffffffc01013f2d4
	vprintk_emit() at printk.c:2,061 0xffffffc01013ed48
	vprintk_default() at printk.c:2,078 0xffffffc01013f698
	vprintk_func() at printk_safe.c:401 0xffffffc010142304
	printk() at printk.c:2,109 0xffffffc0111e50a4
	report_bug() at bug.c:193 0xffffffc01063e258
	bug_handler() at traps.c:907 0xffffffc01009415c
	call_break_hook() at debug-monitors.c:325 0xffffffc010085a40
	brk_handler() at debug-monitors.c:332 0xffffffc010085a40
	do_debug_exception() at fault.c:964 0xffffffc0100af2bc
	el1_dbg() at entry-common.c:185 0xffffffc0111e6ba8
	el1_sync_handler() at entry-common.c:222 0xffffffc0111e6a04
	el1_sync() at 0xffffffc01008240c
	brk()
	WARN_ON_ONCE()
	ttwu_queue_wakelist()
	try_to_wake_up()
	hrtimer_wakeup()
	run_hrtimer()
	usleep_range()
	console_put()
	console_thread()

Change-Id: I76dac4e2a76abb1f75e66677fb7ece2b52a83f25
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-10-25 15:52:40 +08:00
Kever Yang
a0345d4590 ANDROID: GKI: rockchip: Enable symbols for pinctrl and rk8xx
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

2 Added functions:

  [A] 'function pinctrl_gpio_range* pinctrl_find_gpio_range_from_pin(pinctrl_dev*, unsigned int)'
  [A] 'function int spi_write_then_read(spi_device*, void*, unsigned int, void*, unsigned int)'

Bug: 194515348
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I97054044d799ddfdc969c4c616a2121187c41e77
2021-10-25 14:47:35 +08:00
Kever Yang
8e9111c2b2 ANDROID: GKI: rockchip: Enable symbols for typec
Leaf changes summary: 11 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 11 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

11 Added functions:

  [A] 'function int __typec_altmode_register_driver(typec_altmode_driver*, module*)'
  [A] 'function fwnode_handle* fwnode_create_software_node(const property_entry*, const fwnode_handle*)'
  [A] 'function tcpm_port* tcpm_register_port(device*, tcpc_dev*)'
  [A] 'function void tcpm_unregister_port(tcpm_port*)'
  [A] 'function typec_port* typec_altmode2port(typec_altmode*)'
  [A] 'function int typec_altmode_enter(typec_altmode*, u32*)'
  [A] 'function int typec_altmode_exit(typec_altmode*)'
  [A] 'function int typec_altmode_notify(typec_altmode*, unsigned long int, void*)'
  [A] 'function void typec_altmode_unregister_driver(typec_altmode_driver*)'
  [A] 'function int typec_altmode_vdm(typec_altmode*, const u32, const u32*, int)'
  [A] 'function int typec_get_negotiated_svdm_version(typec_port*)'

Bug: 194515348
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Iced97aa635613a36cde1af500edda173e12a2ca6
2021-10-25 09:50:49 +08:00
Elaine Zhang
738c7b532a regulator: rk860x: Add binding document for Rockchip Rk860x
Add rk860x-regulator.yaml document for Rockchip Rk860x Buck.

Change-Id: I374a9c3b17f0f9382d7213a5d3a1a8ece9f0ae1d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-10-25 09:35:22 +08:00
Elaine Zhang
f8805c8874 regulator: rk860x: Add RK860X dcdc support
RK860X main features:
    - 2.7V to 5.5V Input Voltage Range;
    - 2.4MHz Constant Switching Frequency;
    - 6A Available Load Current;
    - Programmable Output Voltage: 0.7125V to 1.5V in 12.5mV
      Steps(RK8600/RK8601), 0.5V to 1.5V in 6.25mV(RK8602/RK8603);
    - PFM/PWM Operation for Optimum Increased Efficiency;

Change-Id: Ib564dee94151d42c0288d2141c6b66c70bc019b9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-10-25 09:35:06 +08:00
Kever Yang
28edc30761 ANDROID: GKI: rockchip: Add build script
Add build script for rockchip platform.

Bug: 194515348
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Id848456a233114bb270d1715a7262788bb467b58
2021-10-25 08:57:33 +08:00