Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99d054d8 authored by Ondrej Zary's avatar Ondrej Zary Committed by Paul Mundt
Browse files

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: default avatarOndrej Zary <linux@rainbow-software.org>
Acked-by: default avatarOndrej Zajicek <santiago@crfreenet.org>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 6a2f6d5e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1053,6 +1053,14 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
		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");