From patchwork Sat Dec 8 04:44:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10719165 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 64D7A18A7 for ; Sat, 8 Dec 2018 04:45:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5438C2A8F1 for ; Sat, 8 Dec 2018 04:45:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 489DB2AE27; Sat, 8 Dec 2018 04:45:06 +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 E7D002AA45 for ; Sat, 8 Dec 2018 04:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726104AbeLHEpB (ORCPT ); Fri, 7 Dec 2018 23:45:01 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38245 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLHEpB (ORCPT ); Fri, 7 Dec 2018 23:45:01 -0500 Received: by mail-pg1-f193.google.com with SMTP id g189so2588515pgc.5 for ; Fri, 07 Dec 2018 20:45:00 -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=WBQlmUFigG6XjRPhVyNz9kgraxu7zwYVtMWk1l0gYuk=; b=CJsn5CnULZKRoGKBpPOdzdE6k84qQzTH9nftCiKyQDSLX2jGnxWPANKl/3prX9X+zV +ecie3GBJ2IXmQJSjk8JmbMKxjk/quxbw0bjFijsCmUMsck6xGNgnDQyCElamwo12G5a X94X7UHorTzvN2mnoY2SWT9m0BYwmlg9hpdkS0FYGaH1z4RO14rcoFIDLFw3OtXhYVdi IFHPJb5u6ylqC/3+sUbyQDDPR6vTeFt+BE4jYLrHy/yNWa0mK601LMxwNG8tTSPqEW9W EAlLWScFOOHCpC0egsywOxV9+vzopVNqiUKBr7B6BQMy2wIezK+vfwjgU1+dY1J2T8u9 rlKQ== 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=WBQlmUFigG6XjRPhVyNz9kgraxu7zwYVtMWk1l0gYuk=; b=unIj2DbUf7Rac+3IadtFh0thQ7389cClRXjQ2bqKP9KENsW2m5sNfUN+UwXnKEOUxm RIeaxaqQM2jHZITNeWp8xfksABQmkwbjL+cpckRlfJENyqe9gzX4L7wPIzxOu3B+m6nu 4TTc0Qo+JY2Bf26QdT3yJmaxYDP1Jn9IYWwfyKkKWf+ez2hJng7BMW3Ep2cUQ8+BIvbR GxOxc16qldfGg61e14NkySehIakzgGFRQVukXE9kEYlk0RR5sEE+Aj8BhgL8W+WTlZnn 3ciWFwKF1ydQJZA84V0UZ7/D+oSBmxgoS6Sb5nlBKjHT5zNdTFbxpeqIfqMqT2yl/lEM MR0w== X-Gm-Message-State: AA+aEWappzWA64UhPhMu0iDi6T0Xgp303Coi/QarQybZXsrvqSIEhKmU BXtuzdtxCTE6e8M0nmapqiZOATav X-Google-Smtp-Source: AFSGD/WJTyOZ3fLDNnOCx8NiEcC0UZATcfkTqjRW/xzJeqi3s0XoGy7v/rmsoDozqUriVoOOJr09qA== X-Received: by 2002:a62:710a:: with SMTP id m10mr4769757pfc.69.1544244300478; Fri, 07 Dec 2018 20:45:00 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:9ca3:939e:b94a:438e]) by smtp.gmail.com with ESMTPSA id h74sm8248193pfd.35.2018.12.07.20.44.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Dec 2018 20:45:00 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 1/3] media: ov2640: set default window and format code at probe time Date: Sat, 8 Dec 2018 13:44:44 +0900 Message-Id: <1544244286-11597-2-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544244286-11597-1-git-send-email-akinobu.mita@gmail.com> References: <1544244286-11597-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 Set default window and format code at probe time instead of always checking if they have not been set yet when VIDIOC_SUBDEV_G_FMT ioctl is called. This change simplifies the next patch (make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY). Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index d8e91bc..a07e6f2 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -842,9 +842,6 @@ static int ov2640_set_params(struct i2c_client *client, u8 val; int ret; - if (!win) - return -EINVAL; - switch (code) { case MEDIA_BUS_FMT_RGB565_2X8_BE: dev_dbg(&client->dev, "%s: Selected cfmt RGB565 BE", __func__); @@ -929,10 +926,6 @@ static int ov2640_get_fmt(struct v4l2_subdev *sd, if (format->pad) return -EINVAL; - if (!priv->win) { - priv->win = ov2640_select_win(SVGA_WIDTH, SVGA_HEIGHT); - priv->cfmt_code = MEDIA_BUS_FMT_UYVY8_2X8; - } mf->width = priv->win->width; mf->height = priv->win->height; @@ -1193,6 +1186,9 @@ static int ov2640_probe(struct i2c_client *client, if (ret) goto err_clk; + priv->win = ov2640_select_win(SVGA_WIDTH, SVGA_HEIGHT); + priv->cfmt_code = MEDIA_BUS_FMT_UYVY8_2X8; + v4l2_i2c_subdev_init(&priv->subdev, client, &ov2640_subdev_ops); priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; From patchwork Sat Dec 8 04:44:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10719163 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 A02D8109C for ; Sat, 8 Dec 2018 04:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CCD52A8F1 for ; Sat, 8 Dec 2018 04:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 813912B05F; Sat, 8 Dec 2018 04:45:05 +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 1432B2AE27 for ; Sat, 8 Dec 2018 04:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbeLHEpD (ORCPT ); Fri, 7 Dec 2018 23:45:03 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43531 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLHEpD (ORCPT ); Fri, 7 Dec 2018 23:45:03 -0500 Received: by mail-pg1-f194.google.com with SMTP id v28so2578876pgk.10 for ; Fri, 07 Dec 2018 20:45:02 -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=Eo9cjpGrYKwVLG6uLmFxmXJ7VVMeoxAuQcb66SpiWa8=; b=OdEVYbivilLm3CsUH/Z9NZWo7uwxl3Qcz13X4L9zkE5/TT3jHg+rRhwB88gNfCZKfL eqx7Yl3bqevnIp0ljJoQGMOrZC34DVymfEvwaHl/3Xor68QJUvOTf+U00QuUO/503U4D OLGuJlBzMljY2Qm8Pv70/OgqEx0/Bg4uSzY72Huz0+Eu5nNq3ICVJ/i8K6Ur0anBzgxS KjS08NHppJfEBga/6V+CmTTi2Wmu2H/nHkGGF/O0/wZSlkZ1Z+YzIORLtA/ZBu2bjtAz ayzyM2BJzas4Gqpni/DLLw5e4ubesyVdI5Q60hpBx3YHkKc1/e6D8toLlLwbKZpWcjJL Fh+w== 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=Eo9cjpGrYKwVLG6uLmFxmXJ7VVMeoxAuQcb66SpiWa8=; b=NriSHmttYqSz6bnfGlEFSokIjYITxLq/zMUEHiRsepV96/ee+ew5F5tgbaxgVMvyqV xkD37M8f7IjtZz4Cihk+Rnb6EmXxKjx/t2nMiTynWjmKizmumeYfj5Usm7i6JGyAV6Je 8bpQ5k6gooRx2cBxDZIvs7pZTf+QFGhe4cADyFOwcM5A+Nw/xAt5QDqtIaT4pZLgw9O6 UX/gWu5jvgrVKi1LDVbhWjgMQPN4jBliL++HT2UYQOsLNU+7ExZq85p7++lsFoFQXKaU zKj9jrNdLnZho84rPMrnZsoaY7DBWk60Ilh8NeZz8U0/Q2mW5eZeABVn1mW7VqOI238A Yz+Q== X-Gm-Message-State: AA+aEWY6TAgBb2d/OPWtyYPXTjyBR3EfPFAN1ARCViyfCkM+sLA5M8Kp o2/V8sdhfbn0K3VSoDXOavyr4ZSJ X-Google-Smtp-Source: AFSGD/V29lYZolZxJU2DNS27Vfyc//OvkOuZPZeGz8JtZ6Gip6VqctSrfp/GFxbTXOj2t0/WfsPCEA== X-Received: by 2002:a62:6f88:: with SMTP id k130mr4761569pfc.234.1544244302143; Fri, 07 Dec 2018 20:45:02 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:9ca3:939e:b94a:438e]) by smtp.gmail.com with ESMTPSA id h74sm8248193pfd.35.2018.12.07.20.45.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Dec 2018 20:45:01 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 2/3] media: ov2640: make VIDIOC_SUBDEV_G_FMT ioctl work with V4L2_SUBDEV_FORMAT_TRY Date: Sat, 8 Dec 2018 13:44:45 +0900 Message-Id: <1544244286-11597-3-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544244286-11597-1-git-send-email-akinobu.mita@gmail.com> References: <1544244286-11597-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 The VIDIOC_SUBDEV_G_FMT ioctl for this driver doesn't recognize V4L2_SUBDEV_FORMAT_TRY and always works as if V4L2_SUBDEV_FORMAT_ACTIVE is specified. Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index a07e6f2..5f888f5 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -926,6 +926,12 @@ static int ov2640_get_fmt(struct v4l2_subdev *sd, if (format->pad) return -EINVAL; + if (format->which == V4L2_SUBDEV_FORMAT_TRY) { + mf = v4l2_subdev_get_try_format(sd, cfg, 0); + format->format = *mf; + + return 0; + } mf->width = priv->win->width; mf->height = priv->win->height; @@ -992,6 +998,26 @@ static int ov2640_set_fmt(struct v4l2_subdev *sd, return ret; } +static int ov2640_init_cfg(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg) +{ + struct i2c_client *client = v4l2_get_subdevdata(sd); + struct ov2640_priv *priv = to_ov2640(client); + struct v4l2_mbus_framefmt *try_fmt = + v4l2_subdev_get_try_format(sd, cfg, 0); + + try_fmt->width = priv->win->width; + try_fmt->height = priv->win->height; + try_fmt->code = priv->cfmt_code; + try_fmt->colorspace = V4L2_COLORSPACE_SRGB; + try_fmt->field = V4L2_FIELD_NONE; + try_fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + try_fmt->quantization = V4L2_QUANTIZATION_DEFAULT; + try_fmt->xfer_func = V4L2_XFER_FUNC_DEFAULT; + + return 0; +} + static int ov2640_enum_mbus_code(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_mbus_code_enum *code) @@ -1101,6 +1127,7 @@ static const struct v4l2_subdev_core_ops ov2640_subdev_core_ops = { }; static const struct v4l2_subdev_pad_ops ov2640_subdev_pad_ops = { + .init_cfg = ov2640_init_cfg, .enum_mbus_code = ov2640_enum_mbus_code, .get_selection = ov2640_get_selection, .get_fmt = ov2640_get_fmt, From patchwork Sat Dec 8 04:44:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10719167 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 E26B1109C for ; Sat, 8 Dec 2018 04:45:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1F432D68A for ; Sat, 8 Dec 2018 04:45:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C58DE2D79F; Sat, 8 Dec 2018 04:45:07 +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 7130B2D68A for ; Sat, 8 Dec 2018 04:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726131AbeLHEpF (ORCPT ); Fri, 7 Dec 2018 23:45:05 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33940 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLHEpF (ORCPT ); Fri, 7 Dec 2018 23:45:05 -0500 Received: by mail-pf1-f194.google.com with SMTP id h3so2883276pfg.1 for ; Fri, 07 Dec 2018 20:45:04 -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=w8ZQhO0cjjcHm7rHaC9H5vuwi0uhHH55gn+KwXZEP2U=; b=TqZUlj3Zm6YSUYzP86VEojf+UvszEgEqdCRzlVekOL2ahSI28oFNnb4+hHh3wWvjMf 1sTNQ2aaC7244qh4hY0Higddnce96v5UfsPtsZMZN/GG8KyEKGhOfMe1vM1HCAMTt7j6 fDp6sxaAJc+sELfU4gPCQv9ST9za/atgA7LJA33cRvp0g9ln40Hh5KLh3CaqOsNW4fDT 7TzHwQ034WUfX6NBya5lJ3rQQA5PCtw2sNF8FUj+I0DuOdI1IyvCITdhXeMTrkESGWao aNA9Wbrvw8CEpKeYnU6oC45yXEJDjLw8Pf2xyFJXWWFTlJIwclYOaqzmMLua50zeEKAk +Bxw== 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=w8ZQhO0cjjcHm7rHaC9H5vuwi0uhHH55gn+KwXZEP2U=; b=dJfrG1b35ly8rtAJomt9or7Q7EiGleFKitbnhIqoozYta8jsjQq7Ao92T0rQ2nziIO 0/abQHAMTOQ69usQuB7Ab1sy9EASly37i4bb7wutsLBRAbXemxLw4QFH7BRKNuj15km2 faKQVlzJvo+JVQc2bWrp+EUSDnHGnaVzOBhxoN1dlmuLnv6w3LW+4vN7Pd+4IlemmLd8 4JX40UKk986Oy76dkxy9xhqrd/jo1UcCQItJFmnVmx7dph1WrenasVs5TzBc2mx7caYB 1BV4YeKk1ogtl81ubxrHx2OQXjOXs3rvSppIiBH/gdnxEEMwp+Us0N158pdS3B3RRDyF VH1w== X-Gm-Message-State: AA+aEWbJfhqwG+p1LP8CoOFOryd032Zox+vc12l3q3P66GeRRYbN6i9e I9Gb6jfLA1BHbu4YQ4cSicFuY/wA X-Google-Smtp-Source: AFSGD/W587gybZw5IqvksHp/UolaTgB3UiX6ncQ71cnzBeD1vGsyagGNiaXqoNQjnqbpaR7rFKaaSA== X-Received: by 2002:a62:60c5:: with SMTP id u188mr4839977pfb.4.1544244303837; Fri, 07 Dec 2018 20:45:03 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:9ca3:939e:b94a:438e]) by smtp.gmail.com with ESMTPSA id h74sm8248193pfd.35.2018.12.07.20.45.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Dec 2018 20:45:03 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 3/3] media: ov2640: set all mbus format field when G_FMT and S_FMT ioctls Date: Sat, 8 Dec 2018 13:44:46 +0900 Message-Id: <1544244286-11597-4-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544244286-11597-1-git-send-email-akinobu.mita@gmail.com> References: <1544244286-11597-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: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov2640.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index 5f888f5..439c6da 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -938,6 +938,9 @@ static int ov2640_get_fmt(struct v4l2_subdev *sd, mf->code = priv->cfmt_code; mf->colorspace = V4L2_COLORSPACE_SRGB; 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; } @@ -964,6 +967,9 @@ static int ov2640_set_fmt(struct v4l2_subdev *sd, mf->field = V4L2_FIELD_NONE; mf->colorspace = V4L2_COLORSPACE_SRGB; + mf->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + mf->quantization = V4L2_QUANTIZATION_DEFAULT; + mf->xfer_func = V4L2_XFER_FUNC_DEFAULT; switch (mf->code) { case MEDIA_BUS_FMT_RGB565_2X8_BE: