Commit Graph

988560 Commits

Author SHA1 Message Date
Kever Yang
f32894eadf ANDROID: GKI: rockchip: update fragment file
Sync the latest fragment file.

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I2e0afd0c4ff7a60b712e642cbe8a914c4407602d
2022-08-19 19:27:37 +00:00
Kever Yang
052619d9e1 ANDROID: GKI: rockchip: Enable symbols bcmdhd-sdio
Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

9 Added functions:

  [A] 'function int mmc_sw_reset(mmc_host*)'
  [A] 'function int pinctrl_generic_add_group(pinctrl_dev*, const char*, int*, int, void*)'
  [A] 'function int pinmux_generic_add_function(pinctrl_dev*, const char*, const char**, const unsigned int, void*)'
  [A] 'function u16 sdio_readw(sdio_func*, unsigned int, int*)'
  [A] 'function void sdio_retune_crc_disable(sdio_func*)'
  [A] 'function void sdio_retune_crc_enable(sdio_func*)'
  [A] 'function void sdio_retune_hold_now(sdio_func*)'
  [A] 'function void sdio_retune_release(sdio_func*)'
  [A] 'function void sdio_writew(sdio_func*, u16, unsigned int, int*)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I5f10fbc9e6b274c11508c10444ec7a31ba73ad71
2022-08-19 19:27:37 +00:00
Kever Yang
4f116d326e ANDROID: GKI: rockchip: Update symbols for rga driver
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 unsigned long int alloc_iova_fast(iova_domain*, unsigned long int, unsigned long int, bool)'
  [A] 'function void free_iova_fast(iova_domain*, unsigned long int, unsigned long int)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ibc5b98459919d94d347f33b8b19a5c3be46c8e9a
2022-08-19 19:27:37 +00:00
Tejun Heo
d1e180148e BACKPORT: cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock
Bringing up a CPU may involve creating and destroying tasks which requires
read-locking threadgroup_rwsem, so threadgroup_rwsem nests inside
cpus_read_lock(). However, cpuset's ->attach(), which may be called with
thredagroup_rwsem write-locked, also wants to disable CPU hotplug and
acquires cpus_read_lock(), leading to a deadlock.

Fix it by guaranteeing that ->attach() is always called with CPU hotplug
disabled and removing cpus_read_lock() call from cpuset_attach().

Bug: 242685775
Change-Id: Ib14746f8e361eac8a1cfb88ae920488d1155d904
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-and-tested-by: Imran Khan <imran.f.khan@oracle.com>
Reported-and-tested-by: Xuewen Yan <xuewen.yan@unisoc.com>
Fixes: 05c7b7a92cc8 ("cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug")
Cc: stable@vger.kernel.org # v5.17+
Link: https://lore.kernel.org/lkml/YvrWaml3F+x9Dk+T@slm.duckdns.org/
Link: https://lore.kernel.org/lkml/20220705123705.764-1-xuewen.yan@unisoc.com/
(cherry picked from commit 4f7e7236435ca0abe005c674ebd6892c6e83aeb3
https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-6.0-fixes)
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-08-19 18:44:41 +00:00
Tejun Heo
ef04c4095d UPSTREAM: cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree
cgroup_update_dfl_csses() write-lock the threadgroup_rwsem as updating the
csses can trigger process migrations. However, if the subtree doesn't
contain any tasks, there aren't gonna be any cgroup migrations. This
condition can be trivially detected by testing whether
mgctx.preloaded_src_csets is empty. Elide write-locking threadgroup_rwsem if
the subtree is empty.

After this optimization, the usage pattern of creating a cgroup, enabling
the necessary controllers, and then seeding it with CLONE_INTO_CGROUP and
then removing the cgroup after it becomes empty doesn't need to write-lock
threadgroup_rwsem at all.

Bug: 242685775
Change-Id: Ifc96030fc7b0655ecd85ef19c52c9ed97e910ffb
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
(cherry picked from commit 671c11f0619e5ccb380bcf0f062f69ba95fc974a
 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git master)
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-08-19 18:44:41 +00:00
Bing Han
15ad83d91f ANDROID: GKI: Update symbol list for transsion
Leaf changes summary: 52 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 26 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 26 Added variables

