MALI: utgard: upgrade DDK to r6p1-01rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / mali400 / mali / common / mali_pp.c
index 68bfd50bf9ae029e7503f5bdabf83a7ece904af5..fb890a7d3ee9fa03c55f090509da98545894b2a9 100755 (executable)
@@ -15,6 +15,8 @@
 #include "regs/mali_200_regs.h"
 #include "mali_kernel_common.h"
 #include "mali_kernel_core.h"
+#include "mali_osk_mali.h"
+
 #if defined(CONFIG_MALI400_PROFILING)
 #include "mali_osk_profiling.h"
 #endif
@@ -296,6 +298,13 @@ void mali_pp_job_start(struct mali_pp_core *core, struct mali_pp_job *job, u32 s
 
        MALI_DEBUG_ASSERT_POINTER(core);
 
+       /* Change gpu secure mode if needed. */
+       if (MALI_TRUE == mali_pp_job_is_protected_job(job) && MALI_FALSE == _mali_osk_gpu_secure_mode_is_enabled()) {
+               _mali_osk_gpu_secure_mode_enable();
+       } else if (MALI_FALSE == mali_pp_job_is_protected_job(job) && MALI_TRUE == _mali_osk_gpu_secure_mode_is_enabled()) {
+               _mali_osk_gpu_secure_mode_disable();
+       }
+
        /* Write frame registers */
 
        /*