From patchwork Thu Jul 4 12:25:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 2823041 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9402D9F3C3 for ; Thu, 4 Jul 2013 12:28:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB8882015A for ; Thu, 4 Jul 2013 12:28:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A5EF020154 for ; Thu, 4 Jul 2013 12:28:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABAF0435BA for ; Thu, 4 Jul 2013 05:28:44 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 9721AE6682 for ; Thu, 4 Jul 2013 05:26:27 -0700 (PDT) Received: by mail-ee0-f43.google.com with SMTP id l10so749572eei.30 for ; Thu, 04 Jul 2013 05:26:26 -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=H2Cw0Veh5kkgh6b4sk80FF7hgyjVD1MLO3qDjMcveHE=; b=ubFBLr9Ml8G91pucBmBD3H1Blu4QzsHr+RDEpgapcVoCWZzc/qKMNMxXQebRHJL5iU CWCIDtVWvmLooIm7EEiH2zBVNRDT4eY5rEl/E4O3+K35EX4u4KicxmZA8au/2JFhB95L ER7kTCo+vJgwTAjjTOMIG9uIj37OFsuECAHbR/CbcznrqwyfHGu6Po/UUQlK/+U2EWIX FMWgLa0lnsA4UNAqHIevtjumGbDNEyfswzbr4amKThyvsVp7CFki3KjkLX5k9JNBGcQo lW9v8pfKy4ixZuG3FIE8mkHDCvIpOkmuzQ8zG2J+UxytfxDtyzLnaHr6EsCfINoGaq45 DHXw== X-Received: by 10.15.90.139 with SMTP id q11mr6451331eez.137.1372940786807; Thu, 04 Jul 2013 05:26:26 -0700 (PDT) Received: from localhost.localdomain (stgt-5f718597.pool.mediaWays.net. [95.113.133.151]) by mx.google.com with ESMTPSA id n5sm4678843eed.9.2013.07.04.05.26.25 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Jul 2013 05:26:26 -0700 (PDT) From: David Herrmann To: linux-kernel@vger.kernel.org Subject: [PATCH v2 02/14] fbdev: simplefb: mark as fw and allocate apertures Date: Thu, 4 Jul 2013 14:25:02 +0200 Message-Id: <1372940714-12470-3-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1372940714-12470-1-git-send-email-dh.herrmann@gmail.com> References: <1372940714-12470-1-git-send-email-dh.herrmann@gmail.com> Cc: Stephen Warren , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 --- 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) {