Loading msm/sde/sde_kms.c +4 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, { struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state; struct drm_plane_state *old_plane_state, *new_plane_state; struct drm_plane *plane; struct drm_plane_state *plane_state; Loading Loading @@ -670,6 +671,9 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, if (ops & SDE_KMS_OPS_CLEANUP_PLANE_FB) { SDE_DEBUG("cleanup planes\n"); drm_atomic_helper_cleanup_planes(dev, state); for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) sde_plane_destroy_fb(old_plane_state); } if (ops & SDE_KMS_OPS_SECURE_STATE_CHANGE) { SDE_DEBUG("secure ctrl\n"); Loading msm/sde/sde_plane.c +22 −0 Original line number Diff line number Diff line Loading @@ -4065,6 +4065,28 @@ static void sde_plane_destroy(struct drm_plane *plane) } } void sde_plane_destroy_fb(struct drm_plane_state *state) { struct sde_plane_state *pstate; if (!state) { SDE_ERROR("invalid arg state %d\n", !state); return; } pstate = to_sde_plane_state(state); if (sde_plane_get_property(pstate, PLANE_PROP_FB_TRANSLATION_MODE) == SDE_DRM_FB_SEC) { /* remove ref count for frame buffers */ if (state->fb) { drm_framebuffer_put(state->fb); state->fb = NULL; } } } static void sde_plane_destroy_state(struct drm_plane *plane, struct drm_plane_state *state) { Loading msm/sde/sde_plane.h +6 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,12 @@ struct sde_multirect_plane_states { #define sde_plane_get_property(S, X) ((S) && ((X) < PLANE_PROP_COUNT) ? \ ((S)->property_values[(X)].value) : 0) /** * sde_plane_destroy_fb - destroy fb object and clear fb * @state: old plane state */ void sde_plane_destroy_fb(struct drm_plane_state *state); /** * sde_plane_pipe - return sspp identifier for the given plane * @plane: Pointer to DRM plane object Loading Loading
msm/sde/sde_kms.c +4 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,7 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, { struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state; struct drm_plane_state *old_plane_state, *new_plane_state; struct drm_plane *plane; struct drm_plane_state *plane_state; Loading Loading @@ -670,6 +671,9 @@ static int sde_kms_prepare_secure_transition(struct msm_kms *kms, if (ops & SDE_KMS_OPS_CLEANUP_PLANE_FB) { SDE_DEBUG("cleanup planes\n"); drm_atomic_helper_cleanup_planes(dev, state); for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) sde_plane_destroy_fb(old_plane_state); } if (ops & SDE_KMS_OPS_SECURE_STATE_CHANGE) { SDE_DEBUG("secure ctrl\n"); Loading
msm/sde/sde_plane.c +22 −0 Original line number Diff line number Diff line Loading @@ -4065,6 +4065,28 @@ static void sde_plane_destroy(struct drm_plane *plane) } } void sde_plane_destroy_fb(struct drm_plane_state *state) { struct sde_plane_state *pstate; if (!state) { SDE_ERROR("invalid arg state %d\n", !state); return; } pstate = to_sde_plane_state(state); if (sde_plane_get_property(pstate, PLANE_PROP_FB_TRANSLATION_MODE) == SDE_DRM_FB_SEC) { /* remove ref count for frame buffers */ if (state->fb) { drm_framebuffer_put(state->fb); state->fb = NULL; } } } static void sde_plane_destroy_state(struct drm_plane *plane, struct drm_plane_state *state) { Loading
msm/sde/sde_plane.h +6 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,12 @@ struct sde_multirect_plane_states { #define sde_plane_get_property(S, X) ((S) && ((X) < PLANE_PROP_COUNT) ? \ ((S)->property_values[(X)].value) : 0) /** * sde_plane_destroy_fb - destroy fb object and clear fb * @state: old plane state */ void sde_plane_destroy_fb(struct drm_plane_state *state); /** * sde_plane_pipe - return sspp identifier for the given plane * @plane: Pointer to DRM plane object Loading