summaryrefslogtreecommitdiff
path: root/mali_kbase/mmu
AgeCommit message (Collapse)Author
2024-04-10Merge branch 'upstream' into HEADandroid-15-beta-3_r0.5android-15-beta-3_r0.2android-15-beta-3_r0.1android-15-beta-2_r0.5android-15-beta-2_r0.2android-15-beta-2_r0.1android-gs-raviole-5.10-android15-dpandroid-gs-raviole-5.10-android15-betaandroid-gs-felix-5.10-android15-dpandroid-gs-felix-5.10-android15-betaandroid-gs-bluejay-5.10-android15-dpandroid-gs-bluejay-5.10-android15-betaVamsidhar reddy Gaddam
Bring in R48P0 KMD update along. Bug: 323316466 Test: go/pixel-gpu-kmd-r48p0 Change-Id: I32484fe3e881ec9ec60cfeac27befc84d15b7904 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2024-04-10GPUCORE-41611: Debug num_valid_entries > 512 warning issueAkash Goel
Adding extra output for the num_valid_entries > 512 assertion. Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6548 Bug: 315967882 Test: Local boot and run of GFXBench5 Signed-off-by: Renato Grottesi <otaner@google.com> Change-Id: I9f7b385777688e77389656f8bfd06c0bc493a567
2024-03-13Update KMD to r48p0Vamsidhar reddy Gaddam
Provenance: ipdelivery@02a6b5e039b17fd395ddc13d09efbe440223a56c Change-Id: Ia6d72d40f5c57508d818ad24e57547c1a411d644 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2024-02-16GPUCORE-40994 robustness enhancementandroid-15-dp-2_r0.5android-15-dp-2_r0.4android-15-dp-2_r0.3android-15-dp-2_r0.2Samuel Percival
Improve MMU page teardown. Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/6429 Test: local build and boot Bug: 315967882 Signed-off-by: Renato Grottesi <otaner@google.com> Change-Id: Idb0afac63d6ee5f13f7fd72b7060e3fd1f49391a
2024-01-10Minor fixes for MIDCET-5076android-u-qpr3-beta-1_r0.7android-u-qpr3-beta-1_r0.5android-u-qpr3-beta-1_r0.4android-u-qpr3-beta-1_r0.3android-u-qpr3-beta-1_r0.2android-u-qpr3-beta-1_r0.1android-15-dp-1_r0.7android-15-dp-1_r0.5android-15-dp-1_r0.4android-15-dp-1_r0.3android-15-dp-1_r0.2android-15-dp-1_r0.1Vamsidhar reddy Gaddam
In R47P0, MIDCET-5076 had a few issues. These are fixes on top of the upstream driver. Bug: 315967882 Test: Compile & Boot Change-Id: I43707ff80a660455439c0ab5350e9ce192179af0 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2024-01-09mali_kbase: Add more gpu error eventsVarad Gautam
Bug: 312206733 Change-Id: I154b927152d768944e02fe6083e66bdbb0f47e3a Signed-off-by: Varad Gautam <varadgautam@google.com>
2024-01-05Merge branch 'upstream' into HEADVamsidhar reddy Gaddam
Update KMD to R47P0 Bug: 315267052 Test: Outlined in go/pixel-gpu-kmd-r47p0 Change-Id: I89454c4c862033fe330b260a9bc6cc777a3ca231 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-12-14Update KMD to r47p0Jörg Wagner
Provenance: ipdelivery@ad01e50d640910a99224382bb227e6d4de627657 Change-Id: I19ac9bce34a5c5a319c1b4a388e8b037b3dfe6e7
2023-09-01Merge r44p1-00dev3 from partner/upstream into android13-gs-pixel-5.10-udc-qpr1Jörg Wagner
Bug: 290882327 Change-Id: I90723cbaa3f294431087587fd8025f0688e51bf2
2023-08-31Update KMD to 'mini release: update r44p1-00dev2 to r44p1-00dev3'Jörg Wagner
Provenance: ipdelivery@5c8fdf6c071d63537e87949cfb4845079a669a0b Change-Id: Icc06581f804bf59be5fe923349318e703f02d5a3
2023-08-28Merge android13-gs-pixel-5.10-udc into android13-gs-pixel-5.10-udc-qpr1PixelBot AutoMerger
Bug: 292447561 SBMerger: 558810260 Change-Id: Ic618ad7008dfa915ff71de71bc205d9e219b7c34 Signed-off-by: Pindar Yang <pindaryang@google.com>
2023-08-22mali_kbase: refactor kbase_mmu_update_pagesJack Diver
Refactor kbase_mmu_update_pages, extracting flush/invalidate into new function. Expose no-flush variant. Test: Build, boot Bug: 294167925 Signed-off-by: Jack Diver <diverj@google.com> (cherry picked from https://partner-android-review.googlesource.com/q/commit:b36ce28e0779c27e57dad90d98c5e202eb654013) Merged-In: I4d1fce75d6ccf352ee54935138d6c92cdc609049 Change-Id: I4d1fce75d6ccf352ee54935138d6c92cdc609049
2023-08-22[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-08-03Update KMD to 'mini release: update r44p1-01bet1 to r44p1-00dev2'Jörg Wagner
Provenance: ipdelivery@d10c137c7691a470b8b33786aec4965315db4561 Change-Id: I4fbcc669d3b8e36c8288c91fdddd8b79258b6635
2023-07-12Merge upstream DDK R43P0 KMDDebarshi Dutta
Merge DDK version R43P0 from upstream branch Provenance: 48a9c7e25986318c8475bc245de51e7bec2606e8 (ipdelivery/EAC/v_r43p0) VX504X08X-BU-00000-r43p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r43p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r43p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r43p0-01eac0 - Valhall Android Renderscript AOSP parts Bug 278174418 Commit-Topic: R43P0_KMD Signed-off-by: Debarshi Dutta <debarshid@google.com> Change-Id: I84fb19e7ce5f28e735d44a4993d51bd985aac80b
2023-06-23GPUCORE-38292 Fix Use-After-Free Race with Memory-Pool GrowNongji Chen
This commit fixes a race condition in kbase_mmu_page_fault_worker when a memory pool is required to grow. It addresses a potential racing window where the worker is dealing with a given region's growable pages on fault recovery yet the application side triggers a buffer close on the specific region. Change-Id: I25234396defd874ade30cf5075ed918e1142d96c Bug: 287629203 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5549 (cherry picked from commit 221aa13af3d02f6b820adba0f50db7d203c41ba6)
2023-06-11Merge android13-gs-pixel-5.10-tm-qpr3 into android13-gs-pixel-5.10-udcPixelBot AutoMerger
SBMerger: 526756187 Change-Id: Ibe152c3a5f6bde3b32b1349e33175811bc895c38 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-06-06GPUCORE-36682 Lock MMU while disabling AS to prevent use after freeandroid-13.0.0_r0.117android-13.0.0_r0.116android-13.0.0_r0.115android-13.0.0_r0.114android-13.0.0_r0.113android-13.0.0_r0.112android-gs-felix-5.10-android13-qpr3Suzanne Candanedo
During an invalid GPU page fault, kbase will try to flush the GPU cache and disable the faulting address space (AS). There is a small window between flushing of the GPU L2 cache (MMU resumes) and when the AS is disabled where existing jobs on the GPU may access memory for that AS, dirtying the GPU cache. This is a problem as the kctx->as_nr is marked as KBASEP_AS_NR_INVALID and thus no cache maintenance will be performed on the AS of the faulty context when cleaning up the csg_slot and releasing the context. This patch addresses that issue by: 1. locking the AS via a GPU command 2. flushing the cache 3. disabling the AS 4. unlocking the AS This ensures that any jobs remaining on the GPU will not be able to access the memory due to the locked AS. Once the AS is unlocked, any memory access will fail as the AS is now disabled. The issue only happens on CSF GPUs. To avoid any issues, the code path for non-CSF GPUs is left undisturbed. (cherry picked from commit 566789dffda3dfec00ecf00f9819e7a515fb2c61) Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5071 Bug: 274014055 Change-Id: I2028182878b4f88505cc135a5f53ae4c7e734650
2023-05-23[Official] MIDCET-4546, GPUCORE-37946: Synchronize GPU cache flush cmds with ↵Suzanne Candanedo
silent reset on GPU power up Commands for GPU cache maintenance and TLB invalidation were sent after acquiring 'hwaccess_lock' and checking if the 'gpu_powered' flag is set. The combination of lock and the flag ensured that GPU registers remained accessible whilst the commands were in progress. If the flag was not set then the GPU power up was not performed and the commands were rightfully skipped. The 'gpu_powered' flag is set immediately after the Top-level power up of GPU is done by the platform specific power_on_callback() and so the registers can be safely accessed. If the callback returns 1 then a silent soft-reset of the GPU is performed after setting the flag. This lead to a race between the cache maintanence commands and the soft reset of GPU, due to which the commands did not complete or got lost and there was a timeout. This commit replaces the 'gpu_powered' flag with the 'gpu_ready' flag as the latter is set after the soft-reset is done and all the in-use GPU address spaces have been enabled. It is okay to skip the commands when the flag is false, as L2 cache would be in powered down state. The page migrate function is also updated to use 'gpu_ready' flag as that was also affected by the similar race with silent reset in GPUCORE-35861 and 'kbdev->pm.lock' had to be used. Change-Id: I4cefe3add2863d7b29f111d437061031b66e7080 (cherry picked from commit e31494f5b7b9e9101aab4bd75fa4dc7d7f47b66a) Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5284 Bug: 281540759
2023-05-09MIDCET-4324/GPUCORE-35611 Unmapping of aliased sink-page memorySuzanne Candanedo
Aliased regions containing the BASE_MEM_WRITE_ALLOC_PAGES_HANDLE MMU sink-page were not previously being unmapped correctly. In particular, the PGD entries for these pages. This change addresses that issue. Further, care is taken to ensure the flush_pa_range path operates correctly, for applicable GPUs. Also updated various WARN_ONs to WARN_ONCEs in MMU layer, in places where these could potentially occur in large numbers, rapidly - thereby helping to reduce the chances of system stress in future, as could potentially have been caused by this particular issue. GPUCORE-36048 Remove SAME_VA flag from regular allocation This patchset removes the SAME_VA flag from the regular allocation done in the defect test for GPUCORE-35611. The test was failing on 32-bit systems because there was no way to enforce that the aliased memory and the regular allocation would fall into the same region, and thus a later assumption in the test would not hold. Change-Id: Ie665fb9330a7338b7e148d1c1db13fe3cc98ee5c (cherry picked from commit 823c7b2de1933ca42cf179862d033d79d1289073) Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/4800 Bug: 260122837
2023-05-09[Official] MIDCET-4458, GPUCORE-36402: Check for process exit before page ↵Suzanne Candanedo
alloc from kthread The backing pages for native GPU allocations aren't always allocated in the ioctl context. A JIT_ALLOC softjob or KCPU command can get processed in the kernel worker thread. GPU page fault handling is anyways done in a kernel thread. Userspace can make Kbase allocate large number of backing pages from the kernel thread to cause out of memory situation, which would eventually lead to a kernel panic as OoM killer would run out of suitable processes to kill. Though Kbase will account for the backing pages and OoM killer will try to kill the culprit process, the memory already allocated by the process won't get freed as context termination would remain blocked or won't kick-in until kernel thread keeps trying to allocate the backing pages. For the allocation that is done from the context of kernel thread, OoM killer won't consider the kernel thread for killing and kernel would keep retrying to allocate physical page as long as the OoM killer is able to kill processes. For the memory allocation done from the ioctl context, kernel would eventually stop retrying when it sees that process has been marked for killing by the OoM killer. This commit adds a check for process exit in the page allocation loop. The check allows kernel thread to swiftly exit the page allocation loop once OoM killer has initiated the killing of culprit process (for which kernel thread is trying to allocate pages) thereby unblocking context termination and freeing of GPU memory already allocated by the process. This helps in preventing the kernel panic and also limits the number of innocent processes that gets killed. The use of __GFP_RETRY_MAYFAIL flag didn't help in all the scenarios. The flag ensures that OoM killer is not invoked directly and kernel doesn't keep retrying to allocate the page. But when system is running low on memory, other threads can invoke the OoM killer and the page allocation request from kthread could continue to get satisfied due to the killing of other processes and so the kthread may not always timely exit the page allocation loop. (cherry picked from commit 3c5c9328a7fc552e61972c1bbff4b56696682d30) GPUCORE-36402: Fix potential memleak and NULL ptr deref issue in Kbase The commit 3c5c9328a7fc552e61972c1bbff4b56696682d30 updated Kbase to check for the process exit in every iteration of the page allocation loop when the allocation is done from the context of kernel worker thread. The commit introduced a potential memleak and NULL pointer dereference issue (which was reported by Coverity). This commit adds the required fix for the 2 issues and also sets the task pointer only for the Userspace created contexts and not for the contexts created by Kbase i.e. privileged context created for the HW counter dumping and for the WA of HW issue TRYM-3485. Bug: 275614526 Change-Id: I8107edce09a2cb52d8586fc9f7990a25166f590e Signed-off-by: Guus Sliepen <gsliepen@google.com> Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5169 (cherry picked from commit 8294169160ebb0d11d7d22b11311ddf887fb0b63)
2023-05-01Mali Valhall Android DDK r43p0-01eac0 KMDToby Sunrise
Provenance: 48a9c7e25986318c8475bc245de51e7bec2606e8 (ipdelivery/EAC/v_r43p0) VX504X08X-BU-00000-r43p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r43p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r43p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r43p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I5df1914eba386e0bf507d4951240e1744f666a29
2023-05-01Mali Valhall Android DDK r42p0-01eac0 KMDToby Sunrise
Provenance: 300534375857cb2963042df7b788b1ab5616c500 (ipdelivery/EAC/v_r42p0) VX504X08X-BU-00000-r42p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r42p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r42p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r42p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I3b15e01574f03706574a8edaf50dae4ba16e30c0
2023-04-21Revert "GPUCORE-36682 Lock MMU while disabling AS to prevent use after free"android-u-beta-2_r0.4android-u-beta-2_r0.3android-u-beta-2_r0.2Kevin DuBois
This reverts commit d4a9cc691fdde6aae0f5d40ad3d949ab76518e42. Bug: 274827412 Reason for revert: stability Change-Id: Id952d2656a642b0f363d579a51843a03e7750c2c
2023-04-21Revert "GPUCORE-36682 Lock MMU while disabling AS to prevent use after free"Kevin DuBois
This reverts commit d4a9cc691fdde6aae0f5d40ad3d949ab76518e42. Bug: 274827412 Reason for revert: stability Change-Id: I929c4e7b11bd5b62a0c14a5b960b32127b26233a
2023-04-17Flush mmu updates regardless of coherency modeVarad Gautam
kbase avoids flushing MMU updates on coherent systems, as these systems are expected to snoop CPU caches instead. This presents a problem on GS101/GS201 devices, where GPU->CPU cache snoop requests do not work as intended when the GPU is in protected mode (b/192236116) and the GPU ends up seeing stale memory / runs into page faults. As a software workaround, always flush MMU updates regardless of coherency mode, so that the GPU page tables are accurate. Note: This was initially added in I5473345d and reverted in I2a41a2044. Bug: 200555454 Change-Id: I51187cd7c042bde42c4fcdf976a9f7f8828155e1 Signed-off-by: Varad Gautam <varadgautam@google.com>
2023-04-17[Official] MIDCET-4458, GPUCORE-36654 Use %pK on GPU bus faultSuzanne Candanedo
Physical address of GPU bus fault is useful for debugging purpose. However the physical address (emitted via 0x%016llX) is also sensitive information so it should be cautiously exposed to user space. Linux kernel provides the control for physical address exposure via 'kptr_restrict'. To allow this control to work, '%pK' must be used. Bug: 275623256 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5166 Change-Id: I23171bafc47e96045e42dad533ed28fc8bbcef6b (cherry picked from commit d35be16de81d9bc55dc0a586d661391e1989d6c0)
2023-03-28GPUCORE-36682 Lock MMU while disabling AS to prevent use after freeandroid-t-qpr3-beta-3_r0.5android-t-qpr3-beta-3_r0.4android-t-qpr3-beta-3_r0.3Suzanne Candanedo
*Affects CSF GPUs only, but changes to common code.* During an invalid GPU page fault, kbase will try to flush the GPU cache and disable the faulting address space (AS). There is a small window between flushing of the GPU L2 cache (MMU resumes) and when the AS is disabled where existing jobs on the GPU may access memory for that AS, dirtying the GPU cache. This is a problem as the kctx->as_nr is marked as KBASEP_AS_NR_INVALID and thus no cache maintenance will be performed on the AS of the faulty context when cleaning up the csg_slot and releasing the context. This patch addresses that issue by: 1. locking the AS via a GPU command 2. flushing the cache 3. disabling the AS 4. unlocking the AS This ensures that any jobs remaining on the GPU will not be able to access the memory due to the locked AS. Once the AS is unlocked, any memory access will fail as the AS is now disabled. Change-Id: I5e02face6ca0fa4526576dd70d0261ea3ee69506 (cherry picked from commit 566789dffda3dfec00ecf00f9819e7a515fb2c61) Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5071 Bug: 274014055
2023-02-16Revert "mmu: Flush mmu updates regardless of coherency mode"Kevin DuBois
Revert submission 2365722-cherrypick-cherrypick-p22-io-coherency-0zswjzix3t-lh6lkvir9b Reason for revert: b/252072919 Reverted changes: /q/submissionid:2365722-cherrypick-cherrypick-p22-io-coherency-0zswjzix3t-lh6lkvir9b Bug: 252072919 Signed-Off-By: Andrew Chant <achant@google.com> Change-Id: I2a41a20449731c20ec418b42e1e3dd8f41b0a30a
2023-02-05Merge android13-gs-pixel-5.10-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr3PixelBot AutoMerger
SBMerger: 478053055 Change-Id: Ia87a2913c1143fcf41c6d5106889135203d4b97b Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
2023-01-18mmu: Flush mmu updates regardless of coherency modeVarad Gautam
kbase avoids flushing MMU updates on coherent systems, as these systems are expected to snoop CPU caches instead. This presents a problem on GS101/GS201 devices, where GPU->CPU cache snoop requests do not work as intended when the GPU is in protected mode (b/192236116) and the GPU ends up seeing stale memory / runs into page faults. As a software workaround, always flush MMU updates regardless of coherency mode, so that the GPU page tables are accurate. Change-Id: I5473345d138d7d1d3bc68c60966b73e4846c292e Bug: 200555454 Signed-off-by: Varad Gautam <varadgautam@google.com>
2023-01-13MIDCET-4324/GPUCORE-35180 Clear GPU caches before terminating region trackerandroid-t-qpr2-beta-3_r0.5android-t-qpr2-beta-3_r0.4android-t-qpr2-beta-3_r0.3android-t-qpr2-beta-3.2_r0.6android-gs-raviole-5.10-android13-qpr2-betaandroid-gs-pantah-5.10-t-qpr2-beta-3.2android-gs-pantah-5.10-android13-qpr2-betaandroid-gs-bluejay-5.10-android13-qpr2-betaSuzanne Candanedo
Move the code to disable the MMU for a kctx (which also will flush the GPU caches for that kctx's Address Space) from the end of kctx termination to JM/CSF kctx-scheduler termination time. This ensures the GPU cached writes for that kctx are clear before we free the kctx's GPU memory pages in the region tracker, and before the MMU tables are freed. This in turn ensures the GPU cached writes do not land in freed memory (which would be a security issue). Change-Id: I2730a5762cb106ca2179cf9a2f789b8764f21901 (cherry picked from commit 09e14ccf27007dcb2cc0d4d64f5087ccc620a0b5) Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/4810 Bug: 260123838
2022-12-15Mali Valhall Android DDK r41p0-01eac0 KMDJörg Wagner
Provenance 7bb206ede984968bd1014b29529e94763b043202 (ipdelivery/EAC/v_r41p0) VX504X08X-BU-00000-r41p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r41p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r41p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r41p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I95f741ffe0ec4ee4c8f2c0338778294f1a2a2836
2022-12-15Mali Valhall Android DDK r40p0-01eac0 KMDJörg Wagner
Provenance: 056ded72d351d1bf6319f7b2b925496dd6ad304f (ipdelivery/EAC/v_r40p0) VX504X08X-BU-00000-r40p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r40p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r40p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r40p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I6db6b45c73c5447dd246533246e65b5ef2c8872f
2022-11-09Revert "Revert "Merge r38p1 from upstream into ↵Jack Diver
partner/android13-gs-pixel-5.10-tm-qpr2"" This reverts commit 34e635317dc2a91076ac341df3867ac3bdb31ef1. Bug: 228779790 Change-Id: Ic9d131af5568d7f55f610f255fa1c02925b18482 (cherry picked from commit 1c916e3f7c4d999f68e40c60fee6fe39418fcecd)
2022-11-02Revert "Merge r38p1 from upstream into partner/android13-gs-pixel-5.10-tm-qpr2"Kevin DuBois
This reverts commit 6dcd9736cbf84712dd7073dab4aea256e30517c2. Reason for revert: UMD taking too long to merge Bug: 228779790 Change-Id: I08b861ba3cfc8b025f653ef86b0a5ec643e5b13d
2022-10-31Merge r38p1 from upstream into partner/android13-gs-pixel-5.10-tm-qpr2Jack Diver
Bug: 228779790 Bug: 240184939 Bug: 240185324 Test: Boot to home Test: SST run Test: Camera, portrait, video record Test: VK CTS dEQP-VK.protected_memory.stack#* Test: CtsDisplayTestCases Test: CtsOpenGLTestCases Test: CtsSkQPTestCases Test: CtsNativeHardwareTestCases Test: CtsUiRenderingTestCases Test: CtsGpuToolsHostTestCases Test: CtsGpuProfilingDataTestCases Test: CtsVrTestCases Test: CtsCameraTestCases Test: CtsDeqpTestCases Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I555b0c61cd08c973aaf7f75dc92d0c7573fa7c91
2022-10-12mali_kbase: Merge gs101 and gs201 buildsSiddharth Kapoor
Refactor driver builds to support common codes for gs101 and gs201. - Check SoC specific CONFIG flag in Kbuild - Convert CONFIG_MALI_PIXEL_GPU_SSCD and CONFIG_MALI_HOST_CONTROLS_SC_RAILS to ccflags Bug: 245742922 Test: Not fully tested. DO NOT MERGE Change-Id: I1cf7c19e2a2e63de17153c70ede806dc773398d3 Signed-off-by: Siddharth Kapoor <ksiddharth@google.com> Signed-off-by: Lucas Wei <lucaswei@google.com>
2022-10-12Merge android13-gs-pixel-5.10-gs101-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr2Lucas Wei
worklog: - commit 1b55a3b93f52 ("mali_kbase: use RT_MUTEX for some job submission and context locks") replaced some locks with RT_MUTEX. Replace corresponding locks to avoid build breakage. Test: Build kernel Test: Boot to home Bug: 238399460 Signed-off-by: Lucas Wei <lucaswei@google.com> Change-Id: Id0d3f05bd0b5ebacc29e126ba98db5bb789e91fe
2022-10-07mali_kbase: MIDCET-4220 Patch for GPUSWERRATA-1425Suzanne Candanedo
This patch is a fix for: - SW Errata: 2713569 - CVE: CVE-2022-36449 This patch frees PGD pages after invalidation of L2 cache & MMU TLB Bug: 251397485 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/4610 Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I4204a351417d944a3c9efe077bca4e180a29270c
2022-10-07mali_kbase: MIDCET-4220 Patch for GPUSWERRATA-1420Suzanne Candanedo
This patch is a fix for: - SW Errata: 2712858 - CVE: CVE-2022-36449 It excludes MMU dumping and invalidates PGD before free. For this fix to work, GPUCORE-32152 is needed which adds hooks for physical address translation. Bug: 251397485 Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/4607/1 Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I9d3718b57199b7e66a5b49730ac32c810a1fc9c9
2022-09-20Revert "mali_kbase: platform: DVFS debug log"Sean Callanan
This reverts commit 1d7dc02a7a1fa366297455a211cb1e59939ee21d. Reason for revert: Reverting IFPO Bug: 247571932 Change-Id: Ia0b376c89a1fa5fd1c8093495aa1e3fd4e69c699
2022-09-02Mali Valhall Android DDK r38p1-01eac0Jack Diver
VX504X08X-BU-00000-r38p1-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r38p1-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r38p1-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r38p1-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I242060ad8ddc14475bda657cbbbe6b6c26ecfd57
2022-08-10mali_kbase: platform: DVFS debug logJack Diver
Log last 100 DVFS level changes from known hang points Bug: 232508335 Change-Id: I6325de023c7018366a40c6b6b67477148887ab94 Signed-off-by: Jonglin Lee <jonglin@google.com>
2022-07-23mali_kbase: Do not modify work_struct.dataJack Diver
coredump work struct data member was incorrectly used leading to the pending bit to get improperly cleared. When work is queued in quick succession, this prevents protection against double queuing. Bug: 232508335 Test: Stress test core dump work queueing Signed-off-by: Jack Diver <diverj@google.com> Change-Id: Ifebebbfb8cfd6ece57f8a96ddf0a0986d458b6e7
2022-05-16Merge android13-gs-pixel-5.10-gs101 into android13-gs-pixel-5.10Robin Peng
Bug: 211546634 Signed-off-by: Robin Peng <robinpeng@google.com> Change-Id: I3f37fd8274b8a03c8cb3566792aa683a62d9707d
2022-05-12mali_kbase: Trigger SSCD around GPU resetJack Diver
Capture an SSCD upon GPU reset, and reset failures Bug: 156051622 Signed-off-by: Jack Diver <diverj@google.com> Change-Id: I185c95c0d6ccbc7ea003aa98d65844fe26aad296
2022-05-06mali_kbase: use RT_MUTEX for some job submission and context locksandroid-t-beta-4_r0.6android-t-beta-4_r0.5android-t-beta-4_r0.4android-t-beta-3_r0.4android-t-beta-3.3_r0.4android-t-beta-3.2_r0.4android-13.0.0_r0.5android-13.0.0_r0.44android-13.0.0_r0.43android-13.0.0_r0.4android-13.0.0_r0.20android-13.0.0_r0.19android-13.0.0_r0.15android-13.0.0_r0.14android-gs-raviole-5.10-t-beta-4android-gs-raviole-5.10-t-beta-3android-gs-raviole-5.10-android13android-gs-bluejay-5.10-t-beta-4android-gs-bluejay-5.10-android13Devika Krishnadas
Bug: 230692528 Test: smoke test Signed-off-by: Devika Krishnadas <kdevika@google.com> Change-Id: I7d5da6c0a55ccfc6e789ecb74f0af71aac9d5be3
2022-05-06mali_kbase: Ensure GPU L2 is up prior to MMU cmdJack Diver
Fix races where the L2 has not finished powering up before we issue an MMU command. It's possible that the power up be deferred until after a scheduled power off, and in that case l2_desired may transiently be false. Replacing the current wait, with one that explicitly waits for L2 power up ensures that we don't issue a command for L2 power up has completed. Bug: 229473975 Signed-off-by: Jack Diver <diverj@google.com> Change-Id: Ic93eaf5f5cb520e0d34a5d3df8df9be05c477260
2022-05-05Revert "mali_kbase: Ensure GPU L2 is up prior to MMU cmd"Howie Chang
This reverts commit fbcc5a4cc48796702f05ec311e9150c559a47c4e. Reason for revert: b/231509259 Bug: 231509259 Change-Id: I102c03b1051dae20ea916e95a44ba55fd0a446b7 Signed-off-by: Howie Chang <howiechang@google.com>