Linux Media Controller development
 help / color / mirror / Atom feed
From: Kamil Debski <k.debski@samsung.com>
To: 'Arun Kumar K' <arun.kk@samsung.com>, linux-media@vger.kernel.org
Cc: jtp.park@samsung.com, janghyuck.kim@samsung.com,
	jaeryul.oh@samsung.com, ch.naveen@samsung.com,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	kmpark@infradead.org, joshi@samsung.com
Subject: RE: [PATCH v4 1/4] [media] s5p-mfc: Update MFCv5 driver for callback based architecture
Date: Wed, 22 Aug 2012 18:18:53 +0200	[thread overview]
Message-ID: <007101cd8081$d31074e0$79315ea0$%debski@samsung.com> (raw)
In-Reply-To: <1344508110-16945-2-git-send-email-arun.kk@samsung.com>

Hi Arun,

First of all - thank you for all the patches, they are getting better and
better
with every version.

Two things: 
1) A minor one - I suggest that the choice of the default pixel format should
be
done in a different manner. I suggest using a V4L2_PIX_FMT_* in the
DEF_SRC_FMT_DEC
define and then using find_format in s5p_mfc_dec_init. Same goes for encoding.

2) A major one - the ops mechanism could be improved. I see that there are
many functions that only call an ops. Such as:

> int s5p_mfc_alloc_dec_temp_buffers(struct s5p_mfc_ctx *ctx)
> {
>        return s5p_mfc_ops->s5p_mfc_alloc_dec_temp_buffers(ctx);
> }

I suggest dropping the s5p_mfc_ prefix in all the fields of s5p_mfc_hw_ops and
using a macro to call the ops. Like this:

+#define fimc_pipeline_call(f, op, p, args...)                          \
+       (!(f) ? -ENODEV : (((f)->pipeline_ops && (f)->pipeline_ops->op) ? \
+                           (f)->pipeline_ops->op((p), ##args) :
-ENOIOCTLCMD))
(from commit by Sylwester Nawrocki http://goo.gl/Q657j)

In addition, your code does not check whether the ops pointer is null and I
think that it should be done.

Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center

[snip the code]


  reply	other threads:[~2012-08-22 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 10:28 [PATCH v4 0/4] Update MFC v4l2 driver to support MFC6.x Arun Kumar K
2012-08-09 10:28 ` [PATCH v4 1/4] [media] s5p-mfc: Update MFCv5 driver for callback based architecture Arun Kumar K
2012-08-22 16:18   ` Kamil Debski [this message]
2012-08-09 10:28 ` [PATCH v4 2/4] [media] s5p-mfc: Add MFC variant data to device context Arun Kumar K
2012-08-22 16:18   ` Kamil Debski
2012-08-09 10:28 ` [PATCH v4 3/4] [media] s5p-mfc: MFCv6 register definitions Arun Kumar K
2012-08-22 16:18   ` Kamil Debski
2012-08-09 10:28 ` [PATCH v4 4/4] [media] s5p-mfc: Update MFC v4l2 driver to support MFC6.x Arun Kumar K
2012-08-22 16:19   ` Kamil Debski
  -- strict thread matches above, loose matches on Subject: below --
2012-08-24  4:25 [PATCH v4 1/4] [media] s5p-mfc: Update MFCv5 driver for callback based architecture Arun Kumar K

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='007101cd8081$d31074e0$79315ea0$%debski@samsung.com' \
    --to=k.debski@samsung.com \
    --cc=arun.kk@samsung.com \
    --cc=ch.naveen@samsung.com \
    --cc=jaeryul.oh@samsung.com \
    --cc=janghyuck.kim@samsung.com \
    --cc=joshi@samsung.com \
    --cc=jtp.park@samsung.com \
    --cc=kmpark@infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /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