Browse Source

Merge "video: driver: reset required buffer attributes"

qctecmdr 4 years ago
parent
commit
29b6bb8e1a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      driver/vidc/src/msm_vidc_driver.c

+ 4 - 0
driver/vidc/src/msm_vidc_driver.c

@@ -1380,7 +1380,11 @@ struct msm_vidc_buffer *msm_vidc_get_driver_buf(struct msm_vidc_inst *inst,
 		buf->dmabuf = dmabuf;
 		INIT_LIST_HEAD(&buf->list);
 		list_add_tail(&buf->list, &buffers->list);
+	} else {
+		/* reset all attributes except read only */
+		buf->attr &= MSM_VIDC_ATTR_READ_ONLY;
 	}
+
 	rc = vb2_buffer_to_driver(vb2, buf);
 	if (rc)
 		goto error;