26 Added functions:

  [A] 'function int __traceiter_android_vh_account_swap_pages(void*, swap_info_struct*, bool*)'
  [A] 'function int __traceiter_android_vh_alloc_si(void*, swap_info_struct**, bool*)'
  [A] 'function int __traceiter_android_vh_alloc_swap_slot_cache(void*, swap_slots_cache*, int*, bool*)'
  [A] 'function int __traceiter_android_vh_count_pswpin(void*, swap_info_struct*)'
  [A] 'function int __traceiter_android_vh_count_pswpout(void*, swap_info_struct*)'
  [A] 'function int __traceiter_android_vh_count_swpout_vm_event(void*, swap_info_struct*, page*, bool*)'
  [A] 'function int __traceiter_android_vh_cow_user_page(void*, vm_fault*, page*)'
  [A] 'function int __traceiter_android_vh_drain_slots_cache_cpu(void*, swap_slots_cache*, unsigned int, bool, bool*)'
  [A] 'function int __traceiter_android_vh_free_pages(void*, page*, unsigned int)'
  [A] 'function int __traceiter_android_vh_free_swap_slot(void*, swp_entry_t, swap_slots_cache*, bool*)'
  [A] 'function int __traceiter_android_vh_get_swap_page(void*, page*, swp_entry_t*, swap_slots_cache*, bool*)'
  [A] 'function int __traceiter_android_vh_handle_pte_fault_end(void*, vm_fault*, unsigned long int)'
  [A] 'function int __traceiter_android_vh_inactive_is_low(void*, unsigned long int, unsigned long int*, lru_list, bool*)'
  [A] 'function int __traceiter_android_vh_init_swap_info_struct(void*, swap_info_struct*, plist_head*)'
  [A] 'function int __traceiter_android_vh_migrate_page_states(void*, page*, page*)'
  [A] 'function int __traceiter_android_vh_page_isolated_for_reclaim(void*, mm_struct*, page*)'
  [A] 'function int __traceiter_android_vh_page_referenced_one_end(void*, vm_area_struct*, page*, int)'
  [A] 'function int __traceiter_android_vh_set_shmem_page_flag(void*, page*)'
  [A] 'function int __traceiter_android_vh_si_swapinfo(void*, swap_info_struct*, bool*)'
  [A] 'function int __traceiter_android_vh_snapshot_refaults(void*, lruvec*)'
  [A] 'function int __traceiter_android_vh_swap_slot_cache_active(void*, bool)'
  [A] 'function int __traceiter_android_vh_swapin_add_anon_rmap(void*, vm_fault*, page*)'
  [A] 'function int __traceiter_android_vh_unuse_swap_page(void*, swap_info_struct*, page*)'
  [A] 'function int __traceiter_android_vh_waiting_for_page_migration(void*, page*)'
  [A] 'function void plist_del(plist_node*, plist_head*)'
  [A] 'function void plist_requeue(plist_node*, plist_head*)'

26 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_account_swap_pages'
  [A] 'tracepoint __tracepoint_android_vh_alloc_si'
  [A] 'tracepoint __tracepoint_android_vh_alloc_swap_slot_cache'
  [A] 'tracepoint __tracepoint_android_vh_count_pswpin'
  [A] 'tracepoint __tracepoint_android_vh_count_pswpout'
  [A] 'tracepoint __tracepoint_android_vh_count_swpout_vm_event'
  [A] 'tracepoint __tracepoint_android_vh_cow_user_page'
  [A] 'tracepoint __tracepoint_android_vh_drain_slots_cache_cpu'
  [A] 'tracepoint __tracepoint_android_vh_free_pages'
  [A] 'tracepoint __tracepoint_android_vh_free_swap_slot'
  [A] 'tracepoint __tracepoint_android_vh_get_swap_page'
  [A] 'tracepoint __tracepoint_android_vh_handle_pte_fault_end'
  [A] 'tracepoint __tracepoint_android_vh_inactive_is_low'
  [A] 'tracepoint __tracepoint_android_vh_init_swap_info_struct'
  [A] 'tracepoint __tracepoint_android_vh_migrate_page_states'
  [A] 'tracepoint __tracepoint_android_vh_page_isolated_for_reclaim'
  [A] 'tracepoint __tracepoint_android_vh_page_referenced_one_end'
  [A] 'tracepoint __tracepoint_android_vh_set_shmem_page_flag'
  [A] 'tracepoint __tracepoint_android_vh_si_swapinfo'
  [A] 'tracepoint __tracepoint_android_vh_snapshot_refaults'
  [A] 'tracepoint __tracepoint_android_vh_swap_slot_cache_active'
  [A] 'tracepoint __tracepoint_android_vh_swapin_add_anon_rmap'
  [A] 'tracepoint __tracepoint_android_vh_unuse_swap_page'
  [A] 'tracepoint __tracepoint_android_vh_waiting_for_page_migration'
  [A] 'atomic_long_t nr_swap_pages'
  [A] 'unsigned long int zero_pfn'

Bug: 234214858
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: I7e1764ee1bbd2e44bb67933024d89520ba48da22
2022-08-19 15:01:45 +00:00
Bing Han
a47fb6a9ae ANDROID: vendor_hook: Add hook in __free_pages()
This reverts commit eb99e6d80e

The hook android_vh_free_pages is deleted, due to the symbol is
not added to the abi list. The symbol is added to the abi list in
patch:2183484. This patch is to add the hook android_vh_free_pages
again.

Bug: 234214858
Bug: 203756332
Cc: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: I2c97ea4d310e2004b94d891678127c17f7b07c93
2022-08-19 15:01:45 +00:00
Bing Han
6c56a05b87 ANDROID: vendor_hooks: Add hooks to extend the struct swap_info_struct
This reverts commit: d0590b99c9

The hooks android_vh_init_swap_info_struct and android_vh_alloc_si
are deleted, due to the symbols are not added to the abi list. The
symbols are added to the abi list in patch:2183484. This patch is to
add the hooks android_vh_init_swap_info_struct and android_vh_alloc_si
again.

Bug: 234214858
Bug: 203756332
Cc: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: Id5524a726d213c5eab55570fd28d28da978974e7
2022-08-19 15:01:45 +00:00
Bing Han
7449d8120a ANDROID: vendor_hook: Add hook in si_swapinfo()
This reverts commit 86be1a3d9f

The hook android_vh_si_swapinfo is deleted, due to the symbol
is not added to the abi list. The symbol is added to the abi
list in patch:2183484. This patch is to add the hook
android_vh_si_swapinfo again.

Bug: 234214858
Bug: 203756332
Cc: Greg Kroah-Hartman <gregkh@google.com>
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: Ifd1e05f44ac04b67816618139badd5c2ee786b50
2022-08-19 15:01:45 +00:00
Peifeng Li
7ff95bd758 ANDROID: GKI: Update symbols to symbol list
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added variables

4 Added functions:

  [A] 'function int __traceiter_android_vh_record_mutex_lock_starttime(void*, task_struct*, unsigned long int)'
  [A] 'function int __traceiter_android_vh_record_percpu_rwsem_lock_starttime(void*, task_struct*, unsigned long int)'
  [A] 'function int __traceiter_android_vh_record_rtmutex_lock_starttime(void*, task_struct*, unsigned long int)'
  [A] 'function int __traceiter_android_vh_record_rwsem_lock_starttime(void*, task_struct*, unsigned long int)'

4 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_record_mutex_lock_starttime'
  [A] 'tracepoint __tracepoint_android_vh_record_percpu_rwsem_lock_starttime'
  [A] 'tracepoint __tracepoint_android_vh_record_rtmutex_lock_starttime'
  [A] 'tracepoint __tracepoint_android_vh_record_rwsem_lock_starttime'

Bug: 193384408
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ia5acf188732440ca70795f0afb3298e4f9d6eb8a
2022-08-19 02:54:17 +00:00
Elliot Berman
04c766fa76 ANDROID: Use rq_clock_task without CONFIG_SMP
Fix build error caused by guarding rq_clock_task_mult with CONFIG_SMP.

Issue was not seen in original commit as test case was UM Linux, which
does not enable CONFIG_CFS_BANDWIDTH.

>> kernel/sched/fair.c:4791:40: error: implicit declaration of function 'rq_clock_task_mult' [-Werror,-Wimplicit-function-declaration]
                   cfs_rq->throttled_clock_task_time += rq_clock_task_mult(rq) -

Change-Id: Id3392c37ba1b2bfe78c89bc4b1ca01b920164a35
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 567d65e536 ("ANDROID: Guard rq_clock_task_mult with CONFIG_SMP")
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-08-18 21:33:48 +00:00
Sarannya S
4e13870877 ANDROID: abi_gki_aarch64_qcom: Add skb and scatterlist helpers
Add sg_miter_skip, skb_copy_datagram_from_iter and sock_alloc_send_pskb
to the symbol list. These functions will be used in qrtr to handle
fragmented skbs.

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

3 Added functions:

  [A] 'function bool sg_miter_skip(sg_mapping_iter*, off_t)'
  [A] 'function int skb_copy_datagram_from_iter(sk_buff*, int, iov_iter*, int)'
  [A] 'function sk_buff* sock_alloc_send_pskb(sock*, unsigned long int, unsigned long int, int, int*, int)'

Bug: 232287599
Change-Id: I5bebdebb833f3ff78f89e67aaca578b9c6c86259
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
2022-08-18 19:41:14 +05:30
Greg Kroah-Hartman
86be1a3d9f Revert "ANDROID: vendor_hook: Add hook in si_swapinfo()"
This reverts commit ed2b11d639.

The hook android_vh_si_swapinfo is not used by any vendor, so remove it
to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 234214858
Cc: Bing Han <bing.han@transsion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib474a0911dd97d54d2f086258e9d53ddd3451967
2022-08-17 07:58:13 +02:00
Greg Kroah-Hartman
40b3533213 Revert "ANDROID: vendor_hooks:vendor hook for pidfd_open"
This reverts commit 242b11e574.

The hook android_vh_pidfd_open is not used by any vendor, so remove it
to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 238725692
Cc: xiaofeng <xiaofeng5@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I77afe002bebc3b3e97ea7a28faae74e9cb8a6718
2022-08-17 07:58:13 +02:00
Greg Kroah-Hartman
d0590b99c9 Revert "ANDROID: vendor_hooks: Add hooks to extend the struct swap_info_struct"
This reverts commit 667f0d71dc.

The hooks android_vh_init_swap_info_struct and android_vh_alloc_si are
not used by any vendor, so remove it to help with merge issues with
future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 234214858
Cc: Bing Han <bing.han@transsion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If01c284ebf15e804e7cf34e854b7db0d5b68ae1b
2022-08-17 07:58:13 +02:00
Greg Kroah-Hartman
501063ce66 Revert "ANDROID: vendor_hooks:vendor hook for mmput"
This reverts commit 8b19ed264b.

The hook android_vh_mmput is not used by any vendor, so remove it to
help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 238821038
Cc: xiaofeng <xiaofeng5@xiaomi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idd40f231640723d2342a9dbac7e9206a800e82dd
2022-08-17 05:54:29 +00:00
Peifeng Li
23fdb24a48 ANDROID: GKI: Update symbols to symbol list
Leaf changes summary: 11 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 5 Added variables

