From: k.debski@samsung.com (Kamil Debski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] s5p-mfc: limit the size of the CPB
Date: Tue, 15 Jul 2014 12:51:21 +0200 [thread overview]
Message-ID: <000101cfa01a$be5fffb0$3b1fff10$%debski@samsung.com> (raw)
In-Reply-To: <1405393670-2808-1-git-send-email-panpan1.liu@samsung.com>
Hi Panpan,
Checkpatch gives errors on your patch.
------------------------------
Applying 24839 hit enter to continue...
------------------------------
Checkpatch:
------------------------------
ERROR: do not set execute permissions for source files
#34: FILE: drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
ERROR: space required before the open parenthesis '('
#58: FILE: drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:473:
+ else if(pix_mp->plane_fmt[0].sizeimage > buf_size->cpb)
total: 2 errors, 0 warnings, 25 lines checked
NOTE: Ignored message types: PATCH_PREFIX
24839 has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
> -----Original Message-----
> From: panpan liu [mailto:panpan1.liu at samsung.com]
> Sent: Tuesday, July 15, 2014 5:08 AM
> To: kyungmin.park at samsung.com; k.debski at samsung.com;
> jtp.park at samsung.com; mchehab at redhat.com
> Cc: linux-arm-kernel at lists.infradead.org; linux-media at vger.kernel.org
> Subject: [PATCH] s5p-mfc: limit the size of the CPB
>
> The CPB size is limited by the hardware. Add this limit to the s_fmt.
>
> Signed-off-by: panpan liu <panpan1.liu@samsung.com>
> ---
> drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-) mode change 100644 =>
> 100755 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> old mode 100644
> new mode 100755
> index 0bae907..70b9458
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
> @@ -413,7 +413,8 @@ static int vidioc_s_fmt(struct file *file, void
> *priv, struct v4l2_format *f)
> int ret = 0;
> struct s5p_mfc_fmt *fmt;
> struct v4l2_pix_format_mplane *pix_mp;
> -
> + struct s5p_mfc_buf_size *buf_size = dev->variant->buf_size;
> +
> mfc_debug_enter();
> ret = vidioc_try_fmt(file, priv, f);
> pix_mp = &f->fmt.pix_mp;
> @@ -466,11 +467,13 @@ static int vidioc_s_fmt(struct file *file, void
> *priv, struct v4l2_format *f)
> mfc_debug(2, "The codec number is: %d\n", ctx->codec_mode);
> pix_mp->height = 0;
> pix_mp->width = 0;
> - if (pix_mp->plane_fmt[0].sizeimage)
> - ctx->dec_src_buf_size = pix_mp->plane_fmt[0].sizeimage;
> - else
> + if (pix_mp->plane_fmt[0].sizeimage == 0)
> pix_mp->plane_fmt[0].sizeimage = ctx->dec_src_buf_size =
>
DEF_CPB_SIZE;
> + else if(pix_mp->plane_fmt[0].sizeimage > buf_size->cpb)
> + ctx->dec_src_buf_size = buf_size->cpb;
> + else
> + ctx->dec_src_buf_size = pix_mp->plane_fmt[0].sizeimage;
> pix_mp->plane_fmt[0].bytesperline = 0;
> ctx->state = MFCINST_INIT;
> out:
> --
> 1.7.9.5
Best wishes,
--
Kamil Debski
Samsung R&D Institute Poland
next prev parent reply other threads:[~2014-07-15 10:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 3:07 [PATCH] s5p-mfc: limit the size of the CPB panpan liu
2014-07-15 10:51 ` Kamil Debski
2014-07-15 10:51 ` Kamil Debski [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-07-16 1:51 panpan liu
2014-07-16 13:59 ` Kamil Debski
2014-07-16 1:46 panpan liu
2014-07-14 11:18 panpan liu
2014-07-14 14:07 ` Kamil Debski
2014-07-14 11:16 panpan liu
2014-07-14 7:22 panpan liu
2014-07-14 9:29 ` Kamil Debski
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='000101cfa01a$be5fffb0$3b1fff10$%debski@samsung.com' \
--to=k.debski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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).