瀏覽代碼

disp: msm: sde: add vote for trusted vm splash handoff

Trusted VM adapts splash handoff path to acquire the same
set of HW blocks the tui display was using in the primary VM
before switching out.

To use the splash handoff path, Trusted VM should add an
additional vote to the PM so that refcounts will be remain
balanced after the splash path cleanup at the completion
of the first valid commit.

This change adds the needed vote and as a result cleans up
explicit voting from trusted vm commit paths.

Change-Id: I9eb33c364f1dfb4205547a8353f57b73c68b8af3
Signed-off-by: Jeykumar Sankaran <[email protected]>
Jeykumar Sankaran 4 年之前
父節點
當前提交
cbaca0039b
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      msm/sde/sde_kms.c

+ 7 - 7
msm/sde/sde_kms.c

@@ -998,8 +998,6 @@ int sde_kms_vm_trusted_prepare_commit(struct sde_kms *sde_kms,
 
 	ddev = sde_kms->dev;
 
-	pm_runtime_get_sync(ddev->dev);
-
 	cstate = to_sde_crtc_state(state->crtcs[0].new_state);
 
 	vm_req = sde_crtc_get_property(cstate, CRTC_PROP_VM_REQ_STATE);
@@ -1262,8 +1260,6 @@ int sde_kms_vm_trusted_post_commit(struct sde_kms *sde_kms,
 	drm_for_each_encoder_mask(encoder, crtc->dev, crtc->state->encoder_mask)
 		sde_encoder_irq_control(encoder, false);
 
-	sde_irq_update(&sde_kms->base, false);
-
 	list_for_each_entry(plane, &ddev->mode_config.plane_list, head)
 		sde_plane_set_sid(plane, 0);
 
@@ -1274,8 +1270,6 @@ int sde_kms_vm_trusted_post_commit(struct sde_kms *sde_kms,
 	if (vm_ops->vm_release)
 		rc = vm_ops->vm_release(sde_kms);
 
-	pm_runtime_put_sync(ddev->dev);
-
 	return rc;
 }
 
@@ -4304,7 +4298,7 @@ int sde_kms_vm_trusted_resource_init(struct sde_kms *sde_kms)
 	}
 
 	vm_ops = sde_vm_get_ops(sde_kms);
-	if (vm_ops && vm_ops->vm_owns_hw(sde_kms)) {
+	if (vm_ops && !vm_ops->vm_owns_hw(sde_kms)) {
 		SDE_DEBUG(
 		   "skipping sde res init as device assign is not completed\n");
 		return 0;
@@ -4340,6 +4334,12 @@ int sde_kms_vm_trusted_resource_init(struct sde_kms *sde_kms)
 		goto error;
 	}
 
+	/**
+	 * fill-in vote for the continuous splash hanodff path, which will be
+	 * removed on the successful first commit.
+	 */
+	pm_runtime_get_sync(sde_kms->dev->dev);
+
 	return 0;
 
 error: