Received: by 10.223.176.5 with SMTP id f5csp1815391wra; Thu, 8 Feb 2018 04:03:03 -0800 (PST) X-Google-Smtp-Source: AH8x2263FNsa68gfvk48sYGn94HpzJyHG0noMRRnYRH8l/q58Yk6PFWZCryb2cmuvfmTLxC6NtFo X-Received: by 2002:a17:902:6ac4:: with SMTP id i4-v6mr449142plt.304.1518091383254; Thu, 08 Feb 2018 04:03:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518091383; cv=none; d=google.com; s=arc-20160816; b=GYZPHZUzGartt2fQzjjpfmMP79m38lFOAkSBoF1CpEot8NhKXsT7AkLstYa53tPWI3 /0kAOD8hoMKNAsMhwTNwwrINZ+zG0KXmv1K38PdbRhZMfFa1MN41COnhaiUr75DJ+zjf ZRjglXVD5DCKXM7hZUA1m8qS1PA32LC60KLcC6R37q10TDehqr+x6VVhWntF44waZv/r /c/jP+GLMRL+65fcnGz8+zSQzkfMABcQBwW05pCu6lWG10bZuYdXv6Kv32JVBZByDz74 MfUC1CDUmTvLmamlOoXKPZ+G1CkamRLH+JAMLYkzW7Ypl80ioYoKFmst4y+JxYyCrjzf fP2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=90+sDpy/x18gNPQTFuk6vmSTdOiVZUG3WA0fIqQDO3k=; b=dx5E2D5N1kfeYBvxQ26I6g8TNHDYdTzZJimRuG4RQV+ji+KD6HMWMzfs6/hNHvy9qU ua1QxEx+XrjAXnR2TF+iOW4xcazc9y+kd2eIHOfS9VLejLY1r+6UqZARXdeHTGV32+rp xpV7H2OUAmY+pc+cZUSqAAXRXS1P9yXyH9zAp5yQIxzlO6FcEReyi6TLCgHJ8QIzZE1y 7YOkABodAv2DoqNEHZmvl1zgEEKJ3FtSyQJQq3MXCTohrCt4fmcyz8gqJEFPogGY8j91 D92jQUE0plDpQGFa5UXDkTR3GRst9CA7ul60dVPMwS6nv1XvMslcllyVOHD4g1zkH63a cBWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si511817pgs.358.2018.02.08.04.02.48; Thu, 08 Feb 2018 04:03:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbeBHMCD (ORCPT + 99 others); Thu, 8 Feb 2018 07:02:03 -0500 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:50661 "EHLO lb3-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbeBHMCB (ORCPT ); Thu, 8 Feb 2018 07:02:01 -0500 Received: from [IPv6:2001:420:44c1:2579:6057:603d:42a8:f06c] ([IPv6:2001:420:44c1:2579:6057:603d:42a8:f06c]) by smtp-cloud9.xs4all.net with ESMTPA id jktoehMbqoWCOjktre3zKR; Thu, 08 Feb 2018 13:02:00 +0100 Subject: Re: [PATCH v8 0/7] TDA1997x HDMI video reciver From: Hans Verkuil To: Philipp Zabel , Tim Harvey Cc: linux-media , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo , Steve Longerbeam , Hans Verkuil , Mauro Carvalho Chehab References: <1517948874-21681-1-git-send-email-tharvey@gateworks.com> <605fd4a8-43ab-c566-57b6-abb1c9f8f0f8@xs4all.nl> <7cf38465-7a79-5d81-a995-9acfbacf5023@xs4all.nl> <1518086816.4359.4.camel@pengutronix.de> <3b95357c-e44f-eed9-efd3-e2b0e4ff9eb2@xs4all.nl> Message-ID: Date: Thu, 8 Feb 2018 13:01:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <3b95357c-e44f-eed9-efd3-e2b0e4ff9eb2@xs4all.nl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfAl4rO7EcLhrbP1nNpV0t1174FwGp27adGw2GTT5GG8scITcbxrxxkTWyOSxvbtiZn9EXluKi9YmJh4ednTDd6ovSf7eq8Gzuv/hFAvtNu7cVFmVZf1Q iDbz+mNx8XO8sewq+ME7T5mG0U3+mbVlqAQaUYdLFjztomYQUY8bpAkhHDua5wRbXa1UtfViWiMw4drv+CbaE1fSbQV/z+f1ObRkpm4gbyqB/BRjHSWIz7KI 4dU4wHuSuEBhGZaAdvi/kUG1tylu/KcD0o8KCZoaZ7KNDN9vO9YwzDaxC9o2UKZsMMaM5OR/leIVfEMCkF9TEF12+jPDNB9EY7ZcmLTCBpIVeQJ2p++rI9lM 0MerW9HKnagAgZbhZXP88hdW9sWc4/p/Ofccu6zFrNKKA6JWyvTrRTITlYS0tY1sUPAuas4RCy5mjWCE6POqxmaklwITlAHg98ngehB54e6Yl3DAHO7ztmQH Z9xHe/NtQLRXs706P7P7byLTKRuqFKKzPTcsW3njybMhtiafOlk6NiDxZkd2RSFY8sPTpV/aSiz9IuQ1rIB2EvPxVeJOvILtwq0xobQIUq3B/c4cd/UKii9o 7Kw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/18 12:56, Hans Verkuil wrote: > On 02/08/18 11:46, Philipp Zabel wrote: >> On Wed, 2018-02-07 at 23:19 +0100, Hans Verkuil wrote: >>> On 02/07/2018 11:05 PM, Tim Harvey wrote: >>>> On Wed, Feb 7, 2018 at 1:09 AM, Hans Verkuil wrote: >>>>> On 02/07/18 09:22, Hans Verkuil wrote: >>>>>> On 02/07/2018 12:29 AM, Tim Harvey wrote: >>>>>>> Media Controller ioctls: >>>>>>> fail: v4l2-test-media.cpp(141): ent.function == >>>>>>> MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN >>>>>> >>>>>> Weird, this shouldn't happen. I'll look into this a bit more. >>>>> >>>>> Can you run 'mc_nextgen_test -e -i' and post the output? >>>>> >>>>> It's found in contrib/test. >>>>> >>>> >>>> root@ventana:~# ./v4l-utils/contrib/test/mc_nextgen_test -e -i >>>> Device: imx-media (driver imx-media) >>>> Bus: >>>> version: 0 >>>> number of entities: 24 >>>> number of interfaces: 24 >>>> number of pads: 48 >>>> number of links: 50 >>>> entity entity#1: 'unknown entity type' adv7180 2-0020, 1 pad(s), 1 source(s) >>>> entity entity#3: 'unknown entity type' tda19971 2-0048, 1 pad(s), 1 source(s) >>>> entity entity#5: 'unknown entity type' ipu1_vdic, 3 pad(s), 2 sink(s), >>>> 1 source(s) >>>> entity entity#9: 'unknown entity type' ipu2_vdic, 3 pad(s), 2 sink(s), >>>> 1 source(s) >>>> entity entity#13: 'unknown entity type' ipu1_ic_prp, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#17: 'unknown entity type' ipu1_ic_prpenc, 2 pad(s), 1 >>>> sink(s), 1 source(s) >>>> entity entity#20: 'V4L I/O' ipu1_ic_prpenc capture, 1 pad(s), 1 sink(s) >>>> entity entity#26: 'unknown entity type' ipu1_ic_prpvf, 2 pad(s), 1 >>>> sink(s), 1 source(s) >>>> entity entity#29: 'V4L I/O' ipu1_ic_prpvf capture, 1 pad(s), 1 sink(s) >>>> entity entity#35: 'unknown entity type' ipu2_ic_prp, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#39: 'unknown entity type' ipu2_ic_prpenc, 2 pad(s), 1 >>>> sink(s), 1 source(s) >>>> entity entity#42: 'V4L I/O' ipu2_ic_prpenc capture, 1 pad(s), 1 sink(s) >>>> entity entity#48: 'unknown entity type' ipu2_ic_prpvf, 2 pad(s), 1 >>>> sink(s), 1 source(s) >>>> entity entity#51: 'V4L I/O' ipu2_ic_prpvf capture, 1 pad(s), 1 sink(s) >>>> entity entity#57: 'unknown entity type' ipu1_csi0, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#61: 'V4L I/O' ipu1_csi0 capture, 1 pad(s), 1 sink(s) >>>> entity entity#67: 'unknown entity type' ipu1_csi1, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#71: 'V4L I/O' ipu1_csi1 capture, 1 pad(s), 1 sink(s) >>>> entity entity#77: 'unknown entity type' ipu2_csi0, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#81: 'V4L I/O' ipu2_csi0 capture, 1 pad(s), 1 sink(s) >>>> entity entity#87: 'unknown entity type' ipu2_csi1, 3 pad(s), 1 >>>> sink(s), 2 source(s) >>>> entity entity#91: 'V4L I/O' ipu2_csi1 capture, 1 pad(s), 1 sink(s) >>>> entity entity#97: 'unknown entity type' ipu1_csi0_mux, 3 pad(s), 2 >>>> sink(s), 1 source(s) >>>> entity entity#101: 'unknown entity type' ipu2_csi1_mux, 3 pad(s), 2 >>>> sink(s), 1 source(s) >>> >>> Yuck. So nobody in imx (and adv7180!) is setting a valid function. >>> And I see the mc_nextgen_test.c doesn't know all the latest functions >>> anyway. >> >> That's probably because for most of the entities it's a bit unclear >> which function should be assigned. > > Well, that's one reason. The other is that there never was a utility > to test this :-) > >> ipu[12]_csi[01]_mux are video multiplexers, so MEDIA_ENT_F_VID_MUX. I >> thought those should already be set correctly in the video-mux driver. > > They are. The mc_nextgen_test, media-ctl and now v4l2-ctl/v4l2-compliance > all have their own list of functions that they know about and it's all > different. It's one of the things I want to fix. > >> ipu[12]_csi[01] are the interfaces to the outside parallel busses, but >> they can also 'downscale' by skipping, skip frames and pack or expand >> pixels from the bus into the internal FIFOs that lead to the next >> element. These are not MEDIA_ENT_F_VID_IF_BRIDGE, are they? > > Yes, they are. One limitation of the current API is that you cannot > represent correctly devices with multiple functions. This is planned for > a long time now, but nobody actually did the work. So for now just fill > in the primary function with a comment that in the future other functions > should be set as well. > >> ipu[12]_vdic are mainly deinterlacers, so a new function >> MEDIA_ENT_F_PROC_VIDEO_DEINTERLACER ? These entities could also be used >> as composers in a mem2mem scenario (MEDIA_ENT_F_PROC_VIDEO_COMPOSER ?), >> but this is currently not supported. > > Yes, we need a PROC_VIDEO_DEINTERLACER function. > >> >> ipu[12]_ic_prp is just a tee element that feeds both ipu[12]_ic_prpenc >> and ipu[12]_ic_prpvf. These are both scalers and colorspace converters. >> MEDIA_ENT_F_PROC_VIDEO_SCALER ? >> MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV ? > > The tee element would be a new PROC_VIDEO_SPLITTER function. > > The other two would be scalers, but should add the VIDEO_PIXEL_ENC_CONV > function once it is possible to do so. > >> >> "ipu[12]_csi[01] capture" are the DMA elements writing to memory, so >> MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER ? > > These are likely to be filled correctly already. I've just added a commit > to v4l2-compliance to make it easier to see what function is used: > > v4l2-compliance -m0 -v Actually, can you run this using the latest v4l-utils version for the imx and post the output? Regards, Hans