瀏覽代碼

disp: msm: sde: retry preclose commit in cases of -ERESTARTSYS

This change allows the commit in preclose to be attempted a
number of times in the event that the return value is -ERESTARTSYS.
This can happen if there is some timing delay which is preventing
the commit to go through completely and an error code is returned.

Change-Id: I26d85d777be182bc153532d7c06f816c934783a4
Signed-off-by: Samantha Tran <[email protected]>
Samantha Tran 3 年之前
父節點
當前提交
e1cb09ad31
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      msm/sde/sde_kms.c

+ 5 - 2
msm/sde/sde_kms.c

@@ -2559,7 +2559,10 @@ error:
 		list_for_each_entry_safe(fb, tfb, &fbs, filp_head)
 			list_move_tail(&fb->filp_head, &file->fbs);
 
-		SDE_ERROR("atomic commit failed in preclose, ret:%d\n", ret);
+		if (ret == -EDEADLK || ret == -ERESTARTSYS)
+			SDE_DEBUG("atomic commit failed in preclose, ret:%d\n", ret);
+		else
+			SDE_ERROR("atomic commit failed in preclose, ret:%d\n", ret);
 		goto end;
 	}
 
@@ -2608,7 +2611,7 @@ retry:
 
 	for (i = 0; i < TEARDOWN_DEADLOCK_RETRY_MAX; i++) {
 		ret = _sde_kms_remove_fbs(sde_kms, file, state);
-		if (ret != -EDEADLK)
+		if (ret != -EDEADLK && ret != -ERESTARTSYS)
 			break;
 		drm_atomic_state_clear(state);
 		drm_modeset_backoff(&ctx);