From patchwork Tue Oct 9 06:48:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Bobrowicz X-Patchwork-Id: 10632021 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 20711112B for ; Tue, 9 Oct 2018 06:48:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10E1D286F2 for ; Tue, 9 Oct 2018 06:48:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 056DC2891A; Tue, 9 Oct 2018 06:48:31 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 9D73C286F2 for ; Tue, 9 Oct 2018 06:48:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726418AbeJIODy (ORCPT ); Tue, 9 Oct 2018 10:03:54 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42541 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeJIODy (ORCPT ); Tue, 9 Oct 2018 10:03:54 -0400 Received: by mail-pl1-f195.google.com with SMTP id c8-v6so315327plo.9 for ; Mon, 08 Oct 2018 23:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elite-embedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J9BgPUO0UvmG0f6J1ELz66Vi3MklvXWYkm8JXlvRZ/o=; b=ITCMu6oG0ohnWubPRt7+AQdVb64FbgwZMmL49PAeKno513lJB4eTbatfU+rK4q/aao x5I1fiorWiB8cl6VhB5gXEfNg9XhP4saiy4uAC0VHeAJbw7w7Rn8yGk+52MTlj7sryf0 T0rXUXd0GhQOJGqGP37yM0YHNUBtUxDhjpTqBaPDv6IMtwLKWdHL2JKh/ttvtw/Cwy0M jvfaBI00zNazB3dND8jpVGSlFw5DdzaFPTvE3DHOKxlRKTbiMZ16CahWaFuNgEEoyqx/ 0qgyyItkdqIB4dpLURf+lfT7w9uN7AyXEXbjL+CnUYfKzde4+9J8RPp6pIbreF/4f+Eh KxbQ== 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=J9BgPUO0UvmG0f6J1ELz66Vi3MklvXWYkm8JXlvRZ/o=; b=t9cg/E+WvxMY/9pEdh1wOhSzzVKhlpRulzNJXtz3V3UMVgH72e5E1O/yMnVFU0VcHm vz77aMiLLiuzV2lGOCHx5wI/dP5peSMR4AHwe341wSyu20OrkLCTqHUiMZOd462sN7al 4EbhrwmxsNkE7pRdUebh3in4MSCEmpenB1ryCKk6OgB3un2BmMObxEWs88LzLbGOTg++ 1pwH79w1uNgPiIqnOUeRt+wnegrCYtHBCKgKqavE3P1H8Z3P8Sj7dl9KxcxqX6lmNsZy JJJKpimWsUD7FeHZEmgvt2ki/Z4ftEgrKJ6hxymZvBvF/o/HTziiN43vpHGV82dXvyoH Zrsg== X-Gm-Message-State: ABuFfoiS3cmKAFYO+JoysewJ8M4sBlXQakb/lOS3LAxaW4COVRVx47UU G7KqduN9HAHXCJBQuK7SlnSrejePXDLr X-Google-Smtp-Source: ACcGV61HwOtXxMNh7oHK2VqEaSMxyZfOQ8wgQFhQs66649dCZWkow77D5DplyDbh82G5EC+5rI8SPQ== X-Received: by 2002:a17:902:4181:: with SMTP id f1-v6mr26610489pld.248.1539067709176; Mon, 08 Oct 2018 23:48:29 -0700 (PDT) Received: from ubuntu.localdomain (97-113-94-157.tukw.qwest.net. [97.113.94.157]) by smtp.gmail.com with ESMTPSA id h77-v6sm38960457pfh.13.2018.10.08.23.48.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Oct 2018 23:48:28 -0700 (PDT) From: Sam Bobrowicz To: linux-media@vger.kernel.org Cc: Sam Bobrowicz Subject: [PATCH 4/4] media: ov5640: Add additional media bus formats Date: Mon, 8 Oct 2018 23:48:02 -0700 Message-Id: <1539067682-60604-5-git-send-email-sam@elite-embedded.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539067682-60604-1-git-send-email-sam@elite-embedded.com> References: <1539067682-60604-1-git-send-email-sam@elite-embedded.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 Add support for 1X16 yuv media bus formats (v4l2_mbus_framefmt). These formats are equivalent to the 2X8 formats that are already supported, both of which accurately describe the data present on the CSI2 interface. This change will increase compatibility with CSI2 RX drivers that only advertise support for the 1X16 formats. Signed-off-by: Sam Bobrowicz --- drivers/media/i2c/ov5640.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index a50d884..ca9de56 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -125,6 +125,8 @@ static const struct ov5640_pixfmt ov5640_formats[] = { { MEDIA_BUS_FMT_JPEG_1X8, V4L2_COLORSPACE_JPEG, }, { MEDIA_BUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_SRGB, }, { MEDIA_BUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_SRGB, }, + { MEDIA_BUS_FMT_UYVY8_1X16, V4L2_COLORSPACE_SRGB, }, + { MEDIA_BUS_FMT_YUYV8_1X16, V4L2_COLORSPACE_SRGB, }, { MEDIA_BUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB, }, { MEDIA_BUS_FMT_RGB565_2X8_BE, V4L2_COLORSPACE_SRGB, }, }; @@ -2069,10 +2071,12 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor, switch (format->code) { case MEDIA_BUS_FMT_UYVY8_2X8: + case MEDIA_BUS_FMT_UYVY8_1X16: /* YUV422, UYVY */ val = 0x3f; break; case MEDIA_BUS_FMT_YUYV8_2X8: + case MEDIA_BUS_FMT_YUYV8_1X16: /* YUV422, YUYV */ val = 0x30; break;