devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Tim Harvey <tharvey@gateworks.com>
Cc: linux-media <linux-media@vger.kernel.org>,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Shawn Guo <shawnguo@kernel.org>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Hans Verkuil <hansverk@cisco.com>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>
Subject: Re: [PATCH v8 5/7] media: i2c: Add TDA1997x HDMI receiver driver
Date: Tue, 6 Feb 2018 22:09:24 +0100	[thread overview]
Message-ID: <1ff2a81e-04f7-02eb-6ba2-70227665839b@xs4all.nl> (raw)
In-Reply-To: <CAJ+vNU1SWma59YwvRO7jDAu2=ndgSU6CgYtKs0792+oqDAEtrQ@mail.gmail.com>

On 02/06/2018 10:03 PM, Tim Harvey wrote:
> On Tue, Feb 6, 2018 at 12:38 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> On 02/06/2018 09:27 PM, Tim Harvey wrote:
>>> Add support for the TDA1997x HDMI receivers.
>>>
>>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>>> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
>>> ---
>>
>> <snip>
>>
>>> +static int tda1997x_get_dv_timings_cap(struct v4l2_subdev *sd,
>>> +                                    struct v4l2_dv_timings_cap *cap)
>>> +{
>>> +     if (cap->pad != TDA1997X_PAD_SOURCE)
>>> +             return -EINVAL;
>>> +
>>> +     *cap = tda1997x_dv_timings_cap;
>>> +     return 0;
>>> +}
>>> +
>>> +static int tda1997x_enum_dv_timings(struct v4l2_subdev *sd,
>>> +                                 struct v4l2_enum_dv_timings *timings)
>>> +{
>>> +     if (timings->pad != TDA1997X_PAD_SOURCE)
>>> +             return -EINVAL;
>>> +
>>> +     return v4l2_enum_dv_timings_cap(timings, &tda1997x_dv_timings_cap,
>>> +                                     NULL, NULL);
>>> +}
>>
>> You shouldn't need this pad test: it's done in the v4l2-subdev.c core code
>> already. But please double-check :-)
>>
> 
> oh right - forgot to check that. Yes, v4l2-subdev.c has pad bounds
> checking on all ops I use so I can remove them.
> 
>> Can you post the output of the v4l2-compliance test? I'm curious to see it.
> 
> it's in the cover letter (should I move it to the driver patch for
> subsequent submittals?)

Ah, it was all the way down after the MC topology. That's why I missed it.

> 
>>
>> Can you also try to run v4l2-compliance -m /dev/mediaX? That also tests
>> whether the right entity types are set (note: testing for that should
>> also happen in the subdev compliance test, but I haven't done that yet).
>>
> 
> root@ventana:~# v4l2-compliance -m0
> v4l2-compliance SHA   : b2f8f9049056eb6f9e028927dacb2c715a062df8
> Media Driver Info:
>         Driver name      : imx-media
>         Model            : imx-media
>         Serial           :
>         Bus info         :
>         Media version    : 4.15.0
>         Hardware revision: 0x00000000 (0)
>         Driver version   : 4.15.0
> 
> Compliance test for device /dev/media0:
> 
> Required ioctls:
>         test MEDIA_IOC_DEVICE_INFO: OK
> 
> Allow for multiple opens:
>         test second /dev/media0 open: OK
>         test MEDIA_IOC_DEVICE_INFO: OK
>         test for unlimited opens: OK
> 
> Media Controller ioctls:
>                 fail: v4l2-test-media.cpp(141): ent.function ==
> MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN
>         test MEDIA_IOC_G_TOPOLOGY: FAIL
>                 fail: v4l2-test-media.cpp(256):
> v2_entities_set.find(ent.id) == v2_entities_set.end()
>         test MEDIA_IOC_ENUM_ENTITIES/LINKS: FAIL
>         test MEDIA_IOC_SETUP_LINK: OK
> 
> Total: 7, Succeeded: 5, Failed: 2, Warnings: 0
> 
> foiled again!
> 
> Is something missing after v4l2_i2c_subdev_init() or is this perhaps
> something missing in the imx media drivers?
> 
>         v4l2_i2c_subdev_init(sd, client, &tda1997x_subdev_ops);
>         snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
>                  id->name, i2c_adapter_id(client->adapter),
>                  client->addr);
>         sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
>         sd->entity.ops = &tda1997x_media_ops;

Yeah, I was afraid of that. Anyway, I saw some issues in the subdev compliance.
I'll reply to the cover letter about that.

Regards,

	Hans

  reply	other threads:[~2018-02-06 21:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 20:27 [PATCH v8 0/7] TDA1997x HDMI video reciver Tim Harvey
     [not found] ` <1517948874-21681-1-git-send-email-tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
2018-02-06 20:27   ` [PATCH v8 1/7] v4l2-dv-timings: add v4l2_hdmi_colorimetry() Tim Harvey
2018-02-07  1:22     ` Randy Dunlap
2018-02-06 20:27   ` [PATCH v8 5/7] media: i2c: Add TDA1997x HDMI receiver driver Tim Harvey
     [not found]     ` <1517948874-21681-6-git-send-email-tharvey-UMMOYl/HMS+akBO8gow8eQ@public.gmane.org>
2018-02-06 20:38       ` Hans Verkuil
2018-02-06 21:03         ` Tim Harvey
2018-02-06 21:09           ` Hans Verkuil [this message]
2018-02-06 20:27 ` [PATCH v8 2/7] media: v4l-ioctl: fix pad for VIDIOC_DV_TIMIGNS_CAP Tim Harvey
2018-02-06 20:27 ` [PATCH v8 3/7] MAINTAINERS: add entry for NXP TDA1997x driver Tim Harvey
2018-02-06 20:27 ` [PATCH v8 4/7] media: dt-bindings: Add bindings for TDA1997X Tim Harvey
2018-02-06 20:27 ` [PATCH v8 6/7] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW54xx Tim Harvey
2018-02-06 20:27 ` [PATCH v8 7/7] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW551x Tim Harvey
2018-02-06 21:21 ` [PATCH v8 0/7] TDA1997x HDMI video reciver Hans Verkuil
     [not found]   ` <c7771c44-a9ff-0207-38f6-28bcc06ccdee-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
2018-02-06 23:29     ` Tim Harvey
2018-02-07  8:22       ` Hans Verkuil
2018-02-07  9:09         ` Hans Verkuil
2018-02-07 22:05           ` Tim Harvey
2018-02-07 22:19             ` Hans Verkuil
2018-02-08 10:46               ` Philipp Zabel
2018-02-08 11:56                 ` Hans Verkuil
2018-02-08 12:01                   ` Hans Verkuil
2018-02-08 15:13                     ` Philipp Zabel
2018-02-08 15:29                       ` 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=1ff2a81e-04f7-02eb-6ba2-70227665839b@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hansverk@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=p.zabel@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=tharvey@gateworks.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).