aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2011-03-01 14:18:08 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 02:49:45 -0400
commit99d054d8253b1dbc6ab2d4ebcb25ad4a4e6ba1c8 (patch)
tree7571a36ec5b16ca6abd98c9c107f37b35d3faa34
parent6a2f6d5e970afbc1b8b08bafae9d9138a3206960 (diff)
s3fb: maximize virtual vertical size for fast scrolling
Maximize virtual vertical framebuffer size during init to allow fast scrolling (accelerated by panning). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Ondrej Zajicek <santiago@crfreenet.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--drivers/video/s3fb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 55a94b94a326..9f9be9f37f2e 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -1053,6 +1053,14 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
1053 goto err_find_mode; 1053 goto err_find_mode;
1054 } 1054 }
1055 1055
1056 /* maximize virtual vertical size for fast scrolling */
1057 info->var.yres_virtual = info->fix.smem_len * 8 /
1058 (info->var.bits_per_pixel * info->var.xres_virtual);
1059 if (info->var.yres_virtual < info->var.yres) {
1060 dev_err(info->device, "virtual vertical size smaller than real\n");
1061 goto err_find_mode;
1062 }
1063
1056 rc = fb_alloc_cmap(&info->cmap, 256, 0); 1064 rc = fb_alloc_cmap(&info->cmap, 256, 0);
1057 if (rc < 0) { 1065 if (rc < 0) {
1058 dev_err(info->device, "cannot allocate colormap\n"); 1066 dev_err(info->device, "cannot allocate colormap\n");