From patchwork Sat Dec 29 15:52:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 10744927 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 94D7291E for ; Sat, 29 Dec 2018 15:53:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74EED28A62 for ; Sat, 29 Dec 2018 15:53:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62A7228ABC; Sat, 29 Dec 2018 15:53:01 +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 DE3F128A62 for ; Sat, 29 Dec 2018 15:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726933AbeL2PxA (ORCPT ); Sat, 29 Dec 2018 10:53:00 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50713 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbeL2Pw7 (ORCPT ); Sat, 29 Dec 2018 10:52:59 -0500 Received: by mail-wm1-f66.google.com with SMTP id n190so20908445wmd.0 for ; Sat, 29 Dec 2018 07:52:57 -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; bh=PUyNJU5EeGPVPl/xZPMJeaKXVQDQPLqDAK2F+Uzqreg=; b=Mqx81s15u4w4wap1382IaAYmsmk8UwuavEQQwuAJIr0gesThYUjrjz/25Fck57aMpH 4CtI4+tx4aKJMZJAA2tYhV4EvaJ8AT7ru75jWLl7VImgSrg4H3XT+APKBAjiqs516u8K Kc6eGm9xwPrhMICtvsd6gCpTE7buscPmdpKLIv9Z6/NlA43hIU8ta3AnNUMsbJToWuKV AQKr0BgFbquJ+XOhD5ek34PJGlhhExkNOOGOcOY8HeVZ6c5UlJ5W6hKz68H6kjkueEkB e2ybXRyKI3vAIT7i7p97+OyQss7XmPOiY1SybGVTa4Jm4wrZstXbX2m+YL2S35C9Zi8N 6dJg== 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; bh=PUyNJU5EeGPVPl/xZPMJeaKXVQDQPLqDAK2F+Uzqreg=; b=li8rP5nyCxofpKlg+acq/1j1fAsMz1juSoEfxP+F4Ux3w0M7w8+EIYho4xm9XSVcLn 6JlArrBp9wXX50w/UuaqxrCk1caJ2g5yl5sTZqOKUTwfSV8H0Q0CCc4fTX09zLUjBl+1 kMKibAbi4J+xOCpCuTBXd3RbPQFyTLHiFM/kEdGQ4JXcKZafwmXW5xLy4MgK+HWyEFun 6dmkIBuqHF3Cf57ZiqWxldfYAZ7S+tN3p7OgJa4bop6sKJxcb6+PK1TQcSi7NNrG+cdF uGyJ2SGQeG/XoR5jejjI3AUhBjHcxN7xHyle7uMybK8/l6s2RlJBrPMO/OGCEh3SEK8f nhjg== X-Gm-Message-State: AJcUukctVUyPmXagCBQL2nb2ssEbSyqLOMd491okSwxq1u4ftx4w9ViR TTs++YEpNTjA5a+EdhbnBURtFrDWDfQ= X-Google-Smtp-Source: ALg8bN61dQHmYyZbgOlGmqAdN6luiAE/WkALcMNCm95h/3/q995Vf79LeuczYBVA47q7PJ/+jaqIdw== X-Received: by 2002:a1c:c008:: with SMTP id q8mr24708984wmf.99.1546098776664; Sat, 29 Dec 2018 07:52:56 -0800 (PST) Received: from localhost.localdomain ([87.71.118.243]) by smtp.gmail.com with ESMTPSA id k128sm38737423wmd.37.2018.12.29.07.52.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Dec 2018 07:52:56 -0800 (PST) From: Dafna Hirschfeld To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, helen.koike@collabora.com, Dafna Hirschfeld Subject: [PATCH] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info Date: Sat, 29 Dec 2018 07:52:18 -0800 Message-Id: <20181229155218.26875-1-dafna3@gmail.com> X-Mailer: git-send-email 2.17.1 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 the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +++++++++---------- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2 +- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/drivers/media/platform/vicodec/codec-v4l2-fwht.c b/drivers/media/platform/vicodec/codec-v4l2-fwht.c index 19f9d65fc0a9..0e4797e47018 100644 --- a/drivers/media/platform/vicodec/codec-v4l2-fwht.c +++ b/drivers/media/platform/vicodec/codec-v4l2-fwht.c @@ -11,30 +11,30 @@ #include "codec-v4l2-fwht.h" static const struct v4l2_fwht_pixfmt_info v4l2_fwht_pixfmts[] = { - { V4L2_PIX_FMT_YUV420, 1, 3, 2, 1, 1, 2, 2, 3}, - { V4L2_PIX_FMT_YVU420, 1, 3, 2, 1, 1, 2, 2, 3}, - { V4L2_PIX_FMT_YUV422P, 1, 2, 1, 1, 1, 2, 1, 3}, - { V4L2_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_FMT_GREY, 1, 1, 1, 1, 0, 1, 1, 1, 1}, }; const struct v4l2_fwht_pixfmt_info *v4l2_fwht_find_pixfmt(u32 pixelformat) diff --git a/drivers/media/platform/vicodec/codec-v4l2-fwht.h b/drivers/media/platform/vicodec/codec-v4l2-fwht.h index 2a09ad13ddd6..1cd909111867 100644 --- a/drivers/media/platform/vicodec/codec-v4l2-fwht.h +++ b/drivers/media/platform/vicodec/codec-v4l2-fwht.h @@ -19,6 +19,7 @@ struct v4l2_fwht_pixfmt_info { unsigned int width_div; unsigned int height_div; unsigned int components_num; + unsigned int planes_num; }; struct v4l2_fwht_state { diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c index bbcce826c440..12d1f3347e04 100644 --- a/drivers/media/platform/vicodec/vicodec-core.c +++ b/drivers/media/platform/vicodec/vicodec-core.c @@ -61,7 +61,7 @@ struct pixfmt_info { }; static const struct v4l2_fwht_pixfmt_info pixfmt_fwht = { - V4L2_PIX_FMT_FWHT, 0, 3, 1, 1, 1, 1, 1, 0 + V4L2_PIX_FMT_FWHT, 0, 3, 1, 1, 1, 1, 1, 0, 1 }; static void vicodec_dev_release(struct device *dev)