From patchwork Fri Aug 2 12:05:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2837882 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B216FBF535 for ; Fri, 2 Aug 2013 12:08:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D19C20502 for ; Fri, 2 Aug 2013 12:08:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A68B1204F7 for ; Fri, 2 Aug 2013 12:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076Ab3HBMG2 (ORCPT ); Fri, 2 Aug 2013 08:06:28 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:36484 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821Ab3HBMG0 (ORCPT ); Fri, 2 Aug 2013 08:06:26 -0400 Received: by mail-ee0-f44.google.com with SMTP id b47so285762eek.17 for ; Fri, 02 Aug 2013 05:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=rFtcyADRSkvdLPSl1ACeXNE5kvVqmr976rfLhF88nWo=; b=Tx8rbI9+kB3fXrQ+Sb5309idaxhXvGVnN/ogTiacH2Vbt4DKxxuzVH98BdAlrX80y5 XRvInhQjc0bAkWD5FZGn+tjw35YskHv4k7ANwdT2E/URaAF/wOWcoj9qzaQnSDw1DwBU /iottpmHkotZQFCSsIjER+XcH1aadkYFRi3bzfnfP8W2lUVrg1Y9LXXm0R2dve2ejcVS M2Db7WFIYPj5pvs1bC8H20U27wETfOtnbfDHq1I6OwS2NTQ7l1cjGm304zZu4wBQ7Egh 4Xj4j1BaXe7k2H8At/bF6uxihmZPPIbjf7s1G2vSDbBvtJuy3iROKNjy8EDff5as9cYM nMKQ== X-Received: by 10.14.95.135 with SMTP id p7mr5617427eef.16.1375445185373; Fri, 02 Aug 2013 05:06:25 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71a809.pool.mediaWays.net. [95.113.168.9]) by mx.google.com with ESMTPSA id t6sm2206447eel.12.2013.08.02.05.06.23 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 02 Aug 2013 05:06:24 -0700 (PDT) From: David Herrmann To: linux-kernel@vger.kernel.org Cc: David Airlie , Geert Uytterhoeven , Stephen Warren , Peter Jones , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , x86@kernel.org, linux-fbdev@vger.kernel.org, akpm@linux-foundation.org, David Herrmann Subject: [PATCH RESEND 2/8] fbdev: simplefb: mark as fw and allocate apertures Date: Fri, 2 Aug 2013 14:05:21 +0200 Message-Id: <1375445127-15480-3-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1375445127-15480-1-git-send-email-dh.herrmann@gmail.com> References: <1375445127-15480-1-git-send-email-dh.herrmann@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fbdev-core uses FBINFO_MISC_FIRMWARE to mark drivers that use firmware framebuffers. Furthermore, we now allocate apertures for the fbinfo device. Both information is used by remove_conflicting_framebuffers() to remove a fbdev device whenever a real driver is loaded. This is used heavily on x86 for VGA/vesa/EFI framebuffers, but is also of great use for all other systems. Especially with x86 support for simplefb, this information is needed to unload simplefb before a real hw-driver (like i915, radeon, nouveau) is loaded. Signed-off-by: David Herrmann Tested-by: Stephen Warren --- drivers/video/simplefb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index 5886989..8d78106 100644 --- a/drivers/video/simplefb.c +++ b/drivers/video/simplefb.c @@ -202,8 +202,16 @@ static int simplefb_probe(struct platform_device *pdev) info->var.blue = params.format->blue; info->var.transp = params.format->transp; + info->apertures = alloc_apertures(1); + if (!info->apertures) { + framebuffer_release(info); + return -ENOMEM; + } + info->apertures->ranges[0].base = info->fix.smem_start; + info->apertures->ranges[0].size = info->fix.smem_len; + info->fbops = &simplefb_ops; - info->flags = FBINFO_DEFAULT; + info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE; info->screen_base = devm_ioremap(&pdev->dev, info->fix.smem_start, info->fix.smem_len); if (!info->screen_base) {