Hi Sakari,
On Tuesday 28 Feb 2017 23:13:34 Sakari Ailus wrote:
> On Tue, Feb 28, 2017 at 05:03:20PM +0200, Laurent Pinchart wrote:
> > Some WPF instances, on Gen3 devices, can perform 90° rotation when
> > writing frames to memory. Implement support for this using the
> > V4L2_CID_ROTATE control.
> >
> > Signed-off-by: Laurent Pinchart
> > <[email protected]>
> > ---
> >
> > drivers/media/platform/vsp1/vsp1_rpf.c | 2 +-
> > drivers/media/platform/vsp1/vsp1_rwpf.c | 5 +
> > drivers/media/platform/vsp1/vsp1_rwpf.h | 3 +-
> > drivers/media/platform/vsp1/vsp1_video.c | 12 +-
> > drivers/media/platform/vsp1/vsp1_wpf.c | 205 ++++++++++++++++++--------
> > 5 files changed, 175 insertions(+), 52 deletions(-)
[snip]
> > diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h
> > b/drivers/media/platform/vsp1/vsp1_rwpf.h index
> > 1c98aff3da5d..b4ffc38f48af 100644
> > --- a/drivers/media/platform/vsp1/vsp1_rwpf.h
> > +++ b/drivers/media/platform/vsp1/vsp1_rwpf.h
> > @@ -56,9 +56,10 @@ struct vsp1_rwpf {
> >
> > struct {
> > spinlock_t lock;
> > - struct v4l2_ctrl *ctrls[2];
> > + struct v4l2_ctrl *ctrls[3];
>
> At least what comes to this patch --- having a field for each control would
> look much nicer in the code. Is there a particular reason for having an
> array with all the controls in it?
Not really. I need to put the three controls in a cluster, so I stored them in
an array to make sure they would be properly contiguous in memory. I can also
use three separate pointers, it shouldn't hurt.
> > unsigned int pending;
> > unsigned int active;
> > + bool rotate;
> > } flip;
> >
> > struct vsp1_rwpf_memory mem;
--
Regards,
Laurent Pinchart