Received: by 10.223.176.5 with SMTP id f5csp1126818wra; Tue, 6 Feb 2018 13:11:00 -0800 (PST) X-Google-Smtp-Source: AH8x224uH8Ki484rOEP27+rWCvxLW9H5Epxx30XGjyW0ISxOOl7SW+Mp3f5Uml5I8pvBmGFpwMxW X-Received: by 10.98.50.3 with SMTP id y3mr3609878pfy.98.1517951460380; Tue, 06 Feb 2018 13:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517951460; cv=none; d=google.com; s=arc-20160816; b=0Y7KvFKYOHLtAAL6G6KROPmuUAfsCtg8AxHefagpV0AmdB/nv/CFia7e6A29jerr0m ugH2IP38Vm2mKhQMS7+oYXLdHwNpsEfaECQt5NezKOcZEG0BcxNEHlf5HctXcg7biaZQ xxbNWez8NEboZLKbkkAjSTyDxUNza0bN8kuyQ20h3t1IjMmqw8rlIzshVK2j6R2MI9oC Qk52q0lPMCBYPdookwglyMwtXmikhUb9uYPfxs9rcSrKruxtEJJ0DcAlI+9JZcBHGCq3 6oe36j33iiSyQRX+r8vMi46z/FiXL6j4puQCXmPJ2y3J7LprWI7bK25NPRrofNPB2YOH Qq4Q== 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:from:references:cc:to:subject:arc-authentication-results; bh=UNmstz7q+2XElYWEMZ6kN9lZWtylckG/c9I6sSe1LEA=; b=sIK3QFySRV+HBVCSQ+pPaTOeHbOyL98+mPTpJNrZ7vZbJlqmtK7ttaYHLCPGgFbOaU 74EWN148IsYw8JuiUAkQh53bFcEPsunSyTQHyBGDLACytqNlJKQnicqLdPEbAjfh5R5Z kg9eOATf+fKPtLzEImoDOAumodx8psSWIl2+viRGCoNYPmT3Fh181Jfzt8m31Ox97NxO ZKrN1225480XvGDunqHTcG0Qa9B10r5R4uq+fiYHp+ubzk2eZpl+/PMp5mNAolXEMfvZ 1jEK1MHruunFqzaucPjPU/zdquRsQEJWS0x0kr7e7i9Qfm4j2XvHRsYr0IQbA7/3LmaJ Y1ww== 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 n9si447512pgc.36.2018.02.06.13.10.46; Tue, 06 Feb 2018 13:11:00 -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 S1753936AbeBFVJb (ORCPT + 99 others); Tue, 6 Feb 2018 16:09:31 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:53802 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753156AbeBFVJ3 (ORCPT ); Tue, 6 Feb 2018 16:09:29 -0500 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud8.xs4all.net with ESMTPA id jAUWejqn8ar0wjAUaehKMd; Tue, 06 Feb 2018 22:09:28 +0100 Subject: Re: [PATCH v8 5/7] media: i2c: Add TDA1997x HDMI receiver driver To: Tim Harvey Cc: linux-media , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo , Steve Longerbeam , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab References: <1517948874-21681-1-git-send-email-tharvey@gateworks.com> <1517948874-21681-6-git-send-email-tharvey@gateworks.com> <3630ba30-eb18-0829-7b0c-f0a786232969@xs4all.nl> From: Hans Verkuil Message-ID: <1ff2a81e-04f7-02eb-6ba2-70227665839b@xs4all.nl> Date: Tue, 6 Feb 2018 22:09:24 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfPc9k8/g2db2f95tja+HFEllbSL5r2ZH9reY+TegSOtJCAlyd8S94WiUmIC/cNyO3pq6lr+kypoPKZI+gx44WI4tRu4gOxbeJnMxDJXkh65nUl3xZ8XP O24p5Z+6TseO2a23PkwfBX1xRoO9UbH0rtZwYjulwbJHKyiQ9Qo8IAIVKa0V67pWQLcohY8AiLXE6Q64SVglrqtS8B4CI9FwYHHhJ9Px1oAVOatvtax8hwBu 8jo469sufwonOU9bMI3uhy1+KJ/FP9uki9uuvL05xyfJnh1AnbFkvFiwEHoiATFlevbPrNYWiLXtxJavuOHrRtPPFTy0GKwbLrjd3/Rk7eXPsn+CLTO1EM54 WYkheqalukjc2x3lK2Zje5hKDBvTkKUpTwzlXn0CiJew44oZFpyGxDHZxifmaBK4qPuqrU5J1DIF4dB1WaFFT8UbWTIia5+11qbPxZDaO3wRl9maV6QGa7Mr GBsHwo8UM3HZ5FKP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/06/2018 10:03 PM, Tim Harvey wrote: > On Tue, Feb 6, 2018 at 12:38 PM, Hans Verkuil wrote: >> On 02/06/2018 09:27 PM, Tim Harvey wrote: >>> Add support for the TDA1997x HDMI receivers. >>> >>> Cc: Hans Verkuil >>> Signed-off-by: Tim Harvey >>> --- >> >> >> >>> +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