All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 27/29] vt8500lcdfb: use display information in info not in var for panning
@ 2011-05-25 22:58 Laurent Pinchart
  2011-05-26  3:54 ` [PATCH 27/29] vt8500lcdfb: use display information in info not in Alexey Charkov
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2011-05-25 22:58 UTC (permalink / raw)
  To: linux-fbdev

We must not use any information in the passed var besides xoffset,
yoffset and vmode as otherwise applications might abuse it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Alexey Charkov <alchark@gmail.com>
---
 drivers/video/vt8500lcdfb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c
index 0e120d6..c13c246 100644
--- a/drivers/video/vt8500lcdfb.c
+++ b/drivers/video/vt8500lcdfb.c
@@ -210,8 +210,8 @@ static int vt8500lcd_pan_display(struct fb_var_screeninfo *var,
 	struct vt8500lcd_info *fbi = to_vt8500lcd_info(info);
 
 	writel((1 << 31)
-		| (((var->xres_virtual - var->xres) * pixlen / 4) << 20)
-		| (off >> 2), fbi->regbase + 0x20);
+	     | (((info->var.xres_virtual - info->var.xres) * pixlen / 4) << 20)
+	     | (off >> 2), fbi->regbase + 0x20);
 	return 0;
 }
 
-- 
1.7.3.4


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

* Re: [PATCH 27/29] vt8500lcdfb: use display information in info not in
  2011-05-25 22:58 [PATCH 27/29] vt8500lcdfb: use display information in info not in var for panning Laurent Pinchart
@ 2011-05-26  3:54 ` Alexey Charkov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Charkov @ 2011-05-26  3:54 UTC (permalink / raw)
  To: linux-fbdev

2011/5/26 Laurent Pinchart <laurent.pinchart@ideasonboard.com>:
> We must not use any information in the passed var besides xoffset,
> yoffset and vmode as otherwise applications might abuse it.

Agreed, thanks for the fix!

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Alexey Charkov <alchark@gmail.com>
> ---
>  drivers/video/vt8500lcdfb.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/vt8500lcdfb.c b/drivers/video/vt8500lcdfb.c
> index 0e120d6..c13c246 100644
> --- a/drivers/video/vt8500lcdfb.c
> +++ b/drivers/video/vt8500lcdfb.c
> @@ -210,8 +210,8 @@ static int vt8500lcd_pan_display(struct fb_var_screeninfo *var,
>        struct vt8500lcd_info *fbi = to_vt8500lcd_info(info);
>
>        writel((1 << 31)
> -               | (((var->xres_virtual - var->xres) * pixlen / 4) << 20)
> -               | (off >> 2), fbi->regbase + 0x20);
> +            | (((info->var.xres_virtual - info->var.xres) * pixlen / 4) << 20)
> +            | (off >> 2), fbi->regbase + 0x20);
>        return 0;
>  }
>
> --
> 1.7.3.4
>
>

Best regards,
Alexey

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

end of thread, other threads:[~2011-05-26  3:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 22:58 [PATCH 27/29] vt8500lcdfb: use display information in info not in var for panning Laurent Pinchart
2011-05-26  3:54 ` [PATCH 27/29] vt8500lcdfb: use display information in info not in Alexey Charkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.