From patchwork Wed Feb 10 19:55:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marcin_=C5=9Alusarz?= X-Patchwork-Id: 78561 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1AJwu5d031224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Feb 2010 19:59:35 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NfIgv-00064r-Na; Wed, 10 Feb 2010 19:57:41 +0000 Received: from sfi-mx-2.v28.ch3.sourceforge.com ([172.29.28.122] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NfIgu-00064f-SY for dri-devel@lists.sourceforge.net; Wed, 10 Feb 2010 19:57:40 +0000 Received-SPF: pass (sfi-mx-2.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.218.215 as permitted sender) client-ip=209.85.218.215; envelope-from=marcin.slusarz@gmail.com; helo=mail-bw0-f215.google.com; Received: from mail-bw0-f215.google.com ([209.85.218.215]) by sfi-mx-2.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NfIgu-0004eA-0a for dri-devel@lists.sourceforge.net; Wed, 10 Feb 2010 19:57:40 +0000 Received: by bwz7 with SMTP id 7so432597bwz.6 for ; Wed, 10 Feb 2010 11:57:33 -0800 (PST) Received: by 10.204.175.68 with SMTP id w4mr442597bkz.213.1265831853117; Wed, 10 Feb 2010 11:57:33 -0800 (PST) Received: from joi.lan (acet92.neoplus.adsl.tpnet.pl [83.9.195.92]) by mx.google.com with ESMTPS id 13sm732987bwz.2.2010.02.10.11.57.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 10 Feb 2010 11:57:31 -0800 (PST) Date: Wed, 10 Feb 2010 20:55:30 +0100 From: Marcin Slusarz To: Dave Airlie Subject: [PATCH] efifb: fix framebuffer handoff Message-ID: <20100210195530.GA29558@joi.lan> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature X-Headers-End: 1NfIgu-0004eA-0a Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.sourceforge.net, Alex Zhavnerchik X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 10 Feb 2010 19:59:35 +0000 (UTC) diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c index eb12182..d25df51 100644 --- a/drivers/video/efifb.c +++ b/drivers/video/efifb.c @@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green, return 0; } +static void efifb_destroy(struct fb_info *info) +{ + if (info->screen_base) + iounmap(info->screen_base); + release_mem_region(info->aperture_base, info->aperture_size); + framebuffer_release(info); +} + static struct fb_ops efifb_ops = { .owner = THIS_MODULE, + .fb_destroy = efifb_destroy, .fb_setcolreg = efifb_setcolreg, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, @@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev) info->par = NULL; info->aperture_base = efifb_fix.smem_start; - info->aperture_size = size_total; + info->aperture_size = size_remap; info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len); if (!info->screen_base) {