diff options
author | Sean Callanan <spyffe@google.com> | 2022-03-08 16:56:56 -0800 |
---|---|---|
committer | Sean Callanan <spyffe@google.com> | 2022-03-09 22:33:19 +0000 |
commit | 7705ed4fa60b464f373122ded1a9e1cb9de55450 (patch) | |
tree | 0c6ac90e83bce1e3d48e3bf524d4e9ee3044c015 /mali_pixel | |
parent | ffb7863066d7902dee50c4d797d479f0a28ebb65 (diff) | |
download | gpu-7705ed4fa60b464f373122ded1a9e1cb9de55450.tar.gz |
mali_kbase: control SSMT state along with GPU power
The register state associated with secure mode configuration is erased
at GPU suspend. Since it is not persistent, this patch removes the
one-time configuration at system boot and instead adds an explicit clear
and set of the register state (via SMC calls) to GPU suspend/resume.
Bug: 216746477
Test: Face Auth before and after suspend, with disabled HW overlays
Test: System stability test
Signed-off-by: Sean Callanan <spyffe@google.com>
Change-Id: I458a0374b8c20bf3ac125517ff431191b4ab05cf
Diffstat (limited to 'mali_pixel')
-rw-r--r-- | mali_pixel/protected_memory_allocator.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/mali_pixel/protected_memory_allocator.c b/mali_pixel/protected_memory_allocator.c index 32d38fb..30ed56f 100644 --- a/mali_pixel/protected_memory_allocator.c +++ b/mali_pixel/protected_memory_allocator.c @@ -13,7 +13,6 @@ #include <linux/platform_device.h> #include <linux/protected_memory_allocator.h> #include <linux/slab.h> -#include <soc/samsung/exynos-smc.h> #define MALI_PMA_DMA_HEAP_NAME "vframe-secure" #define MALI_PMA_SLAB_SIZE (1 << 16) @@ -514,15 +513,6 @@ static int protected_memory_allocator_probe(struct platform_device *pdev) goto out; } - /* Enable protected mode for the GPU. */ - ret = exynos_smc( - SMC_PROTECTION_SET, 0, PROT_G3D, SMC_PROTECTION_ENABLE); - if (ret) { - dev_err(&(pdev->dev), - "Failed to enable protected mode for the GPU\n"); - goto out; - } - /* Log that the protected memory allocator was successfully probed. */ dev_info(&(pdev->dev), "Protected memory allocator probed successfully\n"); @@ -546,7 +536,6 @@ static int protected_memory_allocator_remove(struct platform_device *pdev) { struct protected_memory_allocator_device *pma_dev; struct mali_pma_dev *mali_pma_dev; - int ret; /* Get the Mali protected memory allocator device record. */ pma_dev = platform_get_drvdata(pdev); @@ -561,14 +550,6 @@ static int protected_memory_allocator_remove(struct platform_device *pdev) "Some protected memory has been left allocated\n"); } - /* Disable protected mode for the GPU. */ - ret = exynos_smc( - SMC_PROTECTION_SET, 0, PROT_G3D, SMC_PROTECTION_DISABLE); - if (ret) { - dev_warn(&(pdev->dev), - "Failed to disable protected mode for the GPU\n"); - } - /* Release the DMA buffer heap. */ if (mali_pma_dev->dma_heap) { dma_heap_put(mali_pma_dev->dma_heap); |