From patchwork Sat Jan 19 12:01:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 10771997 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 64FDD6C2 for ; Sat, 19 Jan 2019 12:02:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 548612E271 for ; Sat, 19 Jan 2019 12:02:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48A092E2A0; Sat, 19 Jan 2019 12:02:11 +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 3A8D92E289 for ; Sat, 19 Jan 2019 12:02:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727937AbfASMCI (ORCPT ); Sat, 19 Jan 2019 07:02:08 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37089 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727900AbfASMCI (ORCPT ); Sat, 19 Jan 2019 07:02:08 -0500 Received: by mail-wr1-f68.google.com with SMTP id s12so18135859wrt.4 for ; Sat, 19 Jan 2019 04:02:06 -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=oggWVGQSTUbOsIQ/jqrnF8itZ6CLXqyHgVXsE9Bhw6M=; b=DT9YEI9IZGGgDjg+cV5Mz73A3Gx7snhGY4vhuxO6mioRGOU8w3F2q+0Oy8RIJRBFmc K21u+1TqZQeCu8josEmRhV1iMoHREdvPgsH+yTuf0ZXP5OD8Umk5un2CVluzEUhUeLwy znOKg7aJks/RgTwGFN7x5ACc4ipSJw+aICGNA/qFeyNZXGI9OGCaqhI0vVx8amsb1Twf /du6icekONG0xIzzQ6Xd9snSfJWkx1RDVQqy+LC4hJnfOs5pyi90o9MnY325H/LM0N8N b5/nMRZ5nIrgvcij/NyhcG1AQ1YFx2YIPEbRb2nBQWI+xegyZm6Us2yZX52ufOWWKCJS wcGA== 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=oggWVGQSTUbOsIQ/jqrnF8itZ6CLXqyHgVXsE9Bhw6M=; b=M/sUxrzx2LemqcQgLFW+T+Vmbptr1FknvaaaDBVUaB1jSdtVT+hBTlB5wpms1oG1qB fJZ6DDva8n5ER2VuZUUjsOs1okCIm2hp935JQtK9ewgGddp0fIANKA7TQY3NFNOurdVm 5Wk99HXGpXksJrfwcQp6jvZPwnV+uyvRqRr9PLP16AH7x1QKgkQcAcvTxIxI+zTszyBo yRNMVcm05AySg/m0oKcqdE8mXyLbb9N6eIy6WAv2YTI9gGy7qG496Ijiej8cftVmlz6d g0dxKwiGf7NPa24Ug8u79zjf0UvQ1n8jpuvmSs139+JRJ60qCzb6KZATDL6kyaOjw2ju AO6w== X-Gm-Message-State: AJcUukcne4Oc7F4ue9yxJQEdYflpjX6K7Oekl2lTpKEPej3m92hRlDYE 5x50iY8BTdu22eXe+CqvesbI+vkm/VU= X-Google-Smtp-Source: ALg8bN4kpd0JHzSC9UAXV2VZ00rGtPSHtNZZ6ih9ypa5E5HvI8lm1JFj+yt5O2Lr4HSSAMkQIZW3pQ== X-Received: by 2002:a5d:550f:: with SMTP id b15mr21223063wrv.330.1547899325522; Sat, 19 Jan 2019 04:02:05 -0800 (PST) Received: from localhost.localdomain ([87.71.51.33]) by smtp.gmail.com with ESMTPSA id e27sm95011131wra.67.2019.01.19.04.02.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Jan 2019 04:02:04 -0800 (PST) From: Dafna Hirschfeld To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, helen.koike@collabora.com, Dafna Hirschfeld Subject: [PATCH v4 1/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info Date: Sat, 19 Jan 2019 04:01:51 -0800 Message-Id: <20190119120156.15851-2-dafna3@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190119120156.15851-1-dafna3@gmail.com> References: <20190119120156.15851-1-dafna3@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 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 8cb0212df67f..5e9040f6c902 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_YVU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1, 4, 4, 1, 1, 4, 1}, + { V4L2_PIX_FMT_ABGR32, 4, 4, 1, 4, 4, 1, 1, 4, 1}, + { V4L2_PIX_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 ed53e28d4f9c..685b665590c1 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 2378582d9790..6a7643bceb92 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)