From patchwork Thu Jan 17 18:23:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 10768759 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 AEA1B139A for ; Thu, 17 Jan 2019 18:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A123B2BC60 for ; Thu, 17 Jan 2019 18:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9547D2BFE0; Thu, 17 Jan 2019 18:24:25 +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 25BB52BC60 for ; Thu, 17 Jan 2019 18:24:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbfAQSYY (ORCPT ); Thu, 17 Jan 2019 13:24:24 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39752 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725981AbfAQSYY (ORCPT ); Thu, 17 Jan 2019 13:24:24 -0500 Received: by mail-wr1-f66.google.com with SMTP id t27so12125071wra.6 for ; Thu, 17 Jan 2019 10:24:22 -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=gUPgy3IkDx1dB/2wSJu2hiTMHsFbJYix1um+rAK0hE+kuuqX3+4dZlqNhYHm5VewCO ykS/4++jtsVa/V+ONOjPYnW1ft1PElRdEmzlA+on4sN2NQjX9NtTjF0D6oJaAdi7aouc SyjnOVBdscwnD5hAgRH8R+fiPFomj9RjIIfwxbWMrZjuHREEuQPdaQ1wPgpUaHfLtUoc 2LGsK7f/PEPN1xUzMgzfDIocy+SxLvxbZrcorS1MXXeoIxMP0emOKlLYwCQvlV0B3Mun DjGMzirfvjJrEYNfCKORxg91Ym3L0gvb9KKpoJHMuS2CofZGfvl9vM2YfKE5MzBUBjXG dX9Q== 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=bAKcZUx55FZZVdQnFTDaGrIO/zJJ29xSbzkcfFMvcjnVlovlsJrhKVKLpMxBRwtHkb 1Qiep5u2D8MVb580WTzBCDfMir5dLhoz149ZNJZbw1AO2xzEof5ipFHXpUhyaryhkp5g HS1gauh2Ys4bazMj56JPOKQ9+63B17EiYrC8aqFfKwK/3LHYoIwnWXv3eT9xRm1v9fX1 ye0xNsAzq+YqcAKofqyYI8CnWNQf87GUHSO4D8k/ytpMEzSEKEvM/03Se1Kfrxds7A5J yvP+GDBn9pzRUlKxmMtHMB5DLUn1hpGoBqxyXxR54tcGi2qDJd2CsA7pp79BZBgokKlx NQQQ== X-Gm-Message-State: AJcUukesx0MToyA0rhiz8QqATB+2IL/mUhaRPcUwFocsCnnaybr2llgx tbOZa3992hgmfrfuFUS6JM47lrLZvUQ= X-Google-Smtp-Source: ALg8bN61G11rCMEW/c/sOc0mD//AM1cGWrQxPsMrp3Y3HrPSx6iK455ahs24OwtoHuqYZpC808jcog== X-Received: by 2002:a5d:4ccb:: with SMTP id c11mr13823206wrt.241.1547749461434; Thu, 17 Jan 2019 10:24:21 -0800 (PST) Received: from localhost.localdomain ([87.71.12.187]) by smtp.gmail.com with ESMTPSA id o4sm76052266wrq.66.2019.01.17.10.24.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 10:24:20 -0800 (PST) From: Dafna Hirschfeld To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, helen.koike@collabora.com, Dafna Hirschfeld Subject: [PATCH v3 2/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info Date: Thu, 17 Jan 2019 10:23:15 -0800 Message-Id: <20190117182319.118359-3-dafna3@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190117182319.118359-1-dafna3@gmail.com> References: <20190117182319.118359-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_YVU420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, 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)