Re: [PATCH 3/4] [ARM] s3c-fb: Add support for display panning

From
Russell King - ARM Linux <hidden>
Date
2009-07-09 18:02:28
Reply to
Krzysztof Helt, 2009-07-09
On Thu, Jul 09, 2009 at 07:49:12PM +0200, Krzysztof Helt wrote:
On Thu, 09 Jul 2009 17:09:00 +0200
Pawel Osciak [off-list ref] wrote:
quoted
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index ff0b1a3..77b77a2 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -294,6 +294,8 @@ static int s3c_fb_set_par(struct fb_info *info)
 	}
 
 	info->fix.line_length = (var->xres_virtual * var->bits_per_pixel) / 8;
+	info->fix.xpanstep = info->var.xres_virtual > info->var.xres ? 1 : 0;
+	info->fix.ypanstep = info->var.yres_virtual > info->var.yres ? 1 : 0;
 
These two lines are not need. If the xres_virtual > xres  there is no 
panning possible (the same is true for yres and yres_virtual).
Erm, I think you have that backwards.

xres,yres is the visibly displayed dimentions.
xres_virtual,yres_virtual is the size of the underlying framebuffer.

If the underlying framebuffer is larger than the visible display, you can
pan the visible display around within the underlying framebuffer.

It is common for unaccelerated framebuffers used in text mode to have
xres_virtual = xres, yres_virtual >> yres so that Y panning (or if your
video driver supports it, wrapping) can occur to speed line scrolling.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
Thread (3 messages) 3 messages, 3 authors, last reply 2009-07-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help