Skip to content

Commit

Permalink
Transmission of the actual image size
Browse files Browse the repository at this point in the history
Formats such as MJPEG, the data size does not necessarily match thei
frame size.

This patch enhances the capability to transmit the actual size.

Tracked-On: OAM-124513
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
  • Loading branch information
weichenli-intel committed Oct 17, 2024
1 parent dc47476 commit 02e45cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/platform/virtio/virtio-camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ static void virtio_camera_control_ack(struct virtqueue *vq)
vbuf->sequence = req->resp.u.buffer.sequence;
vbuf->vb2_buf.timestamp = req->resp.u.buffer.timestamp;
vbuf->planes[0].bytesused = req->resp.u.format.size.sizeimage;
req->vb->planes[0].bytesused = req->resp.u.format.size.sizeimage;
vb2_buffer_done(req->vb, VB2_BUF_STATE_DONE);
pr_debug("virtio-camera: mark the buffer done. UUID is %d, ptr is %pK\n",
req->resp.u.buffer.uuid[0] + req->resp.u.buffer.uuid[1], req->vb);
Expand Down

0 comments on commit 02e45cb

Please sign in to comment.