From patchwork Tue Jun 11 09:02:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues FRUCHET X-Patchwork-Id: 10986313 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 5C6726C5 for ; Tue, 11 Jun 2019 09:03:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C27228779 for ; Tue, 11 Jun 2019 09:03:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40A832877F; Tue, 11 Jun 2019 09:03:41 +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,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 E5FA628779 for ; Tue, 11 Jun 2019 09:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404869AbfFKJDg (ORCPT ); Tue, 11 Jun 2019 05:03:36 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:35454 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725766AbfFKJDg (ORCPT ); Tue, 11 Jun 2019 05:03:36 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5B8vAtU002975; Tue, 11 Jun 2019 11:03:29 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=6yBZz4ABYpxtClu7j1ho6thn8SuVUwy/sipntIef450=; b=Pkf3Qti+pJ43hbRONw79+MEEiE17uxoLhxrzvpLgDsNf8fuqwUg3u4jhVTr9WBEOSDjJ ap/Akv9BzsK/SnZ2JFnU3hGDSyYDASpNCedQS6c5t3AArra3uSigUSBWUj0lvPMRrLRG 2hIQUR1HfDiy0fDB4pwywlfZ8etr8ci507OwqqNgdePFryDRsGJVuLXGYrKi41OcHJ6T nj+ecYW70G16wJUA7ixg12njbwlpeLZcXifhliSP7ZCE63qyWSZG2bXArXmGzkq/plIY fJtE0u0GnHaF5huKjmq4Ic6HzJ44QOMKhgeUUbfdVCW7ekk2SoYNBieLpRODM6HaV1cs Ow== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2t26rkgvtw-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 11 Jun 2019 11:03:29 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5E30D46; Tue, 11 Jun 2019 09:03:18 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3067E256F; Tue, 11 Jun 2019 09:03:18 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Jun 2019 11:03:17 +0200 Received: from localhost (10.201.23.19) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Jun 2019 11:03:17 +0200 From: Hugues Fruchet To: Mauro Carvalho Chehab , Sakari Ailus , Mickael Guene CC: , , "Hugues Fruchet" , Benjamin Gaignard Subject: [PATCH 2/3] media: st-mipid02: add support of YUYV8 and UYVY8 Date: Tue, 11 Jun 2019 11:02:48 +0200 Message-ID: <1560243769-17510-3-git-send-email-hugues.fruchet@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1560243769-17510-1-git-send-email-hugues.fruchet@st.com> References: <1560243769-17510-1-git-send-email-hugues.fruchet@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.19] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-11_04:,, signatures=0 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 of YUYV8 and UYVY8 pixel formats. Signed-off-by: Hugues Fruchet --- drivers/media/i2c/st-mipid02.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index 76a9f52..35946ad 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -63,6 +63,7 @@ static const u32 mipid02_supported_fmt_codes[] = { MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_BGR888_1X24, MEDIA_BUS_FMT_RGB565_2X8_LE, MEDIA_BUS_FMT_RGB565_2X8_BE, + MEDIA_BUS_FMT_YUYV8_2X8, MEDIA_BUS_FMT_UYVY8_2X8, }; /* regulator supplies */ @@ -129,6 +130,8 @@ static int bpp_from_code(__u32 code) case MEDIA_BUS_FMT_SRGGB12_1X12: return 12; case MEDIA_BUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_YUYV8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_RGB565_2X8_LE: case MEDIA_BUS_FMT_RGB565_2X8_BE: return 16; @@ -158,6 +161,8 @@ static u8 data_type_from_code(__u32 code) case MEDIA_BUS_FMT_SRGGB12_1X12: return 0x2c; case MEDIA_BUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_YUYV8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: return 0x1e; case MEDIA_BUS_FMT_BGR888_1X24: return 0x24;