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

During SUI validations and transitions, the encoders
are iterated to find the panel-mode. If concurrent
writeback is enabled, it is assumed as video mode.
Add check to consider only the built-in display
panel mode during sui to avoid wrong interpretation.

Change-Id: I2901eb29a0799571a95f6ab6f9f3f2c6154424c5
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
这个提交包含在:
Veera Sundaram Sankaran
2019-09-11 14:24:31 -07:00
提交者 Gerrit - the friendly Code Review server
父节点 d89ef9471c
当前提交 4776221d5b
修改 3 个文件,包含 19 行新增2 行删除

查看文件

@@ -1793,6 +1793,7 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc,
*/
drm_for_each_encoder_mask(encoder, crtc->dev,
crtc->state->encoder_mask) {
if (sde_encoder_is_dsi_display(encoder))
post_commit |= sde_encoder_check_curr_mode(encoder,
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;
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,
MSM_DISPLAY_VIDEO_MODE);
}

查看文件

@@ -456,6 +456,14 @@ bool sde_encoder_is_primary_display(struct drm_encoder *drm_enc)
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)
{
struct sde_encoder_virt *sde_enc = to_sde_encoder_virt(drm_enc);

查看文件

@@ -319,6 +319,14 @@ bool sde_encoder_in_clone_mode(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
* @drm_enc: Pointer to drm encoder structure