Merge "msm: vidc: Add memory barrier after queue header update"
This commit is contained in:
commit
45d0550497
1 changed files with 10 additions and 0 deletions
|
@ -501,6 +501,11 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
|
||||||
|
|
||||||
if (queue->qhdr_read_idx == queue->qhdr_write_idx) {
|
if (queue->qhdr_read_idx == queue->qhdr_write_idx) {
|
||||||
queue->qhdr_rx_req = receive_request;
|
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;
|
*pb_tx_req_is_set = 0;
|
||||||
dprintk(VIDC_DBG,
|
dprintk(VIDC_DBG,
|
||||||
"%s queue is empty, rx_req = %u, tx_req = %u, read_idx = %u\n",
|
"%s queue is empty, rx_req = %u, tx_req = %u, read_idx = %u\n",
|
||||||
|
@ -548,6 +553,11 @@ static int __read_queue(struct vidc_iface_q_info *qinfo, u8 *packet,
|
||||||
queue->qhdr_rx_req = 0;
|
queue->qhdr_rx_req = 0;
|
||||||
else
|
else
|
||||||
queue->qhdr_rx_req = receive_request;
|
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 = (1 == queue->qhdr_tx_req) ? 1 : 0;
|
*pb_tx_req_is_set = (1 == queue->qhdr_tx_req) ? 1 : 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue