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

Commit dbb70e3f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Skip processing of release buffer event"

parents 339c3875 93337f77
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -667,12 +667,24 @@ static void handle_event_change(enum command_response cmd, void *data)
				__func__, inst, &event_notify->packet_buffer,
				&event_notify->extra_data_buffer);

			if (inst->state == MSM_VIDC_CORE_INVALID ||
			/*
			* If buffer release event is received with inst->state
			* greater than STOP means client called STOP directly
			* without FLUSH. This also means that they don't expect
			* these buffers back. Processing these commands will not
			* add any value. This can also results deadlocks between
			* try_state and event_notify due to inst->sync_lock.
			*/

			mutex_lock(&inst->lock);
			if (inst->state >= MSM_VIDC_STOP ||
				inst->core->state == VIDC_CORE_INVALID) {
				dprintk(VIDC_DBG,
					"Event release buf ref received in invalid state - discard\n");
				dprintk(VIDC_ERR,
					"Release buffer reference called in invalid state\n");
				mutex_unlock(&inst->lock);
				return;
			}
			mutex_unlock(&inst->lock);

			/*
			* Get the buffer_info entry for the