6 Added functions:

  [A] 'function int __traceiter_android_vh_do_page_trylock(void*, page*, rw_semaphore*, bool*, bool*)'
  [A] 'function int __traceiter_android_vh_handle_failed_page_trylock(void*, list_head*)'
  [A] 'function int __traceiter_android_vh_page_trylock_clear(void*, page*)'
  [A] 'function int __traceiter_android_vh_page_trylock_get_result(void*, page*, bool*)'
  [A] 'function int __traceiter_android_vh_page_trylock_set(void*, page*)'
  [A] 'function unsigned long int reclaim_pages(list_head*)'

5 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_do_page_trylock'
  [A] 'tracepoint __tracepoint_android_vh_handle_failed_page_trylock'
  [A] 'tracepoint __tracepoint_android_vh_page_trylock_clear'
  [A] 'tracepoint __tracepoint_android_vh_page_trylock_get_result'
  [A] 'tracepoint __tracepoint_android_vh_page_trylock_set'

Bug: 193384408

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I46e420a9e74fe67d37107a28e7f94148a4434b21
2022-08-16 21:29:50 +00:00
Elliot Berman
567d65e536 ANDROID: Guard rq_clock_task_mult with CONFIG_SMP
rq->cpu only exists on CONFIG_SMP builds. PELT only needs to support
SMP-enabled builds, so guard rq_clock_task_mult with CONFIG_SMP to
support compilation of kernel without CONFIG_SMP enabled.

Change-Id: I7779f5b10b44757dfd4cbc159b6ae3f3f1ddf3e7
Fixes: 9377277724 ("ANDROID: sched: Introducing PELT multiplier")
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
2022-08-16 19:27:30 +00:00
Greg Kroah-Hartman
eb99e6d80e Revert "ANDROID: vendor_hook: Add hook in __free_pages()"
This reverts commit 01680ae117.

The hook android_vh_free_pages is not used by any vendor, so remove it
to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 234214858
Cc: Bing Han <bing.han@transsion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I36d4bfb83e1605c6fd1f9ff8dcd39cdbcdef8760
2022-08-16 18:05:09 +00:00
Greg Kroah-Hartman
8d86846781 Revert "ANDROID: vendor_hooks: Add hooks for binder"
This reverts commit acefa91e51.

The hooks trace_android_vh_binder_proc_transaction_entry and
trace_android_vh_binder_select_worklist_ilocked are not used by any
vendor, so remove it to help with merge issues with future LTS releases.

If this is needed by any real user, it can easily be reverted to add it
back and then the symbol should be added to the abi list at the same
time to prevent it from being removed again later.

Bug: 203756332
Bug: 219898723
Cc: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2c04e60fa9d6eb6d85be7882d12f1b70956b8e80
2022-08-16 18:05:09 +00:00
Peifeng Li
eed2741ae6 ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler
Providing vendor hooks to record the start time of holding the lock, which
protects rwsem/mutex locking-process from being preemptedfor a short time
in some cases.

- android_vh_record_mutex_lock_starttime
- android_vh_record_rtmutex_lock_starttime
- android_vh_record_rwsem_lock_starttime
- android_vh_record_percpu_rwsem_lock_starttime

Bug: 241191475

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0e967a1e8b77c32a1ad588acd54028fae2f90c4e
2022-08-16 11:24:12 +00:00
Peifeng Li
fb39cdb9ea ANDROID: export reclaim_pages
export reclaim_pages to support to reclaim pages in drivers-page-list.

Bug: 240003372
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: If92ed66ec9ce9dd66565497e6774d89911652429
2022-08-15 15:51:29 +00:00
Peifeng Li
1f8f6d59a2 ANDROID: vendor_hook: Add hook to not be stuck ro rmap lock in kswapd or direct_reclaim
Add hooks to support trylock in rmaplock when reclaiming in kswapd or
direct_reclaim, in order to avoid wait lock for a long time.

- android_vh_handle_failed_page_trylock
- android_vh_page_trylock_set
- android_vh_page_trylock_clear
- android_vh_page_trylock_get_result
- android_vh_do_page_trylock

Bug: 240003372

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0f605b35ae41f15b3ca7bc72cd5f003175c318a5
2022-08-14 23:08:07 +08:00
Seiya Wang
91bfc78bc0 ANDROID: Update symbol list for mtk
Leaf changes summary: 6 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

6 Added functions:

  [A] 'function void __dev_kfree_skb_irq(sk_buff*, skb_free_reason)'
  [A] 'function net_device* devm_alloc_etherdev_mqs(device*, int, unsigned int, unsigned int)'
  [A] 'function mii_bus* devm_mdiobus_alloc_size(device*, int)'
  [A] 'function int devm_of_mdiobus_register(device*, mii_bus*, device_node*)'
  [A] 'function int devm_register_netdev(device*, net_device*)'
  [A] 'function int regmap_test_bits(regmap*, unsigned int, unsigned int)'

