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

Commit c3c6eb0a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: synx: fence callback fixes"

parents 11ffa851 ec1d2179
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -313,6 +313,10 @@ int synx_signal_fence(struct synx_coredata *synx_obj,
		return -EINVAL;
	}

	if (synx_util_get_object_status(synx_obj) !=
		SYNX_STATE_ACTIVE)
		return -EALREADY;

	/*
	 * remove registered callback for the fence
	 * so it does not invoke the signal through callback again
@@ -324,12 +328,6 @@ int synx_signal_fence(struct synx_coredata *synx_obj,
	}

	spin_lock_irqsave(synx_obj->fence->lock, flags);
	if (synx_util_get_object_status_locked(synx_obj) !=
		SYNX_STATE_ACTIVE) {
		spin_unlock_irqrestore(synx_obj->fence->lock, flags);
		return -EALREADY;
	}

	/* set fence error to model {signal w/ error} */
	if (status != SYNX_STATE_SIGNALED_SUCCESS)
		dma_fence_set_error(synx_obj->fence, -status);
+3 −2
Original line number Diff line number Diff line
@@ -107,8 +107,9 @@ static void synx_util_destroy_coredata(struct kref *kref)

	if (synx_obj->fence) {
		/* need to release callback if unsignaled */
		if (synx_util_get_object_status(synx_obj) ==
			SYNX_STATE_ACTIVE)
		if (!synx_util_is_merged_object(synx_obj) &&
			(synx_util_get_object_status(synx_obj) ==
			SYNX_STATE_ACTIVE))
			if (!dma_fence_remove_callback(synx_obj->fence,
				&synx_obj->fence_cb))
				/* nothing much but logging the error */