public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omapfb: remove wrong scale call for gfx_plane
@ 2008-09-09  7:43 arun c
  2008-09-10 17:53 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: arun c @ 2008-09-09  7:43 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org

The gfx_plane doesn't support scaling.

Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
---
 drivers/video/omap/dispc.c       |    3 +--
 drivers/video/omap/omapfb_main.c |    6 ++++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 82ba030..ce4c4de 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -519,8 +519,7 @@ static int omap_dispc_set_scale(int plane,
 	if ((unsigned)plane > OMAPFB_PLANE_NUM)
 		return -ENODEV;

-	if (plane == OMAPFB_PLANE_GFX &&
-	    (out_width != orig_width || out_height != orig_height))
+	if (out_width != orig_width || out_height != orig_height)
 		return -EINVAL;

 	enable_lcd_clocks(1);
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 1ffe74c..d176a2c 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -223,13 +223,15 @@ static int ctrl_change_mode(struct fb_info *fbi)
 		if((r = fbdev->ctrl->set_rotate(var->rotate)) < 0)
 			return r;

-	if (fbdev->ctrl->set_scale != NULL)
+	if ((fbdev->ctrl->set_scale != NULL) && (plane->idx > 0))
 		r = fbdev->ctrl->set_scale(plane->idx,
 				   var->xres, var->yres,
 				   plane->info.out_width,
 				   plane->info.out_height);
+	if (r < 0)
+		return r;

-	return r;
+	return 0;
 }

 /*
-- 
1.5.3.4

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

* Re: [PATCH] omapfb: remove wrong scale call for gfx_plane
  2008-09-09  7:43 [PATCH] omapfb: remove wrong scale call for gfx_plane arun c
@ 2008-09-10 17:53 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-09-10 17:53 UTC (permalink / raw)
  To: arun c; +Cc: linux-omap@vger.kernel.org

* arun c <arunedarath@mistralsolutions.com> [080909 00:47]:
> The gfx_plane doesn't support scaling.

Pushing today.

Tony

> 
> Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
> ---
>  drivers/video/omap/dispc.c       |    3 +--
>  drivers/video/omap/omapfb_main.c |    6 ++++--
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
> index 82ba030..ce4c4de 100644
> --- a/drivers/video/omap/dispc.c
> +++ b/drivers/video/omap/dispc.c
> @@ -519,8 +519,7 @@ static int omap_dispc_set_scale(int plane,
>  	if ((unsigned)plane > OMAPFB_PLANE_NUM)
>  		return -ENODEV;
> 
> -	if (plane == OMAPFB_PLANE_GFX &&
> -	    (out_width != orig_width || out_height != orig_height))
> +	if (out_width != orig_width || out_height != orig_height)
>  		return -EINVAL;
> 
>  	enable_lcd_clocks(1);
> diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
> index 1ffe74c..d176a2c 100644
> --- a/drivers/video/omap/omapfb_main.c
> +++ b/drivers/video/omap/omapfb_main.c
> @@ -223,13 +223,15 @@ static int ctrl_change_mode(struct fb_info *fbi)
>  		if((r = fbdev->ctrl->set_rotate(var->rotate)) < 0)
>  			return r;
> 
> -	if (fbdev->ctrl->set_scale != NULL)
> +	if ((fbdev->ctrl->set_scale != NULL) && (plane->idx > 0))
>  		r = fbdev->ctrl->set_scale(plane->idx,
>  				   var->xres, var->yres,
>  				   plane->info.out_width,
>  				   plane->info.out_height);
> +	if (r < 0)
> +		return r;
> 
> -	return r;
> +	return 0;
>  }
> 
>  /*
> -- 
> 1.5.3.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2008-09-10 17:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-09  7:43 [PATCH] omapfb: remove wrong scale call for gfx_plane arun c
2008-09-10 17:53 ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox