From patchwork Sun Feb 20 18:37:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 576001 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1KIbcUX022925 for ; Sun, 20 Feb 2011 18:37:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754413Ab1BTShg (ORCPT ); Sun, 20 Feb 2011 13:37:36 -0500 Received: from mail1-out1.atlantis.sk ([80.94.52.55]:43586 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754353Ab1BTShf (ORCPT ); Sun, 20 Feb 2011 13:37:35 -0500 Received: (qmail 8952 invoked from network); 20 Feb 2011 18:37:33 -0000 Received: from unknown (HELO pentium) (rainbow@rainbow-software.org@85.216.180.141) by mail.atlantis.sk with AES256-SHA encrypted SMTP; 20 Feb 2011 18:37:33 -0000 From: Ondrej Zary To: Ondrej Zajicek Subject: [PATCH] s3fb: maximize virtual vertical size for fast scrolling Date: Sun, 20 Feb 2011 19:37:15 +0100 User-Agent: KMail/1.9.10 Cc: linux-fbdev@vger.kernel.org, Kernel development list , David Miller MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201102201937.19112.linux@rainbow-software.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 20 Feb 2011 18:37:40 +0000 (UTC) --- linux-2.6.38-rc4-/drivers/video/s3fb.c 2011-02-20 19:11:28.000000000 +0100 +++ linux-2.6.38-rc4/drivers/video/s3fb.c 2011-02-20 19:17:04.000000000 +0100 @@ -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");