linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()
@ 2015-05-18 17:54 Fabian Frederick
  2015-05-18 18:20 ` Vaibhav Hiremath
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Frederick @ 2015-05-18 17:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Mauro Carvalho Chehab, linux-media

Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 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;
-- 
2.4.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()
  2015-05-18 17:54 [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init() Fabian Frederick
@ 2015-05-18 18:20 ` Vaibhav Hiremath
  2015-05-18 18:31   ` Fabian Frederick
  0 siblings, 1 reply; 4+ messages in thread
From: Vaibhav Hiremath @ 2015-05-18 18:20 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: Mauro Carvalho Chehab, linux-media



On Monday 18 May 2015 11:24 PM, Fabian Frederick wrote:
> Use kernel.h macro definition.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>   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?

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()
  2015-05-18 18:20 ` Vaibhav Hiremath
@ 2015-05-18 18:31   ` Fabian Frederick
  2015-05-19  4:50     ` Vaibhav Hiremath
  0 siblings, 1 reply; 4+ messages in thread
From: Fabian Frederick @ 2015-05-18 18:31 UTC (permalink / raw)
  To: linux-kernel, Vaibhav Hiremath; +Cc: linux-media, Mauro Carvalho Chehab



> On 18 May 2015 at 20:20 Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>
>
>
>
> On Monday 18 May 2015 11:24 PM, Fabian Frederick wrote:
> > Use kernel.h macro definition.
> >
> > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > ---
> >   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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init()
  2015-05-18 18:31   ` Fabian Frederick
@ 2015-05-19  4:50     ` Vaibhav Hiremath
  0 siblings, 0 replies; 4+ messages in thread
From: Vaibhav Hiremath @ 2015-05-19  4:50 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: linux-media, Mauro Carvalho Chehab



On Tuesday 19 May 2015 12:01 AM, Fabian Frederick wrote:
>
>
>> On 18 May 2015 at 20:20 Vaibhav Hiremath <vaibhav.hiremath@linaro.org> wrote:
>>
>>
>>
>>
>> On Monday 18 May 2015 11:24 PM, Fabian Frederick wrote:
>>> Use kernel.h macro definition.
>>>
>>> Signed-off-by: Fabian Frederick <fabf@skynet.be>
>>> ---
>>>     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.
>

Thats what I expected.

I am doubtful that anyone still uses this driver.
With DRM framework support, I see very little use of this driver.

Also there are some hacks regarding buffer management, that need to be
fixed if at all we want to support it.

I would really want to slowly kill this driver, if no one uses it.

Thanks,
Vaibhav

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-19  4:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 17:54 [PATCH 1/1 linux-next] omap_vout: use swap() in omapvid_init() Fabian Frederick
2015-05-18 18:20 ` Vaibhav Hiremath
2015-05-18 18:31   ` Fabian Frederick
2015-05-19  4:50     ` Vaibhav Hiremath

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).