Bug: 242251789
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
Change-Id: I9f9a384e1135adf11cc7336beb29a40b68650f94
2022-08-12 14:12:01 +08:00
Kever Yang
02df0b2661 ANDROID: GKI: rockchip: Add symbols for crypto
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 8 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

8 Added functions:

  [A] 'function int crypto_ahash_final(ahash_request*)'
  [A] 'function crypto_akcipher* crypto_alloc_akcipher(const char*, u32, u32)'
  [A] 'function int crypto_register_akcipher(akcipher_alg*)'
  [A] 'function void crypto_unregister_akcipher(akcipher_alg*)'
  [A] 'function int des_expand_key(des_ctx*, const unsigned char*, unsigned int)'
  [A] 'function int rsa_parse_priv_key(rsa_key*, void*, unsigned int)'
  [A] 'function int rsa_parse_pub_key(rsa_key*, void*, unsigned int)'
  [A] 'function int sg_nents(scatterlist*)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I5bc749ad2b6b99065d88a235c58efc7e44106ec6
2022-08-11 20:12:02 +08:00
Kever Yang
efdf581d14 ANDROID: GKI: rockchip: Add symbol pci_disable_link_state
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function int pci_disable_link_state(pci_dev*, int)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ie6c80e92fa1603f575595464f0ff8df04bd51f2a
2022-08-11 20:12:01 +08:00
Kever Yang
504ce2d3a6 ANDROID: GKI: rockchip: Add symbols for sound
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function int snd_soc_dapm_force_bias_level(snd_soc_dapm_context*, snd_soc_bias_level)'
  [A] 'function int snd_soc_jack_add_zones(snd_soc_jack*, int, snd_soc_jack_zone*)'
  [A] 'function int snd_soc_jack_get_type(snd_soc_jack*, int)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ib4245f28716e4c68c3e04205421aa8bb9910576b
2022-08-11 20:12:01 +08:00
Kever Yang
a6b6bc98b7 ANDROID: GKI: rockchip: Add symbols for video
Leaf changes summary: 9 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

9 Added functions:

  [A] 'function int __v4l2_ctrl_handler_setup(v4l2_ctrl_handler*)'
  [A] 'function bool disable_hardirq(unsigned int)'
  [A] 'function ssize_t iio_read_const_attr(device*, device_attribute*, char*)'
  [A] 'function platform_device* of_device_alloc(device_node*, const char*, device*)'
  [A] 'function int v4l2_enum_dv_timings_cap(v4l2_enum_dv_timings*, const v4l2_dv_timings_cap*, v4l2_check_dv_timings_fnc*, void*)'
  [A] 'function void v4l2_print_dv_timings(const char*, const char*, const v4l2_dv_timings*, bool)'
  [A] 'function int v4l2_src_change_event_subdev_subscribe(v4l2_subdev*, v4l2_fh*, v4l2_event_subscription*)'
  [A] 'function void v4l2_subdev_notify_event(v4l2_subdev*, const v4l2_event*)'
  [A] 'function bool v4l2_valid_dv_timings(const v4l2_dv_timings*, const v4l2_dv_timings_cap*, v4l2_check_dv_timings_fnc*, void*)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I79d421eb9afdb774992fe0ea8c403d7d97e3afe2
2022-08-11 20:12:01 +08:00
Jaegeuk Kim
f3a311b456 BACKPORT: f2fs: do not set compression bit if kernel doesn't support
If kernel doesn't have CONFIG_F2FS_FS_COMPRESSION, a file having FS_COMPR_FL via
ioctl(FS_IOC_SETFLAGS) is unaccessible due to f2fs_is_compress_backend_ready().
Let's avoid it.

Bug: 240921972
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 376523b97c005fa57bb2f8e70f61ab965f16e160)
Change-Id: Ieb0f8945175ea5ccb0060690e882f054360fb8f0
2022-08-11 06:12:24 +00:00
liujinbao1
b0988144b0 UPSTREAM: exfat: improve performance of exfat_free_cluster when using dirsync mount
There are stressful update of cluster allocation bitmap when using
dirsync mount option which is doing sync buffer on every cluster bit
clearing. This could result in performance degradation when deleting
big size file.
Fix to update only when the bitmap buffer index is changed would make
less disk access, improving performance especially for truncate operation.

Testing with Samsung 256GB sdcard, mounted with dirsync option
(mount -t exfat /dev/block/mmcblk0p1 /temp/mount -o dirsync)

Remove 4GB file, blktrace result.
[Before] : 39 secs.
Total (blktrace):
 Reads Queued:      0,        0KiB   Writes Queued:      32775,    16387KiB
 Read Dispatches:   0,        0KiB   Write Dispatches:   32775,    16387KiB
 Reads Requeued:    0                Writes Requeued:        0
 Reads Completed:   0,        0KiB   Writes Completed:   32775,    16387KiB
 Read Merges:       0,        0KiB   Write Merges:           0,        0KiB
 IO unplugs:        2                Timer unplugs:          0

[After] : 1 sec.
Total (blktrace):
 Reads Queued:      0,        0KiB   Writes Queued:         13,        6KiB
 Read Dispatches:   0,        0KiB   Write Dispatches:      13,        6KiB
 Reads Requeued:    0                Writes Requeued:        0
 Reads Completed:   0,        0KiB   Writes Completed:      13,        6KiB
 Read Merges:       0,        0KiB   Write Merges:           0,        0KiB
 IO unplugs:        1                Timer unplugs:          0

Bug: 241198061

Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
(cherry picked from commit f728760aa923f1dd3a4818368dbdbd2c7d63b370)

Signed-off-by: liujinbao1 <liujinbao1@xiaomi.com>
Change-Id: I3931f005491c17489f5950293783270eb888fb09
Signed-off-by: liujinbao1 <liujinbao1@xiaomi.com>
2022-08-11 01:57:43 +00:00
Kever Yang
00d3b8c0cc ANDROID: GKI: rockchip: Add symbols for drm dp
Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 Added functions:

  [A] 'function edid* drm_bridge_get_edid(drm_bridge*, drm_connector*)'
  [A] 'function int drm_dp_read_desc(drm_dp_aux*, drm_dp_desc*, bool)'
  [A] 'function int drm_dp_read_sink_count(drm_dp_aux*)'
  [A] 'function bool drm_probe_ddc(i2c_adapter*)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I3d07fdd9c0e03ee4b631eb3026e6d2063bf16df9
2022-08-10 16:00:28 +00:00
Robin Murphy
936f1e35d1 UPSTREAM: arm64: perf: Support new DT compatibles
Wire up the new DT compatibles so we can present appropriate
PMU names to userspace for the latest and greatest CPUs.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/62d14ba12d847ec7f1fba7cb0b3b881b437e1cc5.1639490264.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 893c34b60a59cd0bdb496084f5c096be720bd244)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 238597093
Change-Id: I7aef375698c5192d4adbf551cae3ea9f8027f101
2022-08-10 09:14:56 +01:00
Robin Murphy
ed931dc8ff UPSTREAM: arm64: perf: Simplify registration boilerplate
With the trend for per-core events moving to userspace JSON, registering
names for PMUv3 implementations is increasingly a pure boilerplate
exercise. Let's wrap things a step further so we can generate the basic
PMUv3 init function with a macro invocation, and reduce further new
addition to just 2 lines each.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/b79477ea3b97f685d00511d4ecd2f686184dca34.1639490264.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit 6ac9f30bd43baf9e05696e9a614fcd7e83c74afa)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 238597093
Change-Id: I635d3978555c84b4234b6a791c8012ad4f5170c4
2022-08-10 09:14:56 +01:00
Thierry Reding
bb6c018ab6 UPSTREAM: arm64: perf: Support Denver and Carmel PMUs
Add support for the NVIDIA Denver and Carmel PMUs using the generic
PMUv3 event map for now.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
[ rm: reorder entries alphabetically ]
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/5f0f69d47acca78a9e479501aa4d8b429e23cf11.1639490264.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit d4c4844a9b47dc1c7e8ccce0cdd899602f5479fd)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 238597093
Change-Id: I078644d2bb973fb7bd6777ad0bb702c430c05967
2022-08-10 09:14:56 +01:00
Seiya Wang
d306fd9d47 UPSTREAM: arm64: perf: add support for Cortex-A78
Add support for Cortex-A78 using generic PMUv3 for now.

Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210203055348.4935-2-seiya.wang@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit db2bb91f2e8e73d85876d1665608e834d91d21ee)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 238597093
Change-Id: I8c695a7625216cb8dc08dab4e3dd8734cd12254d
2022-08-10 09:14:55 +01:00
Kever Yang
09f78c3f7e ANDROID: GKI: rockchip: Update symbol for devfreq
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function void dev_pm_opp_unregister_set_opp_helper(opp_table*)'
  [A] 'function unsigned int regulator_get_linear_step(regulator*)'
  [A] 'function int regulator_suspend_enable(regulator_dev*, suspend_state_t)'

Bug: 239396464
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I29bbba8070312fef5877c5b7c301623c93271ac6
2022-08-09 14:27:04 +08:00
Kever Yang
e7ed66854e ANDROID: GKI: rockchip: Update symbols for drm
Leaf changes summary: 8 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 8 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

8 Added functions:

  [A] 'function long long unsigned int drm_format_info_min_pitch(const drm_format_info*, int, unsigned int)'
  [A] 'function int drm_mm_reserve_node(drm_mm*, drm_mm_node*)'
  [A] 'function ssize_t hdmi_avi_infoframe_pack_only(const hdmi_avi_infoframe*, void*, size_t)'
  [A] 'function bool mipi_dsi_packet_format_is_short(u8)'
  [A] 'function int snd_pcm_create_iec958_consumer_default(u8*, size_t)'
  [A] 'function int snd_pcm_fill_iec958_consumer(snd_pcm_runtime*, u8*, size_t)'
  [A] 'function int snd_pcm_fill_iec958_consumer_hw_params(snd_pcm_hw_params*, u8*, size_t)'
  [A] 'function void tcpm_tcpc_reset(tcpm_port*)'

Bug: 239396464

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ia21a2437d2e86783948d75d400c96e45651cdd65
2022-08-09 14:27:04 +08:00
Peifeng Li
a3e70ff5bf ANDROID: GKI: Update symbols to symbol list
Leaf changes summary: 17 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, 7 Added variables

