Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756976Ab1CATSV (ORCPT ); Tue, 1 Mar 2011 14:18:21 -0500 Received: from mail1-out1.atlantis.sk ([80.94.52.55]:55666 "EHLO mail.atlantis.sk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756903Ab1CATST (ORCPT ); Tue, 1 Mar 2011 14:18:19 -0500 From: Ondrej Zary To: Ondrej Zajicek Subject: [PATCH 1/5] s3fb: maximize virtual vertical size for fast scrolling Date: Tue, 1 Mar 2011 20:18:08 +0100 User-Agent: KMail/1.9.10 Cc: linux-fbdev@vger.kernel.org, Kernel development list MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201103012018.11283.linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 30 Maximize virtual vertical framebuffer size during init to allow fast scrolling (accelerated by panning). Signed-off-by: Ondrej Zary --- 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"); -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/