Skip to content

arm64: dts: qcom: sdm429: Add audio support for the Lenovo Tab M10 HD (TBX505X) - #53

Open
Kaloyan501 wants to merge 4 commits into
msm89x7-mainline:msm89x7/7.1.3from
Kaloyan501:tbx505x-audio-clean
Open

arm64: dts: qcom: sdm429: Add audio support for the Lenovo Tab M10 HD (TBX505X)#53
Kaloyan501 wants to merge 4 commits into
msm89x7-mainline:msm89x7/7.1.3from
Kaloyan501:tbx505x-audio-clean

Conversation

@Kaloyan501

Copy link
Copy Markdown

No description provided.

@Kaloyan501 Kaloyan501 changed the title tbx505x: add audio support arm64: dts: qcom: sdm429: Add audio support for the Lenovo Tab M10 HD (TBX505X) Jun 19, 2026
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 3 times, most recently from 44dd635 to 20c0e71 Compare June 19, 2026 22:51
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
Comment thread drivers/mfd/qcom-spmi-pmic.c Outdated
Comment thread arch/arm64/boot/dts/qcom/pm8953.dtsi Outdated
Comment thread arch/arm64/boot/dts/qcom/sdm429-lenovo-tbx505x.dts Outdated
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 3 times, most recently from cf5c493 to 3b5f4b1 Compare June 20, 2026 20:45
@Kaloyan501
Kaloyan501 requested a review from barni2000 June 20, 2026 20:46
@Kaloyan501

Copy link
Copy Markdown
Author

@barni2000 Fixed what I could, but I have some questions on your comments.

@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch from 2ff5708 to 3b5f4b1 Compare June 20, 2026 22:58
@Kaloyan501

Copy link
Copy Markdown
Author

Had a big regression with the changes, sound device is not detected anymore, lemme investigate.

@Kaloyan501

Copy link
Copy Markdown
Author

@barni2000 Regressions have been fixed.

@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 12 times, most recently from f815434 to b54127c Compare June 21, 2026 21:53
@barni2000

Copy link
Copy Markdown
Collaborator

Please rebase on 7.1.3 branch

@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch from 5bca152 to b26b1c9 Compare July 19, 2026 19:07
Kaloyan501 pushed a commit to Kaloyan501/linux_msm89x7 that referenced this pull request Jul 19, 2026
powerpc uses pt_frag_refcount as a reference counter for tracking it's
pte and pmd page table fragments. For PTE table, in case of Hash with
64K pagesize, we have 16 fragments of 4K size in one 64K page.

Patch series [1] "mm: free retracted page table by RCU"
added pte_free_defer() to defer the freeing of PTE tables when
retract_page_tables() is called for madvise MADV_COLLAPSE on shmem
range.
[1]: https://lore.kernel.org/all/7cd843a9-aa80-14f-5eb2-33427363c20@google.com/

pte_free_defer() sets the active flag on the corresponding fragment's
folio & calls pte_fragment_free(), which reduces the pt_frag_refcount.
When pt_frag_refcount reaches 0 (no active fragment using the folio), it
checks if the folio active flag is set, if set, it calls call_rcu to
free the folio, it the active flag is unset then it calls pte_free_now().

Now, this can lead to following problem in a corner case...

[  265.351553][  T183] BUG: Bad page state in process a.out  pfn:20d62
[  265.353555][  T183] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20d62
[  265.355457][  T183] flags: 0x3ffff800000100(active|node=0|zone=0|lastcpupid=0x7ffff)
[  265.358719][  T183] raw: 003ffff800000100 0000000000000000 5deadbeef0000122 0000000000000000
[  265.360177][  T183] raw: 0000000000000000 c0000000119caf58 00000000ffffffff 0000000000000000
[  265.361438][  T183] page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
[  265.362572][  T183] Modules linked in:
[  265.364622][  T183] CPU: 0 UID: 0 PID: 183 Comm: a.out Not tainted 6.18.0-rc3-00141-g1ddeaaace7ff-dirty msm89x7-mainline#53 VOLUNTARY
[  265.364785][  T183] Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected) 0x801200 0xf000006 of:SLOF,git-ee03ae pSeries
[  265.364908][  T183] Call Trace:
[  265.364955][  T183] [c000000011e6f7c0] [c000000001cfaa18] dump_stack_lvl+0x130/0x148 (unreliable)
[  265.365202][  T183] [c000000011e6f7f0] [c000000000794758] bad_page+0xb4/0x1c8
[  265.365384][  T183] [c000000011e6f890] [c00000000079c020] __free_frozen_pages+0x838/0xd08
[  265.365554][  T183] [c000000011e6f980] [c0000000000a70ac] pte_frag_destroy+0x298/0x310
[  265.365729][  T183] [c000000011e6fa30] [c0000000000aa764] arch_exit_mmap+0x34/0x218
[  265.365912][  T183] [c000000011e6fa80] [c000000000751698] exit_mmap+0xb8/0x820
[  265.366080][  T183] [c000000011e6fc30] [c0000000001b1258] __mmput+0x98/0x300
[  265.366244][  T183] [c000000011e6fc80] [c0000000001c81f8] do_exit+0x470/0x1508
[  265.366421][  T183] [c000000011e6fd70] [c0000000001c95e4] do_group_exit+0x88/0x148
[  265.366602][  T183] [c000000011e6fdc0] [c0000000001c96ec] pid_child_should_wake+0x0/0x178
[  265.366780][  T183] [c000000011e6fdf0] [c00000000003a270] system_call_exception+0x1b0/0x4e0
[  265.366958][  T183] [c000000011e6fe50] [c00000000000d05c] system_call_vectored_common+0x15c/0x2ec

