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

Commit bfb77165 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: Add memory barrier after queue header update"

parents 31b42cb2 46ec83c9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -515,6 +515,11 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet,

	if (queue->qhdr_read_idx == queue->qhdr_write_idx) {
		queue->qhdr_rx_req = receive_request;
		/*
		 * mb() to ensure qhdr is updated in main memory
		 * so that venus reads the updated header values
		 */
		mb();
		*pb_tx_req_is_set = 0;
		dprintk(VIDC_DBG,
			"%s queue is empty, rx_req = %u, tx_req = %u, read_idx = %u\n",
@@ -562,6 +567,11 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
		queue->qhdr_rx_req = 0;
	else
		queue->qhdr_rx_req = receive_request;
	/*
	 * mb() to ensure qhdr is updated in main memory
	 * so that venus reads the updated header values
	 */
	mb();

	*pb_tx_req_is_set = (queue->qhdr_tx_req == 1) ? 1 : 0;