From: Hans Verkuil <hverkuil@xs4all.nl>
To: Neil Armstrong <narmstrong@baylibre.com>,
Maxime Jourdan <mjourdan@baylibre.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Kevin Hilman <khilman@baylibre.com>,
linux-kernel@vger.kernel.org,
Hans Verkuil <hans.verkuil@cisco.com>,
linux-amlogic@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH v6 3/4] media: meson: add v4l2 m2m video decoder driver
Date: Mon, 27 May 2019 12:31:28 +0200 [thread overview]
Message-ID: <79491b42-9296-1dfd-59ec-3ce7d58b2119@xs4all.nl> (raw)
In-Reply-To: <480f2c43-9858-a4d3-7a6b-452756fb6076@baylibre.com>
On 5/27/19 12:18 PM, Neil Armstrong wrote:
> Hi Hans,
>
> On 27/05/2019 12:04, Hans Verkuil wrote:
>> Hi Maxime,
>>
>> First a high-level comment: I think this driver should go to staging.
>> Once we finalize the stateful decoder spec, and we've updated the
>> v4l2-compliance test, then this needs to be tested against that and
>> only if it passes can it be moved out of staging.
>
> I don't understand the reason since other stateful codecs are already
> mainline and doesn't match the in-discussion stateful decoder spec either.
With new drivers we should do better: I don't want to add such drivers
without them being fully tested for API compliance.
There is a bit too much variation in existing drivers and the main reason
for that was lack of compliance testing. We're close to having a proper
spec and proper compliance tests, but as long as that's not finalized I
want to keep new codec drivers in staging.
Once the compliance tests are available, then we have an objective way
of checking if a codec driver is following the spec.
Existing codec drivers in mainline will also have to be checked, for that
matter.
Regards,
Hans
>
> Neil
>
>>
>> It is just a bit too soon to have this in mainline at this time.
>>
>> One other comment below:
>>
>> On 5/14/19 3:56 PM, Maxime Jourdan wrote:
>>> Amlogic SoCs feature a powerful video decoder unit able to
>>> decode many formats, with a performance of usually up to 4k60.
>>>
>>> This is a driver for this IP that is based around the v4l2 m2m framework.
>>>
>>> It features decoding for:
>>> - MPEG 1
>>> - MPEG 2
>>>
>>> Supported SoCs are: GXBB (S905), GXL (S905X/W/D), GXM (S912)
>>>
>>> There is also a hardware bitstream parser (ESPARSER) that is handled here.
>>>
>>> Tested-by: Neil Armstrong <narmstrong@baylibre.com>
>>> Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
>>> ---
>>> drivers/media/platform/Kconfig | 10 +
>>> drivers/media/platform/meson/Makefile | 1 +
>>> drivers/media/platform/meson/vdec/Makefile | 8 +
>>> .../media/platform/meson/vdec/codec_mpeg12.c | 209 ++++
>>> .../media/platform/meson/vdec/codec_mpeg12.h | 14 +
>>> drivers/media/platform/meson/vdec/dos_regs.h | 98 ++
>>> drivers/media/platform/meson/vdec/esparser.c | 323 +++++
>>> drivers/media/platform/meson/vdec/esparser.h | 32 +
>>> drivers/media/platform/meson/vdec/vdec.c | 1071 +++++++++++++++++
>>> drivers/media/platform/meson/vdec/vdec.h | 265 ++++
>>> drivers/media/platform/meson/vdec/vdec_1.c | 229 ++++
>>> drivers/media/platform/meson/vdec/vdec_1.h | 14 +
>>> .../media/platform/meson/vdec/vdec_ctrls.c | 51 +
>>> .../media/platform/meson/vdec/vdec_ctrls.h | 14 +
>>> .../media/platform/meson/vdec/vdec_helpers.c | 441 +++++++
>>> .../media/platform/meson/vdec/vdec_helpers.h | 80 ++
>>> .../media/platform/meson/vdec/vdec_platform.c | 107 ++
>>> .../media/platform/meson/vdec/vdec_platform.h | 30 +
>>> 18 files changed, 2997 insertions(+)
>>> create mode 100644 drivers/media/platform/meson/vdec/Makefile
>>> create mode 100644 drivers/media/platform/meson/vdec/codec_mpeg12.c
>>> create mode 100644 drivers/media/platform/meson/vdec/codec_mpeg12.h
>>> create mode 100644 drivers/media/platform/meson/vdec/dos_regs.h
>>> create mode 100644 drivers/media/platform/meson/vdec/esparser.c
>>> create mode 100644 drivers/media/platform/meson/vdec/esparser.h
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec.c
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec.h
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_1.c
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_1.h
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_ctrls.c
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_ctrls.h
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_helpers.c
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_helpers.h
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_platform.c
>>> create mode 100644 drivers/media/platform/meson/vdec/vdec_platform.h
>>>
>>
>> <snip>
>>
>>> diff --git a/drivers/media/platform/meson/vdec/vdec_ctrls.c b/drivers/media/platform/meson/vdec/vdec_ctrls.c
>>> new file mode 100644
>>> index 000000000000..d5d6b1b97aa5
>>> --- /dev/null
>>> +++ b/drivers/media/platform/meson/vdec/vdec_ctrls.c
>>> @@ -0,0 +1,51 @@
>>> +// SPDX-License-Identifier: GPL-2.0+
>>> +/*
>>> + * Copyright (C) 2018 BayLibre, SAS
>>> + * Author: Maxime Jourdan <mjourdan@baylibre.com>
>>> + */
>>> +
>>> +#include "vdec_ctrls.h"
>>> +
>>> +static int vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
>>> +{
>>> + struct amvdec_session *sess =
>>> + container_of(ctrl->handler, struct amvdec_session, ctrl_handler);
>>> +
>>> + switch (ctrl->id) {
>>> + case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE:
>>> + ctrl->val = sess->dpb_size;
>>> + break;
>>> + default:
>>> + return -EINVAL;
>>> + };
>>> +
>>> + return 0;
>>> +}
>>> +
>>> +static const struct v4l2_ctrl_ops vdec_ctrl_ops = {
>>> + .g_volatile_ctrl = vdec_op_g_volatile_ctrl,
>>> +};
>>> +
>>> +int amvdec_init_ctrls(struct v4l2_ctrl_handler *ctrl_handler)
>>> +{
>>> + int ret;
>>> + struct v4l2_ctrl *ctrl;
>>> +
>>> + ret = v4l2_ctrl_handler_init(ctrl_handler, 1);
>>> + if (ret)
>>> + return ret;
>>> +
>>> + ctrl = v4l2_ctrl_new_std(ctrl_handler, &vdec_ctrl_ops,
>>> + V4L2_CID_MIN_BUFFERS_FOR_CAPTURE, 1, 32, 1, 1);
>>> + if (ctrl)
>>> + ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE;
>>
>> Why is this volatile? That makes little sense.
>>
>>> +
>>> + ret = ctrl_handler->error;
>>> + if (ret) {
>>> + v4l2_ctrl_handler_free(ctrl_handler);
>>> + return ret;
>>> + }
>>> +
>>> + return 0;
>>> +}
>>> +EXPORT_SYMBOL_GPL(amvdec_init_ctrls);
>>
>> <snip>
>>
>> Regards,
>>
>> Hans
>>
>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2019-05-27 10:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 13:56 [PATCH v6 0/4] Add Amlogic video decoder driver Maxime Jourdan
2019-05-14 13:56 ` [PATCH v6 1/4] dt-bindings: media: add Amlogic Video Decoder Bindings Maxime Jourdan
2019-05-14 18:46 ` Martin Blumenstingl
2019-05-14 13:56 ` [PATCH v6 2/4] media: videodev2: add V4L2_FMT_FLAG_FIXED_RESOLUTION Maxime Jourdan
2019-05-14 13:56 ` [PATCH v6 3/4] media: meson: add v4l2 m2m video decoder driver Maxime Jourdan
2019-05-27 10:04 ` Hans Verkuil
2019-05-27 10:18 ` Neil Armstrong
2019-05-27 10:31 ` Hans Verkuil [this message]
2019-05-27 14:44 ` Maxime Jourdan
2019-05-27 14:54 ` Hans Verkuil
2019-05-27 15:41 ` Maxime Jourdan
2019-05-14 13:56 ` [PATCH v6 4/4] MAINTAINERS: Add meson video decoder Maxime Jourdan
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=79491b42-9296-1dfd-59ec-3ce7d58b2119@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=hans.verkuil@cisco.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mchehab@kernel.org \
--cc=mjourdan@baylibre.com \
--cc=narmstrong@baylibre.com \
/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).