Re: [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()

From: Fabian Frederick
Date: Mon May 18 2015 - 14:31:47 EST




> On 18 May 2015 at 20:20 Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx> wrote:
>
>
>
>
> On Monday 18 May 2015 11:24 PM, Fabian Frederick wrote:
> > Use kernel.h macro definition.
> >
> > Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
> > ---
> >Â Âdrivers/media/platform/omap/omap_vout.c | 10 +++-------
> >Â Â1 file changed, 3 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/media/platform/omap/omap_vout.c
> > b/drivers/media/platform/omap/omap_vout.c
> > index 17b189a..f09c5f1 100644
> > --- a/drivers/media/platform/omap/omap_vout.c
> > +++ b/drivers/media/platform/omap/omap_vout.c
> > @@ -445,7 +445,7 @@ static int omapvid_init(struct omap_vout_device *vout,
> > u32 addr)
> >Â Â Âint ret = 0, i;
> >Â Â Âstruct v4l2_window *win;
> >Â Â Âstruct omap_overlay *ovl;
> > -Â Âint posx, posy, outw, outh, temp;
> > +Â Âint posx, posy, outw, outh;
> >Â Â Âstruct omap_video_timings *timing;
> >Â Â Âstruct omapvideo_info *ovid = &vout->vid_info;
> >
> > @@ -468,9 +468,7 @@ static int omapvid_init(struct omap_vout_device *vout,
> > u32 addr)
> >Â Â Â Â Â Â Â Â Â Â Â/* Invert the height and width for 90
> >Â Â Â Â Â Â Â Â Â Â Â * and 270 degree rotation
> >Â Â Â Â Â Â Â Â Â Â Â */
> > -Â Â Â Â Â Â Â Â Â Âtemp = outw;
> > -Â Â Â Â Â Â Â Â Â Âoutw = outh;
> > -Â Â Â Â Â Â Â Â Â Âouth = temp;
> > +Â Â Â Â Â Â Â Â Â Âswap(outw, outh);
> >Â Â Â Â Â Â Â Â Â Â Âposy = (timing->y_res - win->w.width) - win->w.left;
> >Â Â Â Â Â Â Â Â Â Â Âposx = win->w.top;
> >Â Â Â Â Â Â Â Â Â Â Âbreak;
> > @@ -481,9 +479,7 @@ static int omapvid_init(struct omap_vout_device *vout,
> > u32 addr)
> >Â Â Â Â Â Â Â Â Â Â Âbreak;
> >
> >Â Â Â Â Â Â Âcase dss_rotation_270_degree:
> > -Â Â Â Â Â Â Â Â Â Âtemp = outw;
> > -Â Â Â Â Â Â Â Â Â Âoutw = outh;
> > -Â Â Â Â Â Â Â Â Â Âouth = temp;
> > +Â Â Â Â Â Â Â Â Â Âswap(outw, outh);
> >Â Â Â Â Â Â Â Â Â Â Âposy = win->w.left;
> >Â Â Â Â Â Â Â Â Â Â Âposx = (timing->x_res - win->w.height) - win->w.top;
> >Â Â Â Â Â Â Â Â Â Â Âbreak;
> >
>
>
> Curious to know,
> How do you test this? Do you have any OMAP2/3 or AM335x board?
> Does this driver still works?

Hello Vaibhav,

 ÂUnfortunately I can't test it.
Â
Regards,
Fabian
>
> Thanks,
> Vaibhav
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/