From: Xia Jiang <xia.jiang@mediatek.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
Rick Chang <rick.chang@mediatek.com>
Cc: maoguang.meng@mediatek.com, devicetree@vger.kernel.org,
mojahsu@chromium.org, srv_heupstream@mediatek.com,
linux-kernel@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
senozhatsky@chromium.org, sj.huang@mediatek.com,
drinkcat@chromium.org, linux-mediatek@lists.infradead.org,
Xia Jiang <xia.jiang@mediatek.com>,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH RESEND v9 13/18] media: platform: Delete redundant code and add annotation for an enum
Date: Thu, 4 Jun 2020 17:05:48 +0800 [thread overview]
Message-ID: <20200604090553.10861-15-xia.jiang@mediatek.com> (raw)
In-Reply-To: <20200604090553.10861-1-xia.jiang@mediatek.com>
Delete unused member variables annotation.
Delete unused variable definition.
Delete redundant log print, because V4L2 debug logs already print it.
Add annotation for enum mtk_jpeg_ctx_state.
Signed-off-by: Xia Jiang <xia.jiang@mediatek.com>
---
v9: add annotation for enum mtk_jpeg_ctx_state
---
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 15 ++-------------
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h | 8 ++++++--
2 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index c9c0357b2d6c..6c82134d6b3d 100644
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
@@ -176,14 +176,13 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f,
struct mtk_jpeg_ctx *ctx, int q_type)
{
struct v4l2_pix_format_mplane *pix_mp = &f->fmt.pix_mp;
- struct mtk_jpeg_dev *jpeg = ctx->jpeg;
int i;
pix_mp->field = V4L2_FIELD_NONE;
if (ctx->state != MTK_JPEG_INIT) {
mtk_jpeg_adjust_fmt_mplane(ctx, f);
- goto end;
+ return 0;
}
pix_mp->num_planes = fmt->colplanes;
@@ -202,7 +201,7 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f,
pfmt->sizeimage = round_up(pfmt->sizeimage, 128);
if (pfmt->sizeimage == 0)
pfmt->sizeimage = MTK_JPEG_DEFAULT_SIZEIMAGE;
- goto end;
+ return 0;
}
/* type is MTK_JPEG_FMT_TYPE_CAPTURE */
@@ -219,16 +218,6 @@ static int mtk_jpeg_try_fmt_mplane(struct v4l2_format *f,
pfmt->bytesperline = stride;
pfmt->sizeimage = stride * h;
}
-end:
- v4l2_dbg(2, debug, &jpeg->v4l2_dev, "wxh:%ux%u\n",
- pix_mp->width, pix_mp->height);
- for (i = 0; i < pix_mp->num_planes; i++) {
- v4l2_dbg(2, debug, &jpeg->v4l2_dev,
- "plane[%d] bpl=%u, size=%u\n",
- i,
- pix_mp->plane_fmt[i].bytesperline,
- pix_mp->plane_fmt[i].sizeimage);
- }
return 0;
}
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h
index 64a731261214..5fcdf6950782 100644
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.h
@@ -30,6 +30,12 @@
#define MTK_JPEG_DEFAULT_SIZEIMAGE (1 * 1024 * 1024)
+/**
+ * enum mtk_jpeg_ctx_state - states of the context state machine
+ * @MTK_JPEG_INIT: current state is initialized
+ * @MTK_JPEG_RUNNING: current state is running
+ * @MTK_JPEG_SOURCE_CHANGE: current state is source resolution change
+ */
enum mtk_jpeg_ctx_state {
MTK_JPEG_INIT = 0,
MTK_JPEG_RUNNING,
@@ -109,9 +115,7 @@ struct mtk_jpeg_q_data {
* @out_q: source (output) queue information
* @cap_q: destination (capture) queue queue information
* @fh: V4L2 file handle
- * @dec_param parameters for HW decoding
* @state: state of the context
- * @header_valid: set if header has been parsed and valid
* @colorspace: enum v4l2_colorspace; supplemental to pixelformat
* @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding
* @quantization: enum v4l2_quantization, colorspace quantization
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-06-04 9:20 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 9:05 [PATCH RESEND v9 00/18] Add support for mt2701 JPEG ENC support Xia Jiang
2020-06-04 9:05 ` Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 01/18] media: platform: Improve subscribe event flow for bug fixing Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 02/18] media: platform: Improve queue set up " Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 03/18] media: platform: Improve getting and requesting irq " Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 04/18] media: platform: Change the fixed device node number to unfixed value Xia Jiang
2020-06-11 11:58 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 05/18] media: platform: Improve power on and power off flow Xia Jiang
2020-06-11 12:08 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 06/18] media: platform: Delete the resetting hardware flow in the system PM ops Xia Jiang
2020-06-11 11:59 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 07/18] media: platform: Improve the implementation of " Xia Jiang
2020-06-11 14:17 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 08/18] media: platform: Cancel the last frame handling flow Xia Jiang
2020-06-11 14:25 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 09/18] media: platform: Delete zeroing the reserved fields Xia Jiang
2020-06-11 14:27 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 10/18] media: platform: Stylistic changes for improving code quality Xia Jiang
2020-06-11 14:28 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 11/18] media: platform: Use generic rounding helpers Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 12/18] media: platform: Change MTK_JPEG_COMP_MAX macro definition location Xia Jiang
2020-06-04 9:05 ` Xia Jiang [this message]
2020-06-11 16:50 ` [PATCH RESEND v9 13/18] media: platform: Delete redundant code and add annotation for an enum Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 14/18] media: dt-bindings: Add jpeg enc device tree node document Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 15/18] arm: dts: mt2701: Add jpeg enc device tree node Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 16/18] media: platform: Rename jpeg dec file name Xia Jiang
2020-06-04 9:05 ` [PATCH RESEND v9 17/18] media: platform: Rename existing functions/defines/variables Xia Jiang
2020-06-08 10:59 ` Hans Verkuil
2020-06-11 16:48 ` Tomasz Figa
2020-06-04 9:05 ` [PATCH RESEND v9 18/18] media: platform: Add jpeg enc feature Xia Jiang
2020-06-07 23:36 ` Chun-Kuang Hu
2020-07-24 9:06 ` Xia Jiang
2020-06-08 10:54 ` Hans Verkuil
2020-07-24 9:17 ` Xia Jiang
2020-06-11 18:46 ` Tomasz Figa
2020-06-30 2:56 ` Xia Jiang
2020-06-30 16:53 ` Tomasz Figa
2020-07-01 8:28 ` Xia Jiang
2020-07-01 11:07 ` Tomasz Figa
2020-07-07 6:45 ` Xia Jiang
2020-07-07 13:35 ` Tomasz Figa
2020-07-08 7:13 ` Xia Jiang
2020-07-08 11:16 ` Tomasz Figa
2020-07-16 11:18 ` Hans Verkuil
2020-07-24 9:54 ` Xia Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200604090553.10861-15-xia.jiang@mediatek.com \
--to=xia.jiang@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=drinkcat@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=maoguang.meng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab+samsung@kernel.org \
--cc=mojahsu@chromium.org \
--cc=rick.chang@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=senozhatsky@chromium.org \
--cc=sj.huang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).