From: Eddie James <eajames@linux.vnet.ibm.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-kernel@vger.kernel.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
linux-aspeed@lists.ozlabs.org, andrew@aj.id.au,
openbmc@lists.ozlabs.org, robh+dt@kernel.org, mchehab@kernel.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: platform: Add Aspeed Video Engine driver
Date: Fri, 21 Sep 2018 14:39:42 -0500 [thread overview]
Message-ID: <f1847a48-ca7c-e9e9-c85c-860166cebcbc@linux.vnet.ibm.com> (raw)
In-Reply-To: <66a5fbcf-2b41-ffd5-ad32-f26af47f3cea@xs4all.nl>
On 09/14/2018 12:31 PM, Hans Verkuil wrote:
> On 09/14/2018 05:22 PM, Eddie James wrote:
>>>> +static int aspeed_video_allocate_cma(struct aspeed_video *video)
>>>>
<snip>
>>>> + if (rc) {
>>>> + 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;
>>> COLORSPACE_JPEG is deprecated. Use V4L2_COLORSPACE_SRGB for pix.colorspace
>>> and set pix.quantization to V4L2_QUANTIZATION_FULL_RANGE.
FYI I'm getting a v4l2-compliance failure using your suggestion:
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK
test VIDIOC_G_FBUF: OK (Not Supported)
fail:
../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-formats.cpp(331):
pixelformat == V4L2_PIX_FMT_JPEG && colorspace != V4L2_COLORSPACE_JPEG
fail:
../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-formats.cpp(436):
testColorspace(pix.pixelformat, pix.colorspace, pix.ycbcr_enc,
pix.quantization)
test VIDIOC_G_FMT: FAIL
This is with v4l-utils commit d977e20a45a03543c4bdfeb3aef5211446de7398.
>>>
>>>> +
>>>> + /* Don't fail the probe if controls init fails */
>>>> + v4l2_ctrl_handler_init(&video->v4l2_ctrl, 2);
>>>> +
<snip>
>>>> ve,
>>>> +};
>>>> +
>>>> +module_platform_driver(aspeed_video_driver);
>>>> +
>>>> +MODULE_DESCRIPTION("ASPEED Video Engine Driver");
>>>> +MODULE_AUTHOR("Eddie James");
>>>> +MODULE_LICENSE("GPL v2");
>>>>
>>> I don't like the read() API here. It is not a real read() either since it assumes
>>> 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.
>> Yea...
>>
>>> 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.
I do have the streaming API working with good performance now. Will get
another patch set up soon.
Thanks,
Eddie
>> OK, I'll see what I can do.
>>
>> Thanks for the review!
>> Eddie
>>
>>> Regards,
>>>
>>> Hans
>>>
> Regards,
>
> Hans
>
next prev parent reply other threads:[~2018-09-21 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 19:29 [PATCH v2 0/2] media: platform: Add Aspeed Video Engine Driver Eddie James
2018-09-13 19:29 ` [PATCH v2 1/2] dt-bindings: media: Add Aspeed Video Engine binding documentation Eddie James
2018-09-13 19:29 ` [PATCH v2 2/2] media: platform: Add Aspeed Video Engine driver Eddie James
2018-09-14 8:19 ` Hans Verkuil
2018-09-14 15:22 ` Eddie James
2018-09-14 17:31 ` Hans Verkuil
2018-09-21 19:39 ` Eddie James [this message]
2018-09-14 6:59 ` [PATCH v2 0/2] media: platform: Add Aspeed Video Engine Driver Hans Verkuil
2018-09-14 15:08 ` Eddie James
2018-09-14 17:14 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1847a48-ca7c-e9e9-c85c-860166cebcbc@linux.vnet.ibm.com \
--to=eajames@linux.vnet.ibm.com \
--cc=andrew@aj.id.au \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).