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

Commit adbac6f2 authored by Dhaval Patel's avatar Dhaval Patel
Browse files

drm/msm/sde: avoid fence creation if property reset



Avoid creating fence on crtc and connector if property
reset value set. This will avoid creating get_unsed_fd
on dying process.

Change-Id: Id4e898c55167b3568962384cade5e60b38c30468
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 76913944
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -995,6 +995,9 @@ static int sde_connector_atomic_set_property(struct drm_connector *connector,
		}
		break;
	case CONNECTOR_PROP_RETIRE_FENCE:
		if (!val)
			goto end;

		rc = sde_fence_create(&c_conn->retire_fence, &fence_fd, 0);
		if (rc) {
			SDE_ERROR("fence create failed rc:%d\n", rc);
+3 −0
Original line number Diff line number Diff line
@@ -5087,6 +5087,9 @@ static int sde_crtc_atomic_set_property(struct drm_crtc *crtc,
		cstate->bw_split_vote = true;
		break;
	case CRTC_PROP_OUTPUT_FENCE:
		if (!val)
			goto exit;

		ret = _sde_crtc_get_output_fence(crtc, state, &fence_fd);
		if (ret) {
			SDE_ERROR("fence create failed rc:%d\n", ret);