10 Added functions:

  [A] 'function int __page_mapcount(page*)'
  [A] 'function int __traceiter_android_vh_add_page_to_lrulist(void*, page*, bool, lru_list)'
  [A] 'function int __traceiter_android_vh_del_page_from_lrulist(void*, page*, bool, lru_list)'
  [A] 'function int __traceiter_android_vh_do_traversal_lruvec(void*, lruvec*)'
  [A] 'function int __traceiter_android_vh_mark_page_accessed(void*, page*)'
  [A] 'function int __traceiter_android_vh_page_should_be_protected(void*, page*, bool*)'
  [A] 'function int __traceiter_android_vh_show_mapcount_pages(void*, void*)'
  [A] 'function int __traceiter_android_vh_update_page_mapcount(void*, page*, bool, bool, bool*, bool*)'
  [A] 'function void do_traversal_all_lruvec()'
  [A] 'function lruvec* page_to_lruvec(page*, pg_data_t*)'

7 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_add_page_to_lrulist'
  [A] 'tracepoint __tracepoint_android_vh_del_page_from_lrulist'
  [A] 'tracepoint __tracepoint_android_vh_do_traversal_lruvec'
  [A] 'tracepoint __tracepoint_android_vh_mark_page_accessed'
  [A] 'tracepoint __tracepoint_android_vh_page_should_be_protected'
  [A] 'tracepoint __tracepoint_android_vh_show_mapcount_pages'
  [A] 'tracepoint __tracepoint_android_vh_update_page_mapcount'

Bug: 193384408
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I13191de69a284241056cafc0e9100e5c7c72d272
2022-08-08 21:17:17 +00:00
Jiapeng Chong
a09241c6dd UPSTREAM: ASoC: hdmi-codec: make hdmi_codec_controls static
This symbol is not used outside of hdmi-codec.c, so marks it static.

Fix the following sparse warning:

sound/soc/codecs/hdmi-codec.c:750:25: warning: symbol
'hdmi_codec_controls' was not declared. Should it be static?

Bug: 239396464
Change-Id: I6569284ef557fee683afb9031e5cc1b5684a1c30
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1623822941-3077-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit e99d7c69fd4c18e7319f8aab8e252b12130796bf)
2022-08-08 17:51:50 +00:00
Maxime Ripard
9eda09e511 UPSTREAM: ASoC: hdmi-codec: Add a prepare hook
The IEC958 status bit is usually set by the userspace after hw_params
has been called, so in order to use whatever is set by the userspace, we
need to implement the prepare hook. Let's add it to the hdmi_codec_ops,
and mandate that either prepare or hw_params is implemented.

Bug: 239396464
Change-Id: I06ccde5d8185955bb60783b597f0205811460968
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-6-maxime@cerno.tech
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 2fef64eec23a0840c97977b16dd8919afaffa876)
2022-08-08 17:51:50 +00:00
Maxime Ripard
4ad97b395f UPSTREAM: ASoC: hdmi-codec: Add iec958 controls
The IEC958 status bits can be exposed and modified by the userspace
through dedicated ALSA controls.

This patch implements those controls for the hdmi-codec driver. It
relies on a default value being setup at probe time that can later be
overridden by the control put.

The hw_params callback is then called with a buffer filled with the
proper bits for the current parameters being passed on so the underlying
driver can just reuse those bits as is.

Bug: 239396464
Change-Id: I99f37b7e74655687e73a75ba19fd2de8041f8646
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-5-maxime@cerno.tech
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 7a8e1d44211e16eb394b7b9e0b236ee1503a3ad3)
2022-08-08 17:51:50 +00:00
Maxime Ripard
c0c2f6962d UPSTREAM: ASoC: hdmi-codec: Rework to support more controls
We're going to add more controls to support the IEC958 output, so let's
rework the control registration a bit to support more of them.

Bug: 239396464
Change-Id: Ia8c0bf8c997638b5a121ae7356fa1eb27746036f
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-4-maxime@cerno.tech
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 366b45b974481bea9603843d308aded519aab7dc)
2022-08-08 17:51:50 +00:00
Maxime Ripard
4c6eb3db8a UPSTREAM: ALSA: iec958: Split status creation and fill
In some situations, like a codec probe, we need to provide an IEC status
default but don't have access to the sampling rate and width yet since
no stream has been configured yet.

Each and every driver has its own default, whereas the core iec958 code
also has some buried in the snd_pcm_create_iec958_consumer functions.

Let's split these functions in two to provide a default that doesn't
rely on the sampling rate and width, and another function to fill them
when available.

Bug: 239396464
Change-Id: I277899145367b219b337bc796f2faee8c4917082
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210525132354.297468-3-maxime@cerno.tech
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 9eafc11f921b8cb7d7e28ab1fdcf6b92fcbcb0be)
2022-08-08 17:51:50 +00:00
Maxime Ripard
580d2e7c78 UPSTREAM: ALSA: doc: Clarify IEC958 controls iface
The doc currently mentions that the IEC958 Playback Default should be
exposed on the PCM iface, and the Playback Mask on the mixer iface.

