From patchwork Tue Jan 8 14:51:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10752173 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E905913B4 for ; Tue, 8 Jan 2019 14:52:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D892128C91 for ; Tue, 8 Jan 2019 14:52:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD0EB28D14; Tue, 8 Jan 2019 14:52:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B0A728CEB for ; Tue, 8 Jan 2019 14:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728730AbfAHOwr (ORCPT ); Tue, 8 Jan 2019 09:52:47 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:43430 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728453AbfAHOwr (ORCPT ); Tue, 8 Jan 2019 09:52:47 -0500 Received: by mail-pf1-f195.google.com with SMTP id w73so2029985pfk.10; Tue, 08 Jan 2019 06:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=krPUU6Jax3C9tnqQTpQYlqQiipvuleWJ89SiJXQrvQA=; b=DRBKEt4GQuQbWzETVMqIcaL7hCFzDHEXpEXM2maONiCgYQZjxlLl+sidrfGDd/QDWj 0nbnEznkVRSx3qhJuEEuK3X6cvtPws41d/KxnF2JcznudYvvU4d/wa9klmDA4J6S7Mm3 F2lcLAPh4Ciczkwk+LHAuPf6sr5FptF3gnWFmB+ptzDZHXsuEiwWIhz9R69drXF65g88 n5s7ce1wEC7RFUxrc4+HNAMPTST+62A2PlOqVDjlQM9BDTSyuyO3BpmGehznbnrGpRDm 3eWoK6CYtTfg8I+xxD2fyJVz2vyJvUsPybRbI/yseJ15mjDQOEAFZ3rEuHdD4RB7fSlq 6Icg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=krPUU6Jax3C9tnqQTpQYlqQiipvuleWJ89SiJXQrvQA=; b=P6ruhx3GwVSbR33XoYyc1YugWwAnv8Bzuo+Yfuu5+Ek8fvSW3aFxD2Y2QBEX5bdf0D Xmq9jNcssainXMEuZX2iZh67bE+LS+Q6NtgT+vM84WCJU1vwTfmzad+22Tp4+P9Il5AF h64RccEoKfU1KIl4HOu6SGvn0YmHfkSKgfji8MwucnFS3UChb24EGklruAOz34nL4Pi5 oFLuWSJsTAUvMbH5pM9XYRDVTDS/uvuhoaSCh6Z9OhA4Tlo5SKR4lowWHISyyyfLhXn8 YM6A2k1fr6//pdNCYn5zW4MuJN3tjJNcAd9rlXr2FlupPAEfj/rqKa+o52UZMcEuefN5 3bzQ== X-Gm-Message-State: AJcUukfRdDaovzDP7hNPG74mV85CXs+eNLeSQ5E2kai9738VycgPabTN TsieIoozXTx/mOr5gN/J4u4itgSc X-Google-Smtp-Source: ALg8bN5XmJimiLZ6eS5U08x4UHbEcfkglze/TJ0MpsZVQdQZMSfHdnSR5AJdiHO+U3YUlpd3hKePRw== X-Received: by 2002:a63:d208:: with SMTP id a8mr1758817pgg.77.1546959165999; Tue, 08 Jan 2019 06:52:45 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:5cb2:2bb:ff67:c70d]) by smtp.gmail.com with ESMTPSA id n78sm53546990pfk.19.2019.01.08.06.52.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Jan 2019 06:52:45 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Akinobu Mita , Guennadi Liakhovetski , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v2 13/13] media: mt9m001: set all mbus format field when G_FMT and S_FMT ioctls Date: Tue, 8 Jan 2019 23:51:50 +0900 Message-Id: <1546959110-19445-14-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546959110-19445-1-git-send-email-akinobu.mita@gmail.com> References: <1546959110-19445-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver doesn't set all members of mbus format field when the VIDIOC_SUBDEV_{S,G}_FMT ioctls are called. This is detected by v4l2-compliance. Cc: Guennadi Liakhovetski Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- * No changes from v1 drivers/media/i2c/mt9m001.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/i2c/mt9m001.c b/drivers/media/i2c/mt9m001.c index f97ab48..61e5e6f 100644 --- a/drivers/media/i2c/mt9m001.c +++ b/drivers/media/i2c/mt9m001.c @@ -340,6 +340,9 @@ static int mt9m001_get_fmt(struct v4l2_subdev *sd, mf->code = mt9m001->fmt->code; mf->colorspace = mt9m001->fmt->colorspace; mf->field = V4L2_FIELD_NONE; + mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + mf->quantization = V4L2_QUANTIZATION_DEFAULT; + mf->xfer_func = V4L2_XFER_FUNC_DEFAULT; return 0; } @@ -400,6 +403,10 @@ static int mt9m001_set_fmt(struct v4l2_subdev *sd, } mf->colorspace = fmt->colorspace; + mf->field = V4L2_FIELD_NONE; + mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + mf->quantization = V4L2_QUANTIZATION_DEFAULT; + mf->xfer_func = V4L2_XFER_FUNC_DEFAULT; if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) return mt9m001_s_fmt(sd, fmt, mf);