Merge "disp: msm: sde: fix panel mode check during SUI validations"

This commit is contained in:
qctecmdr 2019-09-13 07:51:40 -07:00 committed by Gerrit - the friendly Code Review server
commit 8babba1d11
3 changed files with 19 additions and 2 deletions

View File

@ -1793,7 +1793,8 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc,
*/ */
drm_for_each_encoder_mask(encoder, crtc->dev, drm_for_each_encoder_mask(encoder, crtc->dev,
crtc->state->encoder_mask) { crtc->state->encoder_mask) {
post_commit |= sde_encoder_check_curr_mode(encoder, if (sde_encoder_is_dsi_display(encoder))
post_commit |= sde_encoder_check_curr_mode(encoder,
MSM_DISPLAY_VIDEO_MODE); MSM_DISPLAY_VIDEO_MODE);
} }
@ -4275,7 +4276,7 @@ static int _sde_crtc_check_secure_state_smmu_translation(struct drm_crtc *crtc,
int is_video_mode = false; int is_video_mode = false;
drm_for_each_encoder_mask(encoder, crtc->dev, state->encoder_mask) { drm_for_each_encoder_mask(encoder, crtc->dev, state->encoder_mask) {
if (sde_encoder_is_primary_display(encoder)) if (sde_encoder_is_dsi_display(encoder))
is_video_mode |= sde_encoder_check_curr_mode(encoder, is_video_mode |= sde_encoder_check_curr_mode(encoder,
MSM_DISPLAY_VIDEO_MODE); MSM_DISPLAY_VIDEO_MODE);
} }

View File

@ -456,6 +456,14 @@ bool sde_encoder_is_primary_display(struct drm_encoder *drm_enc)
SDE_CONNECTOR_PRIMARY); SDE_CONNECTOR_PRIMARY);
} }
bool sde_encoder_is_dsi_display(struct drm_encoder *drm_enc)
{
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);
return sde_enc &&
(sde_enc->disp_info.intf_type == DRM_MODE_CONNECTOR_DSI);
}
int sde_encoder_in_cont_splash(struct drm_encoder *drm_enc) int sde_encoder_in_cont_splash(struct drm_encoder *drm_enc)
{ {
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc); struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);

View File

@ -319,6 +319,14 @@ bool sde_encoder_in_clone_mode(struct drm_encoder *enc);
*/ */
bool sde_encoder_is_primary_display(struct drm_encoder *enc); bool sde_encoder_is_primary_display(struct drm_encoder *enc);
/**
* sde_encoder_is_dsi_display - checks if underlying display is DSI
* display or not.
* @drm_enc: Pointer to drm encoder structure
* @Return: true if it is primary display. false if secondary display
*/
bool sde_encoder_is_dsi_display(struct drm_encoder *enc);
/** /**
* sde_encoder_control_idle_pc - control enable/disable of idle power collapse * sde_encoder_control_idle_pc - control enable/disable of idle power collapse
* @drm_enc: Pointer to drm encoder structure * @drm_enc: Pointer to drm encoder structure