summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-04Fix invalid page table entries from occuring.android-u-qpr2-beta-3.1_r0.8android-14.0.0_r0.67android-14.0.0_r0.57android-gs-shusky-5.15-android14-qpr2-betaSamuel Percival
GPUCORE-40571 Fix invalid page table entries from occuring. This patch prevents the invalid page table entries from occuring. Bug: 316204010 Change-Id: I6aa1fdb9f0a40dab5d8a7d1dcd85f7485c960a22 Signed-off-by: Renato Grottesi <otaner@google.com> Test: platform can boot. Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6262
2023-12-27MIDCET-5090, GPUCORE-40350: Flushes for L2 powerdownSuzanne Candanedo
This commit adds: - In Bifrost JM GPUs, L2 cache is explicitly flushed before the power down of shader cores and cores are powered down before L2 is powered down. - On older CSF GPUs, MCU will be halted before L2 is powered down and FW will flush the L2 on halt. Bug: 316204986 Test: Local SST Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6275 Signed-off-by: Michael Stokes <mjstokes@google.com> Change-Id: Ia8ba830cbaab6d9739c96e2a4851eef5a33f236e
2023-12-17Merge android14-gs-pixel-5.15-udc-d2 into android14-gs-pixel-5.15-24Q1android-u-qpr2-beta-3_r0.8PixelBot AutoMerger
SBMerger: 571992243 Change-Id: I522f65f0cebfb123972311aaff57b06af06f1dee Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-12-14Fix deadlock BTW user thread and page fault workerRenato Grottesi
MIDCET-4882,GPUCORE-40989 Break deadlock BTW user thread and page fault worker Additional fix over the previous commit where Arm forgot to change a kbase_gpu_vm_lock to kbase_gpu_vm_lock_with_pmode_sync. Bug: 301064831 Change-Id: I9179e0b4e4c7151c83061152fd877aba7204f037 Signed-off-by: Renato Grottesi <otaner@google.com> Test: manual run of the use case from the ticket Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6221
2023-12-14Fix deadlock BTW user thread and page fault workerRenato Grottesi
MIDCET-4882,GPUCORE-40989 Break deadlock BTW user thread and page fault worker Additional fix over the previous commit where Arm forgot to change a kbase_gpu_vm_lock to kbase_gpu_vm_lock_with_pmode_sync. Bug: 301064831 Change-Id: I9179e0b4e4c7151c83061152fd877aba7204f037 Signed-off-by: Renato Grottesi <otaner@google.com> Test: manual run of the use case from the ticket Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6221
2023-12-12Fix deadlock BTW user thread and page fault workerKevin Park
MIDCET-4882,GPUCORE-40989 Break deadlock BTW user thread and page fault worker This commit adds a RW semaphore 1> to prevent MMU operations during P.Mode entrance and 2> to break the deadlock on 'kctx reg_lock' between user thread and page-fault worker thread. Bug: 301064831 Signed-off-by: Renato Grottesi <otaner@google.com> Test: manual run of the use case from the ticket Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6221 Change-Id: Id2c16fced5288b6061ab1027534b4c5e26ca2480 (cherry picked from commit 31f99d3c18f85f80b8b1afb8f3ff52264f08b97a)
2023-12-11Fix deadlock BTW user thread and page fault workerKevin Park
MIDCET-4882,GPUCORE-40989 Break deadlock BTW user thread and page fault worker This commit adds a RW semaphore 1> to prevent MMU operations during P.Mode entrance and 2> to break the deadlock on 'kctx reg_lock' between user thread and page-fault worker thread. Bug: 301064831 Signed-off-by: Renato Grottesi <otaner@google.com> Test: manual run of the use case from the ticket Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6221 Change-Id: Id2c16fced5288b6061ab1027534b4c5e26ca2480
2023-11-29Merge android13-gs-pixel-5.10-24Q1 into android14-gs-pixel-5.15-24Q1Vamsidhar reddy Gaddam
Bug: 302343291 Test: Local build Change-Id: I90fcbfc237ce40ce4769cff4ba657d56e4f1ff92 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-11-29csf: Fix kbase_kcpu_command_queue UaF due to bad queue creationVarad Gautam
kbase_csf_kcpu_queue_new() places a queue ptr into kctx->csf.kcpu_queues.array and proceeds to alloc/populate metadata. If metadata setup fails, kbase kfree()-s the queue and bails out, leaving behind a stale queue ptr in the array. Using such a queue object crashes the kernel (eg. in delete_queue()). Change-Id: I9c4117ac3e938567aedfa7a7d343254c2e2fa48d Signed-off-by: Varad Gautam <varadgautam@google.com> Bug: 303353064
2023-11-28csf: Fix kbase_kcpu_command_queue UaF due to bad queue creationVarad Gautam
kbase_csf_kcpu_queue_new() places a queue ptr into kctx->csf.kcpu_queues.array and proceeds to alloc/populate metadata. If metadata setup fails, kbase kfree()-s the queue and bails out, leaving behind a stale queue ptr in the array. Using such a queue object crashes the kernel (eg. in delete_queue()). Change-Id: I9c4117ac3e938567aedfa7a7d343254c2e2fa48d Signed-off-by: Varad Gautam <varadgautam@google.com> Bug: 303353064
2023-11-23Fix kernel build warningsVamsidhar reddy Gaddam
Only 2 elements are read from DT in gpu_dvfs_init, yet a lot of space is allocated on the array. In addition, the type is correctly set to u32. Bug: 302343291 Test: Local build Change-Id: Ifdfd7fa2cc79ccddd1686aedb83c09c7bdbf2ec8 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-11-22Fix kernel build warningsVamsidhar reddy Gaddam
These are addressed in mali kbase upstream R46P0 driver. This commit can be reverted when R46P0 is merged in. Bug: 302343291 Test: Local build Change-Id: I113d3f06ce2098e5db8b6957fd77076b9e6bde14 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-11-22Fix kernel build warningsVamsidhar reddy Gaddam
Address kernel-doc warnings in pixel gpu components Bug: 302343291 Test: Local build Change-Id: Ia5a654f5acd1c6ee5245472792553d0d2e2d9e49 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-10-26mali_kbase: kthread CPU Affinity should not be set from KMDandroid-u-qpr2-beta-2_r0.8Devika Krishnadas
Bug: 294288458 Test: Perfetto trace Change-Id: I1f5ed8eee6f93194ea19903c6ec46b1aa6ab27ef Signed-off-by: Devika Krishnadas <kdevika@google.com>
2023-10-23Merge android13-gs-pixel-5.10-udc-qpr1 into android13-gs-pixel-5.10-24Q1android-u-qpr2-beta-2_r0.7android-u-qpr2-beta-2_r0.5android-u-qpr2-beta-2_r0.4android-u-qpr2-beta-2_r0.3android-u-qpr2-beta-2_r0.2android-u-qpr2-beta-2_r0.1PixelBot AutoMerger
Bug: 300854197 SBMerger: 571992243 Change-Id: Idcd27a05bcccb9738bb0e4d8216b062c9d834062 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-22Merge android14-gs-pixel-5.15-udc-d2 into android14-gs-pixel-5.15-24Q1PixelBot AutoMerger
SBMerger: 571992243 Change-Id: I1af29067accffbe74f66218799db64c2b384c120 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-22Merge android14-gs-pixel-5.15-udc-qpr1 into android14-gs-pixel-5.15-udc-d2PixelBot AutoMerger
SBMerger: 571992243 Change-Id: Ie74c6f6effe274472d899e9e5ac01c956c1c7458 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-18Add firmware core dump error code in sscdYunju Lee
Bug: 277090000 Test: Trigger sscd Change-Id: I6ca23cc74806efc364b10ee17e654f4252d3ec1f Signed-off-by: Yunju Lee <yunjulee@google.com>
2023-10-18Add firmware core dump error code in sscdYunju Lee
Bug: 277090000 Test: Trigger sscd Change-Id: I6ca23cc74806efc364b10ee17e654f4252d3ec1f Signed-off-by: Yunju Lee <yunjulee@google.com>
2023-10-16Add an import of the DMA_BUF namespaceSean Callanan
Fixes modpost checks. Bug: 294574913 Test: build Change-Id: I0560baf93b7f5950da28e6291b369e9d4963434c Signed-off-by: Sean Callanan <spyffe@google.com>
2023-10-16GPUCORE-39469 Error handling for invalid slot when parsing trace dataKevin Park
If a slot number parsed from trace data exceeds the number of supported CSG slots, the trace data must be discarded. Otherwise the access to the invalid memory address could happen. Bug: 304341806 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6057 Signed-off-by: Jörg Wagner <jorwag@google.com> Change-Id: I8e702e7487f2bea3618f2fe8ad696a1b546f10f2
2023-10-16GPUCORE-39469 Error handling for invalid slot when parsing trace dataandroid-u-qpr1-beta-2.2_r0.7android-14.0.0_r0.45android-14.0.0_r0.38android-gs-shusky-5.15-android14-qpr1-betaandroid-gs-shusky-5.15-android14-qpr1Kevin Park
If a slot number parsed from trace data exceeds the number of supported CSG slots, the trace data must be discarded. Otherwise the access to the invalid memory address could happen. Bug: 304341806 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6057 Signed-off-by: Jörg Wagner <jorwag@google.com> Change-Id: I8e702e7487f2bea3618f2fe8ad696a1b546f10f2
2023-10-16Merge android13-gs-pixel-5.10-udc-qpr1 into android13-gs-pixel-5.10-24Q1PixelBot AutoMerger
Bug: 300854197 SBMerger: 571992243 Change-Id: Ie9096d3afd31c2e5959618fb2f1354bca8be3cfd Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-13GPUCORE-39469 Error handling for invalid slot when parsing trace dataandroid-u-qpr1-beta-2.2_r0.6android-u-qpr1-beta-2.2_r0.5android-u-qpr1-beta-2.2_r0.4android-u-qpr1-beta-2.2_r0.3android-14.0.0_r0.44android-14.0.0_r0.43android-14.0.0_r0.42android-14.0.0_r0.41android-14.0.0_r0.40android-14.0.0_r0.39android-14.0.0_r0.37android-14.0.0_r0.36android-14.0.0_r0.35android-14.0.0_r0.34android-14.0.0_r0.33android-14.0.0_r0.31android-14.0.0_r0.25android-14.0.0_r0.23android-14.0.0_r0.21android-gs-tangorpro-5.10-android14-qpr1-betaandroid-gs-tangorpro-5.10-android14-qpr1android-gs-raviole-5.10-android14-qpr1android-gs-pantah-5.10-android14-qpr1-betaandroid-gs-pantah-5.10-android14-qpr1android-gs-lynx-5.10-android14-qpr1-betaandroid-gs-lynx-5.10-android14-qpr1android-gs-felix-5.10-android14-qpr1-betaandroid-gs-felix-5.10-android14-qpr1android-gs-bluejay-5.10-android14-qpr1Kevin Park
If a slot number parsed from trace data exceeds the number of supported CSG slots, the trace data must be discarded. Otherwise the access to the invalid memory address could happen. Bug: 304341806 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6057 Signed-off-by: Jörg Wagner <jorwag@google.com> Change-Id: I8e702e7487f2bea3618f2fe8ad696a1b546f10f2
2023-10-11Merge android13-gs-pixel-5.10-udc-qpr1 into android13-gs-pixel-5.10-24Q1PixelBot AutoMerger
Bug: 300854197 SBMerger: 558810260 Change-Id: I1fd011faa1af3472ac4ef0b70560f44da49cdf2d Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-08mali_kbase: platform: Add missing bounds checkandroid-u-qpr1-beta-2.2_r0.2android-u-qpr1-beta-2.2_r0.1android-14.0.0_r0.22android-14.0.0_r0.19android-gs-raviole-5.10-android14-qpr1-betaandroid-gs-bluejay-5.10-android14-qpr1-betaGuus Sliepen
Fix potential out-of-bounds read due to missing bounds check. Bug: 298264460 Signed-off-by: Guus Sliepen <gsliepen@google.com> Change-Id: I57b67a4177e4fe6d84a261eeb00b6b833da5486b Merged-In: I57b67a4177e4fe6d84a261eeb00b6b833da5486b
2023-10-04mali_kbase: Zero-initialize the dump_bufs_meta arrayandroid-u-qpr1-beta-2.1_r0.7android-u-qpr1-beta-2.1_r0.5android-u-qpr1-beta-2.1_r0.4android-u-qpr1-beta-2.1_r0.3android-u-qpr1-beta-2.1_r0.2android-u-qpr1-beta-2.1_r0.1android-gs-tangorpro-5.10-u-qpr1-beta2android-gs-raviole-5.10-u-qpr1-beta2android-gs-pantah-5.10-u-qpr1-beta2android-gs-lynx-5.10-u-qpr1-beta2android-gs-felix-5.10-u-qpr1-beta2android-gs-bluejay-5.10-u-qpr1-beta2Guus Sliepen
Bug: 299948695 Change-Id: I28bde3744a365fb5a8b7794c26b5adf507041eec
2023-10-04mali_kbase: Fix OOB write in kbase_csf_cpu_queue_dump()android-u-qpr2-beta-1_r0.6android-u-qpr2-beta-1_r0.5android-u-qpr2-beta-1_r0.4android-u-qpr2-beta-1_r0.3android-u-qpr2-beta-1_r0.2android-u-qpr2-beta-1_r0.1Guus Sliepen
Bug: 299991153 Change-Id: I63342d7ca91f4150d7e5e376d8e91f0accf22dd4
2023-10-02Merge android13-gs-pixel-5.10-udc-qpr1 into android13-gs-pixel-5.10-24Q1PixelBot AutoMerger
Bug: 300854197 SBMerger: 558810260 Change-Id: I2533a7f40800e1b5c32633543af66d1a58d66a43 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-10-01Merge android14-gs-pixel-5.15-udc-qpr1 into android14-gs-pixel-5.15-24Q1PixelBot AutoMerger
SBMerger: 558810260 Change-Id: I5062a45ae502bdaa801d4da3c0ac6f0d257f0e70 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-09-29mali_kbase: Move epoll-consumed waitqueue to struct kbase_fileandroid-u-qpr1-beta-2.1_r0.8android-gs-shusky-5.15-u-qpr1-beta2Varad Gautam
Storing the waitqueue in struct kbase_context leaves epoll holding a stale pointer to it, which it later attempts to deref and crashes the kernel in: [*][T15976] remove_wait_queue+0x64/0x190 [40350.510681][T15976] ep_unregister_pollwait+0x98/0xe8 Move this waitqueue to struct kbase_file to ensure that it lives long enough during process termination that the ep_unregister_pollwait access is valid (b/302281297). Bug: 300750575 Test: SST: b/302324090#comment4, repro: b/300750575#comment26 Change-Id: Ib161a7d7d4314bb6951bddbd87183a7dc71d5ac0 Signed-off-by: Varad Gautam <varadgautam@google.com>
2023-09-29Integrate firmware core dump into sscdYunju Lee
Move macros, struct, and functions required by sscd from source file to header file. Add firmware core dump segment to sscd. Implement firmware core dump in sscd. Bug: 277090000 Test: Trigger sscd manually Change-Id: I3546e74e647e60f13f18c5e9ef6a4a24413f02fb
2023-09-29mali_kbase: Move epoll-consumed waitqueue to struct kbase_fileVarad Gautam
Storing the waitqueue in struct kbase_context leaves epoll holding a stale pointer to it, which it later attempts to deref and crashes the kernel in: [*][T15976] remove_wait_queue+0x64/0x190 [40350.510681][T15976] ep_unregister_pollwait+0x98/0xe8 Move this waitqueue to struct kbase_file to ensure that it lives long enough during process termination that the ep_unregister_pollwait access is valid (b/302281297). Bug: 300750575 Test: SST: b/302324090#comment4, repro: b/300750575#comment26 Change-Id: Ib161a7d7d4314bb6951bddbd87183a7dc71d5ac0 Signed-off-by: Varad Gautam <varadgautam@google.com>
2023-09-28Integrate firmware core dump into sscdYunju Lee
Move macros, struct, and functions required by sscd from source file to header file. Add firmware core dump segment to sscd. Implement firmware core dump in sscd. Bug: 277090000 Test: Trigger sscd manually Change-Id: I3546e74e647e60f13f18c5e9ef6a4a24413f02fb
2023-09-27mali_kbase: platform: Add missing bounds checkGuus Sliepen
Fix potential out-of-bounds read due to missing bounds check. Bug: 298264460 Change-Id: I57b67a4177e4fe6d84a261eeb00b6b833da5486b
2023-09-26MIDCET-4870: Fix GPU page fault issue due to reclaiming of Tiler heap chunksAkash Goel
Bug: 296839414 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5965 Change-Id: I1c8a13de1e0abfff4e3cd7ec069fb139524c59db
2023-09-26Merge "Merge android13-gs-pixel-5.10-udc-qpr1 into ↵Pindar Yang
android13-gs-pixel-5.10-24Q1" into android13-gs-pixel-5.10-24Q1
2023-09-25MIDCET-4870: Fix GPU page fault issue due to reclaiming of Tiler heap chunksAkash Goel
Bug: 296839414 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5965 Change-Id: I1c8a13de1e0abfff4e3cd7ec069fb139524c59db
2023-09-25Merge android14-gs-pixel-5.15-udc-qpr1 into android14-gs-pixel-5.15-24Q1android-u-qpr2-beta-1_r0.7Robin Peng
SBMerger: 558810260 Change-Id: I1a9a0910370fbbd72ebaf685d76bcb978463012c Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-09-25Merge android14-gs-pixel-5.15-udc-d1 into android14-gs-pixel-5.15-udc-qpr1PixelBot AutoMerger
SBMerger: 558810260 Change-Id: I2cb8ccb398a0c1951ffae99b5ef08312a6b92cea
2023-09-25Merge android13-gs-pixel-5.10-udc-qpr1 into android13-gs-pixel-5.10-24Q1PixelBot AutoMerger
Bug: 300854197 SBMerger: 558810260 Change-Id: Ia28e47cbbe05c916007afaa7d0528972ae735e8c Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-09-20mali_kbase: platform: Fix integer overflowandroid-u-qpr1-beta-2_r0.8Jack Diver
Fix potential integer overflow within buffer liveness ioctl. Bug: 296984851 Test: N/A Change-Id: Ib1c9ee25a89b0a39ec905f109ee2c57c502428db Signed-off-by: Jack Diver <diverj@google.com>
2023-09-20mali_kbase: platform: Fix integer overflowJack Diver
Fix potential integer overflow within buffer liveness ioctl. Bug: 296984851 Test: N/A Change-Id: Ib1c9ee25a89b0a39ec905f109ee2c57c502428db (cherry picked from https://partner-android-review.googlesource.com/q/commit:02e5329e2e3f4af00f51560895b5bbe87fe824ef) Signed-off-by: Jack Diver <diverj@google.com>
2023-09-20mali_kbase: Tracepoints for governor recommendationVarad Gautam
Record the freq recommended by the governor before it's clamped via a new `gpu_gov_rec` clock tracepoint. Also record a new tracepoint `gpu_gov_rec_violate` if this freq is outside of the level lock window. Bug: 291855615 Test: Manual trace Signed-off-by: Varad Gautam <varadgautam@google.com> Change-Id: I45d0ffbebb6fa83d1a47b9d2afc8d96ce420afce
2023-09-20mali_kbase: Wait before L2 transition only for gs201 devicesSiddharth Kapoor
200us wait time was needed on gs201 devices before L2 cache is powered-up, to avoid stability issues as discussed in b/262266339 Bug: 297158611 Test: SST stability test 1000+ hours on zuma devices (not verified yet) Change-Id: I73319913c9cbd4253953a52db20e3bf89f716704 Signed-off-by: Siddharth Kapoor <ksiddharth@google.com>
2023-09-19GPUCORE-34589 jit_lock all JIT operationsandroid-14.0.0_r0.18android-gs-shusky-udc-d1Tu Vuong
This commit protects all JIT operations with the KCPU queues context jit_lock. TI2: 893173 Type: Fix Change-Id: If500064c18827e0071651274ccba541a68168ac2 Merged-In: I84fb19e7ce5f28e735d44a4993d51bd985aac80b (cherry picked from commit 1b3511e3f68a01459d7c8c09711a8aabd374853c) (cherry picked from commit bbabc5947dcd1fa21d3a0d8cb996238153bd57d1) Bug: 298157271 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5448
2023-09-19[Official] MIDCET-4806,GPUCORE-38732 Continue FLUSH_MEM after power ↵Kevin Park
transition timeout This patch continues FLUSH_MEM operation at function caller and increases the timeout value for the core power transition. Change-Id: I8cf5417976ab31b8d1e9e33e6359a91455d37144 (cherry picked from commit 71f7017252aabbb0013a2f151d894959b7c7c226) Bug: 295942377 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5812
2023-09-19mali_kbase: Add tracepoints to hint_min_freq / hint_max_freqVarad Gautam
Bug: 291855615 Test: Record manual trace. Signed-off-by: Varad Gautam <varadgautam@google.com> Change-Id: Id4341c3809b2e3b147122adaabaa01ac7b265dfc
2023-09-17Merge android14-gs-pixel-5.15-udc-qpr1 into android14-gs-pixel-5.15-24Q1PixelBot AutoMerger
SBMerger: 558810260 Change-Id: Iaf515de7065c84d8bad1af989cdce3cec9a40729 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-09-12Revert "mali_kbase: Emit gpu_work_period tracepoint on CSF work_begin"Debarshi Dutta
This reverts commit fe8ed24a03ffbb38330c72a084f12cec2b00ff5e. Bug: 290882327 Change-Id: Ia22556cac7aaf265afd5cdb820f407f2010f40b5