Skip to contentSkip to conversation

s3fb: maximize virtual vertical size for fast scrolling

PATCH In review Ondrej Zary 2 participants 2 messages Mar 1, 2011 – Mar 3, 2011 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 s3fb: maximize virtual vertical size for fast scrolling

Maximize virtual vertical framebuffer size during init to allow fast scrolling (accelerated by panning).

drivers/video/s3fb.c +8 -0
@@ -1060,6 +1060,14 @@ static int __devinit s3_pci_probe(struct
 		goto err_find_mode;
 	}
 
+	/* maximize virtual vertical size for fast scrolling */
+	info->var.yres_virtual = info->fix.smem_len * 8 /
+			(info->var.bits_per_pixel * info->var.xres_virtual);
+	if (info->var.yres_virtual < info->var.yres) {
+		dev_err(info->device, "virtual vertical size smaller than real\n");
+		goto err_find_mode;
+	}
+
 	rc = fb_alloc_cmap(&info->cmap, 256, 0);
 	if (rc < 0) {
 		dev_err(info->device, "cannot allocate colormap\n");
Signature · 1 line
Ondrej Zary
Acked-by on v1 1/5
#1 lore raw
Quoted 4 lines · Ondrej Zary

Maximize virtual vertical framebuffer size during init to allow fast scrolling (accelerated by panning).

Signature · 5 lines
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: [email protected])
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."