Received: by 10.223.176.5 with SMTP id f5csp1122480wra; Tue, 6 Feb 2018 13:05:56 -0800 (PST) X-Google-Smtp-Source: AH8x2276Ii3C815pzQLhENhYwzKDE9Mv1wBxgdWeaMwRQh2A7IEGwH5Buvv+0Pxl97udC10u7Tzc X-Received: by 10.99.109.4 with SMTP id i4mr2947402pgc.376.1517951156526; Tue, 06 Feb 2018 13:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517951156; cv=none; d=google.com; s=arc-20160816; b=fZCX+iMFiaKb8zHo0JV03NC+gqafn+uBXKqxXwFw+GIzsgEPxzYdEQ54UEYutuHffc zBM426acuV+nbst/kxbQq67HrBr8l3P9mMOcP3oFLEn1h9i3S3pNXJtFIijJ7h/3U+uC Jo4a1MVJ9GWXOB+jN8v4gZWiMVtjLhGRxsmQeECMiK2FCUlsTpzVfZ2OcbZZ59+KIEOY x1DdhgrdWgFitbF0k0RY7y3aEJtSxCy6Eie6afYxaIxnn3j+Xdg6cXhc5EyfRUJ8GlAa QDRvTfhAn0k9fgyaaISKOf6v4a7dQfCXd1dmaSI5rvns07X/YIpWelyGgL86of6GCW0A pphg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=JElJS9c0MndLzOS+ugUtWsHg6ZfE1oRWID/QOjGGDv0=; b=CKUl3ly8GPYNQelKOsJyHeMJkISB3Lf5Q+bKcWTfa6GzNiPTA6ieEGRAHGExyrI1P5 FUS9SGc4e+XCTzJ0vBU8EY0bwFygkNj0YjJ1s+vH+bCCzoAaoht9MbJz6+o/JTcLjiz4 zrv/Pybtoa2f3fGeHgpVzZJf8S7U2nT/kUMD7km2fib4FI6ZFcArxdsChrglecjvm7zg Rp5xI2f65GYGWLtBnq1MUo+NYYztZBebhvv90PzEAp/djhhRXqsP25vZJiQcg+WdSHFd sPo8mLVb1lnLfMN3van2m/uvjD+ioHvR9pUbMIWbnofRPwnI/MAvMgCtpAwEsKe8do/O qHLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=G3Q7Goh3; 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 v1-v6si2912053plb.466.2018.02.06.13.05.42; Tue, 06 Feb 2018 13:05:56 -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; dkim=pass header.i=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=G3Q7Goh3; 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 S1754025AbeBFVDd (ORCPT + 99 others); Tue, 6 Feb 2018 16:03:33 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54457 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753382AbeBFVDb (ORCPT ); Tue, 6 Feb 2018 16:03:31 -0500 Received: by mail-wm0-f66.google.com with SMTP id i186so6285778wmi.4 for ; Tue, 06 Feb 2018 13:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JElJS9c0MndLzOS+ugUtWsHg6ZfE1oRWID/QOjGGDv0=; b=G3Q7Goh3k3MX+KePBeTxZxluUkOV+1m5bUxTNc0F6dInLXzXgh//enjgL6caiJSfgj 6bdAxo5NvuIxYufvz5xM/mmrPStL2DzzTzfxtnNHZUzWOzVW+gRB7+IXtPdWO5RSTrqK N+OJCKKWF2tWkqhRxEoEKcv0BdltcFn6DKBa6SiDR62jvaDiS2xf6uwcoLJvAfXhbLYf IjbvVsc3zFniWsO4NLDKKtn8aVx4oSWwcipGp3HLRWP6KSIw2ABPJ1eLVL9kBCf+vE+u o8+VyhI5izeE6CHuwlySP8p2H1HtccXKuZ4l8XJAsycYi0glySl9LcNsOYzSmSXAiJLk Pd9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JElJS9c0MndLzOS+ugUtWsHg6ZfE1oRWID/QOjGGDv0=; b=b4tGxXiozxU3LC4iBtxYwwBxk8FszFP5j4MVKypa0LFrnJRamOuXrQt5OqvJUHNvZi LBbpoQq4Q8JO4nziH8ZycJWZNYo1D5mWCQBLnuG7QPE9w2RS7pTRmhTm1xp6dNJyn2YM OXYLHKmhNOd3da5JwEBd1aODZOQnKS+zLlvAvUVHXfvc8fmO0hV1B4mW7HTps1T2q95l LlNqE1vOzv7y1Hs3bzXgeoC0DssQAdCSKLJ9mtOau/HmjRLQ0VQlGZ6MbXmMfArlEHMP 6EOlbL1bAXI4bTzrWuDjkfuifxTj4QRFeqnG8PYAypSJyVfJPjQBhxGx1Yn0DSz0sofy zLMw== X-Gm-Message-State: APf1xPBscpDG3k731BM18mBG2EwqPPwWJTBn4AvPiMclp2cu2BtH0aEp FVT9dwbuqwp8dWaTyQlnx1GrFnCEx+jiwSPiHePfIg== X-Received: by 10.28.153.147 with SMTP id b141mr2913015wme.47.1517951009837; Tue, 06 Feb 2018 13:03:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.66.74 with HTTP; Tue, 6 Feb 2018 13:03:29 -0800 (PST) In-Reply-To: <3630ba30-eb18-0829-7b0c-f0a786232969@xs4all.nl> 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: Tim Harvey Date: Tue, 6 Feb 2018 13:03:29 -0800 Message-ID: Subject: Re: [PATCH v8 5/7] media: i2c: Add TDA1997x HDMI receiver driver To: Hans Verkuil 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?) > > 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; Regards, Tim