From: Kamil Debski <k.debski@samsung.com>
To: 'Laurent Pinchart' <laurent.pinchart@ideasonboard.com>
Cc: 'Sachin Kamat' <sachin.kamat@linaro.org>,
linux-media@vger.kernel.org, mchehab@infradead.org,
kyungmin.park@samsung.com, patches@linaro.org
Subject: RE: [PATCH][media] s5p-g2d: Add HFLIP and VFLIP support
Date: Tue, 31 Jan 2012 11:09:35 +0100 [thread overview]
Message-ID: <00a601cce000$72522670$56f67350$%debski@samsung.com> (raw)
In-Reply-To: <201201311030.25154.laurent.pinchart@ideasonboard.com>
Hi Laurent and Sachin,
> From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com]
> Sent: 31 January 2012 10:30
>
> Hi Kamil,
>
> On Monday 30 January 2012 14:39:22 Kamil Debski wrote:
> > On 30 January 2012 13:12 Laurent Pinchart wrote:
> > > On Monday 30 January 2012 10:58:43 Sachin Kamat wrote:
> > > > This patch adds support for flipping the image horizontally and
> > > > vertically.
>
> [snip]
>
> > > > + v4l2_ctrl_new_std(&ctx->ctrl_handler, &g2d_ctrl_ops,
> > > > + V4L2_CID_HFLIP, 0, 1, 1,
0);
> > > > + if (ctx->ctrl_handler.error)
> > > > + goto error;
> > > > +
> > > > + v4l2_ctrl_new_std(&ctx->ctrl_handler, &g2d_ctrl_ops,
> > > > + V4L2_CID_VFLIP, 0, 1, 1,
0);
> > >
> > > As a single register controls hflip and vflip, you should group the two
> > > controls in a cluster.
> >
> > I think it doesn't matter in this use case. As register are not written
> > in the g2d_s_ctrl. Because the driver uses multiple context it modifies
> > the appropriate values in its context structure and registers are written
> > when the transaction is run.
> >
> > Also there is no logical connection between horizontal and vertical flip.
> > I think this is the case when using clusters. Here one is independent from
> > another.
>
> As the value is only written to hardware registers later, not in the s_ctrl()
> handler, a cluster is (probably) not mandatory if the driver uses proper
> locking. Otherwise there will be no guarantee that setting both hflip and
> vflip in a single VIDIOC_S_EXT_CTRLS call will not result in one frame with
> only hflip or vflip applied.
I see your point - this could happen. So Sachin - I think you need to add the
cluster.
You can find documentation about this in
Documentation/video4linux/v4l2-controls.txt
Also I have talked with Sylwester about locking. It turns out that a spinlock in
device_run and s_ctrl is necessary. I'll add it after you send your patch,
Sachin.
Best wishes,
--
Kamil Debski
Linux Platform Group
Samsung Poland R&D Center
next prev parent reply other threads:[~2012-01-31 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 9:58 [PATCH][media] s5p-g2d: Add HFLIP and VFLIP support Sachin Kamat
2012-01-30 12:11 ` Laurent Pinchart
2012-01-30 13:04 ` Sylwester Nawrocki
2012-01-30 13:39 ` Kamil Debski
2012-01-31 5:07 ` Sachin Kamat
2012-01-31 9:30 ` Laurent Pinchart
2012-01-31 10:09 ` Kamil Debski [this message]
2012-01-31 12:42 ` Sachin Kamat
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='00a601cce000$72522670$56f67350$%debski@samsung.com' \
--to=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=patches@linaro.org \
--cc=sachin.kamat@linaro.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