The bad page state error occurs when such a folio gets freed (with
active flag set), from do_exit() path in parallel.

... this can happen when the pte fragment was allocated from this folio,
but when all the fragments get freed, the pte_frag_refcount still had some
unused fragments. Now, if this process exits, with such folio as it's cached
pte_frag in mm->context, then during pte_frag_destroy(), we simply call
pagetable_dtor() and pagetable_free(), meaning it doesn't clear the
active flag. This, can lead to the above bug. Since we are anyway in
do_exit() path, then if the refcount is 0, then I guess it should be
ok to simply clear the folio active flag before calling pagetable_dtor()
& pagetable_free().

Fixes: 32cc0b7 ("powerpc: add pte_free_defer() for pgtables sharing page")
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/ee13e7f99b8f258019da2b37655b998e73e5ef8b.1773078178.git.ritesh.list@gmail.com
@Kaloyan501
Kaloyan501 changed the base branch from msm89x7/6.19.5 to msm89x7/7.1.3 July 19, 2026 19:09
@Kaloyan501

Copy link
Copy Markdown
Author

@barni2000 Rebased, github may be going insane and showing a ton of maintainers cause when I pushed the rebase to the branch, the PR was still compairing to 6.19.5, but it should be fine now.

@barni2000

Copy link
Copy Markdown
Collaborator

@barni2000 Rebased, github may be going insane and showing a ton of maintainers cause when I pushed the rebase to the branch, the PR was still compairing to 6.19.5, but it should be fine now.

You should change the target branch

@Kaloyan501

Copy link
Copy Markdown
Author

@barni2000 Rebased, github may be going insane and showing a ton of maintainers cause when I pushed the rebase to the branch, the PR was still compairing to 6.19.5, but it should be fine now.

You should change the target branch

I already did.

ylecuyer pushed a commit to ylecuyer/linux that referenced this pull request Aug 27, 2026
The following lockdep splat was observed while kernel auto-online a CXL
memory region:

======================================================
WARNING: possible circular locking dependency detected
6.17.0djtest+ msm89x7-mainline#53 Tainted: G        W
------------------------------------------------------
systemd-udevd/3334 is trying to acquire lock:
ffffffff90346188 (hmem_resource_lock){+.+.}-{4:4}, at: hmem_register_resource+0x31/0x50

but task is already holding lock:
ffffffff90338890 ((node_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x2e/0x70

which lock already depends on the new lock.
[..]
Chain exists of:
  hmem_resource_lock --> mem_hotplug_lock --> (node_chain).rwsem

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock((node_chain).rwsem);
                               lock(mem_hotplug_lock);
                               lock((node_chain).rwsem);
  lock(hmem_resource_lock);

The lock ordering can cause potential deadlock. There are instances
where hmem_resource_lock is taken after (node_chain).rwsem, and vice
versa.

Split out the target update section of hmat_register_target() so that
hmat_callback() only envokes that section instead of attempt to register
hmem devices that it does not need to.

[ dj: Fix up comment to be closer to 80cols. (Jonathan) ]

Fixes: cf8741a ("ACPI: NUMA: HMAT: Register "soft reserved" memory as an "hmem" device")
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Tested-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Reviewed-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20251105235115.85062-3-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 3 times, most recently from ac821f0 to 516c347 Compare August 30, 2026 16:13
Add the compatible string for PM8953, found in the MSM8953 SoC.

Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 9 times, most recently from a2960c1 to e107545 Compare August 30, 2026 17:14
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch 3 times, most recently from 8b30dd8 to 6c8d319 Compare August 30, 2026 17:18
Add PRIMARY_MI2S_TX dai needed for WCD analog codec capture.

Signed-off-by: Kaloyan Donev <donevkaloyan@gmail.com>
…D (tbx505x)

Signed-off-by: Kaloyan Donev <donevkaloyan@gmail.com>
@Kaloyan501
Kaloyan501 force-pushed the tbx505x-audio-clean branch from 6c8d319 to cd7ab3d Compare August 30, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants