On 09/14/2018 05:22 PM, Eddie James wrote:<snip>
+static int aspeed_video_allocate_cma(struct aspeed_video *video)
+ if (rc) {COLORSPACE_JPEG is deprecated. Use V4L2_COLORSPACE_SRGB for pix.colorspace
+ v4l2_device_unregister(v4l2_dev);
+ dev_err(video->dev, "Failed to register video device\n");
+ return rc;
+ }
+
+ video->v4l2_fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+ video->v4l2_fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
+ video->v4l2_fmt.fmt.pix.field = V4L2_FIELD_NONE;
+ video->v4l2_fmt.fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
and set pix.quantization to V4L2_QUANTIZATION_FULL_RANGE.
<snip>
+
+ /* Don't fail the probe if controls init fails */
+ v4l2_ctrl_handler_init(&video->v4l2_ctrl, 2);
+
Yea...ve,I don't like the read() API here. It is not a real read() either since it assumes
+};
+
+module_platform_driver(aspeed_video_driver);
+
+MODULE_DESCRIPTION("ASPEED Video Engine Driver");
+MODULE_AUTHOR("Eddie James");
+MODULE_LICENSE("GPL v2");
userspace reads full frames at a time. But if you read e.g. one byte at a time,
then each byte is just the first byte of a different frame.
I think we need to figure out how to make the stream I/O version just as fast
if not faster as the read() API.
OK, I'll see what I can do.Regards,
Thanks for the review!
Eddie
Regards,
Hans
Hans