mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
Merge "msm: synx: fence callback fixes"
This commit is contained in:
commit
c3c6eb0a90
2 changed files with 7 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue