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

Commit c899c8a6 authored by Xu Yang's avatar Xu Yang Committed by Yuchao Ma
Browse files

drm/msm/sde: clear crtc ditry/active lists for postprocessing



Clear crtc dirty and active lists for postprocessing when adb shell
stop and framework reboot. Change fixes the issue that postprocessing
features failed to be applied in Lua test after adb shell stop in
case that layer mixer is configured without DSPP.

Change-Id: I6ccac1a33ee82fd05776d77e2ca262b59319ff06
Signed-off-by: default avatarXu Yang <yangxu@codeaurora.org>
parent f65c42f2
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -1295,6 +1295,33 @@ void sde_cp_crtc_resume(struct drm_crtc *crtc)
	/* placeholder for operations needed during resume */
}

void sde_cp_crtc_clear(struct drm_crtc *crtc)
{
	struct sde_crtc *sde_crtc = NULL;
	unsigned long flags;

	if (!crtc) {
		DRM_ERROR("crtc %pK\n", crtc);
		return;
	}
	sde_crtc = to_sde_crtc(crtc);
	if (!sde_crtc) {
		DRM_ERROR("sde_crtc %pK\n", sde_crtc);
		return;
	}

	mutex_lock(&sde_crtc->crtc_cp_lock);
	list_del_init(&sde_crtc->active_list);
	list_del_init(&sde_crtc->dirty_list);
	list_del_init(&sde_crtc->ad_active);
	list_del_init(&sde_crtc->ad_dirty);
	mutex_unlock(&sde_crtc->crtc_cp_lock);

	spin_lock_irqsave(&sde_crtc->spin_lock, flags);
	list_del_init(&sde_crtc->user_event_list);
	spin_unlock_irqrestore(&sde_crtc->spin_lock, flags);
}

static void dspp_pcc_install_property(struct drm_crtc *crtc)
{
	char feature_name[256];
+6 −0
Original line number Diff line number Diff line
@@ -115,6 +115,12 @@ void sde_cp_crtc_suspend(struct drm_crtc *crtc);
 */
void sde_cp_crtc_resume(struct drm_crtc *crtc);

/**
 * sde_cp_crtc_clear: Clear the active list and dirty list of crtc features
 * @crtc: Pointer to crtc.
 */
void sde_cp_crtc_clear(struct drm_crtc *crtc);

/**
 * sde_cp_ad_interrupt: Api to enable/disable ad interrupt
 * @crtc: Pointer to crtc.
+2 −0
Original line number Diff line number Diff line
@@ -4918,6 +4918,8 @@ int sde_crtc_helper_reset_custom_properties(struct drm_crtc *crtc,
	sde_crtc = to_sde_crtc(crtc);
	cstate = to_sde_crtc_state(crtc_state);

	sde_cp_crtc_clear(crtc);

	for (prop_idx = 0; prop_idx < CRTC_PROP_COUNT; prop_idx++) {
		uint64_t val = cstate->property_values[prop_idx].value;
		uint64_t def;