It's a bit confusing to advise to have two related controls on two
separate ifaces, and it looks like the drivers that currently expose
those controls use any combination of the mixer and PCM ifaces.

Let's try to clarify the situation a bit, and encourage to at least have
the controls on the same iface.

Bug: 239396464
Change-Id: Ie0fb033564972f74154c378c644c581dc4d06dfa
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210525132354.297468-2-maxime@cerno.tech
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit aa7899537a4ec63ac3d58c9ece945c2750d22168)
2022-08-08 17:51:50 +00:00
Pierre-Louis Bossart
8b4bb1bca0 UPSTREAM: ASoC: hdmi-codec: remove unused spk_mask member
fix cppcheck warning:

sound/soc/codecs/hdmi-codec.c:25:16: style: struct member
'hdmi_codec_channel_map_table::spk_mask' is never
used. [unusedStructMember]
 unsigned long spk_mask;  /* speaker position bit mask */
               ^

Bug: 239396464
Change-Id: I235b7757db88bfbd059ad0f9795908fbfbb1cfdb
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210312182246.5153-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 9ad869fee5c598d914fa5cf8fb26f5e106e90956)
2022-08-08 17:51:50 +00:00
Pierre-Louis Bossart
5a2c4a5d1e UPSTREAM: ASoC: hdmi-codec: remove useless initialization
Fix cppcheck warning:

sound/soc/codecs/hdmi-codec.c:745:5: style: Redundant initialization
for 'cf'. The initialized value is overwritten before it is
read. [redundantInitialization]
 cf = dai->playback_dma_data;
    ^
sound/soc/codecs/hdmi-codec.c:738:31: note: cf is initialized
 struct hdmi_codec_daifmt *cf = dai->playback_dma_data;
                              ^
sound/soc/codecs/hdmi-codec.c:745:5: note: cf is overwritten
 cf = dai->playback_dma_data;
    ^

Bug: 239396464
Change-Id: Ia903635862e043207929827afcaeb531e6344283
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210312182246.5153-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 3c011ef344cddd15be0a9b2256f7886f6b5eeec5)
2022-08-08 17:51:50 +00:00
Sia Jee Heng
49e502f0c0 UPSTREAM: ASoC: codec: hdmi-codec: Support IEC958 encoded PCM format
Existing hdmi-codec driver only support standard pcm format.
Support of IEC958 encoded format pass from ALSA IEC958 plugin is needed
so that the IEC958 encoded data can be streamed to the HDMI chip.

Bug: 239396464
Change-Id: I01516e34605e380995b5312273035a0d000d36f1
Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
Link: https://lore.kernel.org/r/20210204014258.10197-2-jee.heng.sia@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 28785f548d18e6d52785a1172e5c176784ce74cd)
2022-08-08 17:51:50 +00:00
Stephan Gerhold
9bf69acb92 UPSTREAM: ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack()
Sound is broken on the DragonBoard 410c (apq8016_sbc) since 5.10:

  hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95
  qcom-apq8016-sbc 7702000.sound: Failed to set jack: -95
  ADV7533: ASoC: error at snd_soc_link_init on ADV7533: -95
  hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95
  qcom-apq8016-sbc: probe of 7702000.sound failed with error -95

This happens because apq8016_sbc calls snd_soc_component_set_jack() on
all codec DAIs and attempts to ignore failures with return code -ENOTSUPP.
-ENOTSUPP is also excluded from error logging in soc_component_ret().

However, hdmi_codec_set_jack() returns -E*OP*NOTSUPP if jack detection
is not supported, which is not handled in apq8016_sbc and soc_component_ret().
Make it return -ENOTSUPP instead to fix sound and silence the errors.

Bug: 239396464
Change-Id: Id38ce1cdfc80daaac7d77212cecd29dd6fa4e877
Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 55c5cc63ab ("ASoC: hdmi-codec: Use set_jack ops to set jack")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210107165131.2535-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 2a0435df963f996ca870a2ef1cbf1773dc0ea25a)
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-08-08 17:51:50 +00:00
Shengjiu Wang
056409c7dc UPSTREAM: ASoC: hdmi-codec: Add RX support
HDMI interface can also be used as receiver, this patch is to
add such support. The most difference compare with TX is that RX
don't need to get edid information.

Bug: 239396464
Change-Id: Ib5f9f347cd50abe95fa9c8a4856bd1a91117ca67
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1606372608-2329-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 144f836646989783cb018d00fa69f3f8dab58349)
2022-08-08 17:51:50 +00:00
Cheng-Yi Chiang
5e75deab3a UPSTREAM: ASoC: hdmi-codec: Get ELD in before reporting plugged event
In plugged callback, ELD should be updated from display driver so that
user space can query information from ELD immediately after receiving jack
plugged event.

When jack is unplugged, clear ELD buffer so that user space does not get
obsolete information of unplugged HDMI.

Bug: 239396464
Change-Id: I2245de6e6f7dbc64863267db864dafdd3af95747
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20201118043852.1338877-1-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 25ce4f2b3593fa6bba70ddabbd2ee297b262784f)
2022-08-08 17:51:50 +00:00