Loading drivers/gpu/drm/msm/sde/sde_crtc.c +17 −1 Original line number Diff line number Diff line Loading @@ -1599,6 +1599,8 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, SDE_DEBUG("crtc%d, secure_level%d old_valid_fb%d\n", crtc->base.id, secure_level, old_valid_fb); SDE_EVT32_VERBOSE(DRMID(crtc), secure_level, smmu_state->state, old_valid_fb, SDE_EVTLOG_FUNC_ENTRY); /** * SMMU operations need to be delayed in case of * video mode panels when switching back to non_secure Loading @@ -1608,7 +1610,7 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, if (encoder->crtc != crtc) continue; post_commit &= sde_encoder_check_mode(encoder, post_commit |= sde_encoder_check_mode(encoder, MSM_DISPLAY_CAP_VID_MODE); } Loading Loading @@ -1681,6 +1683,11 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, SDE_DEBUG("SMMU State:%d, type:%d ops:%x\n", smmu_state->state, smmu_state->transition_type, ops); /* log only during actual transition times */ if (ops) SDE_EVT32(DRMID(crtc), secure_level, translation_mode, smmu_state->state, smmu_state->transition_type, ops, old_valid_fb, SDE_EVTLOG_FUNC_EXIT); return ops; } Loading Loading @@ -1724,6 +1731,9 @@ static int _sde_crtc_scm_call(int vmid) SDE_ERROR("Error:scm_call2, vmid (%lld): ret%d\n", desc.args[3], ret); } SDE_EVT32(mem_protect_sd_ctrl_id, desc.args[0], desc.args[3], num_sids, sec_sid[0], sec_sid[1], ret); kfree(sec_sid); return ret; Loading Loading @@ -1818,6 +1828,9 @@ int sde_crtc_secure_ctrl(struct drm_crtc *crtc, bool post_commit) smmu_state = &sde_crtc->smmu_state; old_smmu_state = smmu_state->state; SDE_EVT32(DRMID(crtc), smmu_state->state, smmu_state->transition_type, post_commit, SDE_EVTLOG_FUNC_ENTRY); if ((!smmu_state->transition_type) || ((smmu_state->transition_type == POST_COMMIT) && !post_commit)) /* Bail out */ Loading Loading @@ -1902,6 +1915,9 @@ int sde_crtc_secure_ctrl(struct drm_crtc *crtc, bool post_commit) error: smmu_state->transition_error = ret ? true : false; SDE_EVT32(DRMID(crtc), smmu_state->state, smmu_state->transition_type, smmu_state->transition_error, ret, SDE_EVTLOG_FUNC_EXIT); return ret; } Loading drivers/gpu/drm/msm/sde/sde_kms.c +4 −5 Original line number Diff line number Diff line Loading @@ -433,8 +433,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, * secure transition can be initiated. */ ops = sde_crtc_get_secure_transition_ops(crtc, old_crtc_state, old_valid_fb); old_crtc_state, old_valid_fb); if (ops < 0) { SDE_ERROR("invalid secure operations %x\n", ops); return ops; Loading @@ -444,9 +443,8 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, goto no_ops; SDE_DEBUG("%d:secure operations(%x) started on state:%pK\n", crtc->base.id, ops, crtc->state); crtc->base.id, ops, crtc->state); SDE_EVT32(DRMID(crtc), ops, crtc->state, old_valid_fb); /* 3. Perform operations needed for secure transition */ if (ops & SDE_KMS_OPS_WAIT_FOR_TX_DONE) { Loading Loading @@ -485,6 +483,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, } } } SDE_EVT32(DRMID(crtc), SDE_EVTLOG_FUNC_EXIT); SDE_DEBUG("secure operations completed\n"); } Loading drivers/gpu/drm/msm/sde/sde_plane.c +11 −2 Original line number Diff line number Diff line Loading @@ -906,7 +906,8 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, { struct sde_plane *psde; struct msm_gem_address_space *aspace = NULL; int ret; int ret, mode; bool secure = false; if (!plane || !pstate || !pipe_cfg || !fb) { SDE_ERROR( Loading Loading @@ -934,6 +935,7 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, * expected for one or two frames during the transition. */ if (aspace && pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), psde->pipe, aspace->domain_attached); ret = msm_framebuffer_prepare(fb, pstate->aspace); if (ret) { SDE_ERROR_PLANE(psde, Loading @@ -942,6 +944,9 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, } pstate->defer_prepare_fb = false; } mode = sde_plane_get_property(pstate, PLANE_PROP_FB_TRANSLATION_MODE); if ((mode == SDE_DRM_FB_SEC) || (mode == SDE_DRM_FB_SEC_DIR_TRANS)) secure = true; ret = sde_format_populate_layout(aspace, fb, &pipe_cfg->layout); if (ret == -EAGAIN) Loading @@ -960,7 +965,8 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, pipe_cfg->layout.plane_size[2], pipe_cfg->layout.plane_addr[3], pipe_cfg->layout.plane_size[3], pstate->multirect_index); pstate->multirect_index, secure); psde->pipe_hw->ops.setup_sourceaddress(psde->pipe_hw, pipe_cfg, pstate->multirect_index); } Loading Loading @@ -2145,6 +2151,7 @@ static int sde_plane_rot_prepare_fb(struct drm_plane *plane, } if (new_pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane)); SDE_DEBUG( "plane%d, domain not attached, prepare fb handled later\n", plane->base.id); Loading Loading @@ -2449,6 +2456,7 @@ static void sde_plane_rot_atomic_update(struct drm_plane *plane, * This can be expected for one or two frames during the transition. */ if (pstate->aspace && pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), pstate->aspace->domain_attached); /* prepare rotator input buffer */ ret = msm_framebuffer_prepare(state->fb, pstate->aspace); if (ret) { Loading Loading @@ -2852,6 +2860,7 @@ static int sde_plane_prepare_fb(struct drm_plane *plane, } if (pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), psde->pipe); SDE_DEBUG_PLANE(psde, "domain not attached, prepare_fb handled later\n"); return 0; Loading Loading
drivers/gpu/drm/msm/sde/sde_crtc.c +17 −1 Original line number Diff line number Diff line Loading @@ -1599,6 +1599,8 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, SDE_DEBUG("crtc%d, secure_level%d old_valid_fb%d\n", crtc->base.id, secure_level, old_valid_fb); SDE_EVT32_VERBOSE(DRMID(crtc), secure_level, smmu_state->state, old_valid_fb, SDE_EVTLOG_FUNC_ENTRY); /** * SMMU operations need to be delayed in case of * video mode panels when switching back to non_secure Loading @@ -1608,7 +1610,7 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, if (encoder->crtc != crtc) continue; post_commit &= sde_encoder_check_mode(encoder, post_commit |= sde_encoder_check_mode(encoder, MSM_DISPLAY_CAP_VID_MODE); } Loading Loading @@ -1681,6 +1683,11 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc, SDE_DEBUG("SMMU State:%d, type:%d ops:%x\n", smmu_state->state, smmu_state->transition_type, ops); /* log only during actual transition times */ if (ops) SDE_EVT32(DRMID(crtc), secure_level, translation_mode, smmu_state->state, smmu_state->transition_type, ops, old_valid_fb, SDE_EVTLOG_FUNC_EXIT); return ops; } Loading Loading @@ -1724,6 +1731,9 @@ static int _sde_crtc_scm_call(int vmid) SDE_ERROR("Error:scm_call2, vmid (%lld): ret%d\n", desc.args[3], ret); } SDE_EVT32(mem_protect_sd_ctrl_id, desc.args[0], desc.args[3], num_sids, sec_sid[0], sec_sid[1], ret); kfree(sec_sid); return ret; Loading Loading @@ -1818,6 +1828,9 @@ int sde_crtc_secure_ctrl(struct drm_crtc *crtc, bool post_commit) smmu_state = &sde_crtc->smmu_state; old_smmu_state = smmu_state->state; SDE_EVT32(DRMID(crtc), smmu_state->state, smmu_state->transition_type, post_commit, SDE_EVTLOG_FUNC_ENTRY); if ((!smmu_state->transition_type) || ((smmu_state->transition_type == POST_COMMIT) && !post_commit)) /* Bail out */ Loading Loading @@ -1902,6 +1915,9 @@ int sde_crtc_secure_ctrl(struct drm_crtc *crtc, bool post_commit) error: smmu_state->transition_error = ret ? true : false; SDE_EVT32(DRMID(crtc), smmu_state->state, smmu_state->transition_type, smmu_state->transition_error, ret, SDE_EVTLOG_FUNC_EXIT); return ret; } Loading
drivers/gpu/drm/msm/sde/sde_kms.c +4 −5 Original line number Diff line number Diff line Loading @@ -433,8 +433,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, * secure transition can be initiated. */ ops = sde_crtc_get_secure_transition_ops(crtc, old_crtc_state, old_valid_fb); old_crtc_state, old_valid_fb); if (ops < 0) { SDE_ERROR("invalid secure operations %x\n", ops); return ops; Loading @@ -444,9 +443,8 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, goto no_ops; SDE_DEBUG("%d:secure operations(%x) started on state:%pK\n", crtc->base.id, ops, crtc->state); crtc->base.id, ops, crtc->state); SDE_EVT32(DRMID(crtc), ops, crtc->state, old_valid_fb); /* 3. Perform operations needed for secure transition */ if (ops & SDE_KMS_OPS_WAIT_FOR_TX_DONE) { Loading Loading @@ -485,6 +483,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, } } } SDE_EVT32(DRMID(crtc), SDE_EVTLOG_FUNC_EXIT); SDE_DEBUG("secure operations completed\n"); } Loading
drivers/gpu/drm/msm/sde/sde_plane.c +11 −2 Original line number Diff line number Diff line Loading @@ -906,7 +906,8 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, { struct sde_plane *psde; struct msm_gem_address_space *aspace = NULL; int ret; int ret, mode; bool secure = false; if (!plane || !pstate || !pipe_cfg || !fb) { SDE_ERROR( Loading Loading @@ -934,6 +935,7 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, * expected for one or two frames during the transition. */ if (aspace && pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), psde->pipe, aspace->domain_attached); ret = msm_framebuffer_prepare(fb, pstate->aspace); if (ret) { SDE_ERROR_PLANE(psde, Loading @@ -942,6 +944,9 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, } pstate->defer_prepare_fb = false; } mode = sde_plane_get_property(pstate, PLANE_PROP_FB_TRANSLATION_MODE); if ((mode == SDE_DRM_FB_SEC) || (mode == SDE_DRM_FB_SEC_DIR_TRANS)) secure = true; ret = sde_format_populate_layout(aspace, fb, &pipe_cfg->layout); if (ret == -EAGAIN) Loading @@ -960,7 +965,8 @@ static inline void _sde_plane_set_scanout(struct drm_plane *plane, pipe_cfg->layout.plane_size[2], pipe_cfg->layout.plane_addr[3], pipe_cfg->layout.plane_size[3], pstate->multirect_index); pstate->multirect_index, secure); psde->pipe_hw->ops.setup_sourceaddress(psde->pipe_hw, pipe_cfg, pstate->multirect_index); } Loading Loading @@ -2145,6 +2151,7 @@ static int sde_plane_rot_prepare_fb(struct drm_plane *plane, } if (new_pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane)); SDE_DEBUG( "plane%d, domain not attached, prepare fb handled later\n", plane->base.id); Loading Loading @@ -2449,6 +2456,7 @@ static void sde_plane_rot_atomic_update(struct drm_plane *plane, * This can be expected for one or two frames during the transition. */ if (pstate->aspace && pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), pstate->aspace->domain_attached); /* prepare rotator input buffer */ ret = msm_framebuffer_prepare(state->fb, pstate->aspace); if (ret) { Loading Loading @@ -2852,6 +2860,7 @@ static int sde_plane_prepare_fb(struct drm_plane *plane, } if (pstate->defer_prepare_fb) { SDE_EVT32(DRMID(plane), psde->pipe); SDE_DEBUG_PLANE(psde, "domain not attached, prepare_fb handled later\n"); return 0; Loading