Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea03ef58 authored by Gopikrishnaiah Anandan's avatar Gopikrishnaiah Anandan
Browse files

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: default avatarGopikrishnaiah Anandan <agopik@codeaurora.org>
parent 3313dedb
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -3328,3 +3328,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);
}
+6 −0
Original line number Diff line number Diff line
@@ -190,4 +190,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 */
+1 −0
Original line number Diff line number Diff line
@@ -430,6 +430,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))) &&