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

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

Merge "msm: synx: initialize the synx object holding lock"

parents 73ef39e1 7a0fa05c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ int synx_init_object(struct synx_table_row *table,
	dma_fence_init(fence, ops, &synx_dev->row_spinlocks[idx],
		synx_dev->dma_context, 1);

	spin_lock_bh(&synx_dev->row_spinlocks[idx]);
	row->fence = fence;
	obj_node->synx_obj = id;
	row->index = idx;
@@ -59,6 +60,7 @@ int synx_init_object(struct synx_table_row *table,
	list_add(&obj_node->list, &row->synx_obj_list);
	if (name)
		strlcpy(row->name, name, sizeof(row->name));
	spin_unlock_bh(&synx_dev->row_spinlocks[idx]);

	pr_debug("synx obj init: id:0x%x state:%u fence: 0x%pK\n",
		synx_status_locked(row), fence);
@@ -85,6 +87,7 @@ int synx_init_group_object(struct synx_table_row *table,
	if (!obj_node)
		return -ENOMEM;

	spin_lock_bh(&synx_dev->row_spinlocks[idx]);
	row->fence = &array->base;
	obj_node->synx_obj = id;
	row->index = idx;
@@ -93,6 +96,8 @@ int synx_init_group_object(struct synx_table_row *table,
	INIT_LIST_HEAD(&row->user_payload_list);

	list_add(&obj_node->list, &row->synx_obj_list);
	spin_unlock_bh(&synx_dev->row_spinlocks[idx]);

	pr_debug("synx group obj init: id:%d state:%u fence: 0x%pK\n",
		id, synx_status_locked(row), row->fence);