drm: msm: handle resolution switch for LTM

DPU configuration should be changed when resolution switch happens at
the layer mixer level for ltm feature. Driver should mark ltm properties
as dirty when resolution switch happens. Change handles dynamic resolution
switch for ltm by marking the properties as dirty.

Change-Id: I5ffc8e74c42da6c2902eb42fd2e3ed1b9f9e3e4c
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
This commit is contained in:
Gopikrishnaiah Anandan
2019-12-10 18:24:20 -08:00
committed by Gerrit - the friendly Code Review server
parent af07b8a5d4
commit 1690129d60
3 changed files with 30 additions and 0 deletions

View File

@@ -3933,3 +3933,26 @@ int sde_cp_ltm_off_event_handler(struct drm_crtc *crtc_drm, bool en,
{
return 0;
}
void sde_cp_mode_switch_prop_dirty(struct drm_crtc *crtc_drm)
{
struct sde_cp_node *prop_node = NULL, *n = NULL;
struct sde_crtc *crtc;
if (!crtc_drm) {
DRM_ERROR("invalid crtc handle");
return;
}
crtc = to_sde_crtc(crtc_drm);
mutex_lock(&crtc->crtc_cp_lock);
list_for_each_entry_safe(prop_node, n, &crtc->active_list,
active_list) {
if (prop_node->feature == SDE_CP_CRTC_DSPP_LTM_INIT ||
prop_node->feature == SDE_CP_CRTC_DSPP_LTM_VLUT) {
list_del_init(&prop_node->active_list);
list_add_tail(&prop_node->dirty_list,
&crtc->dirty_list);
}
}
mutex_unlock(&crtc->crtc_cp_lock);
}

View File

@@ -199,4 +199,10 @@ int sde_cp_ltm_wb_pb_interrupt(struct drm_crtc *crtc_drm, bool en,
*/
int sde_cp_ltm_off_event_handler(struct drm_crtc *crtc_drm, bool en,
struct sde_irq_callback *hist_irq);
/**
* sde_cp_mode_switch_prop_dirty: API marks mode dependent features as dirty
* @crtc_drm: Pointer to crtc.
*/
void sde_cp_mode_switch_prop_dirty(struct drm_crtc *crtc_drm);
#endif /*_SDE_COLOR_PROCESSING_H */

View File

@@ -429,6 +429,7 @@ static bool sde_crtc_mode_fixup(struct drm_crtc *crtc,
{
SDE_DEBUG("\n");
sde_cp_mode_switch_prop_dirty(crtc);
if ((msm_is_mode_seamless(adjusted_mode) ||
(msm_is_mode_seamless_vrr(adjusted_mode) ||
msm_is_mode_seamless_dyn_clk(adjusted_mode))) &&