From patchwork Thu Jan 23 14:14:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 3529211 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 93F49C02DC for ; Thu, 23 Jan 2014 14:18:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B606220108 for ; Thu, 23 Jan 2014 14:17:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0FA9200F0 for ; Thu, 23 Jan 2014 14:17:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932202AbaAWOQH (ORCPT ); Thu, 23 Jan 2014 09:16:07 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:64005 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932193AbaAWOQC (ORCPT ); Thu, 23 Jan 2014 09:16:02 -0500 Received: by mail-wg0-f49.google.com with SMTP id a1so1512279wgh.28 for ; Thu, 23 Jan 2014 06:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2HWAJZN2g2f2yPv8Z0kJoMXI0wK2c3Knp9d8FX/xjyY=; b=qK6/IGMlDjET4eCPqiQCojj/jBjM4loaPOYAGH8cRezxiYkZ6eebv63kEDsboVoztc XmSw+6viAMwTAVlJ9j/+06ZiSko6WNO7iBaUYMOVXv5lzYoHv5xkZKMvRj69umOXjf9I Nva5fh2y+gBGBffVAqUrkLitvAFbDfCn1nBq/fbAHksxp9kKAdym3zMabeinyVLxpan4 cSjSf0b5rruDKA/GW3F118eJb3nI9PqeIR6poy4Ws8BdPaD+MhRuakFd/npyeiGTOLGt yB9qAEBYqlYD/20J2cD3mxPTmTllieVoiGkigIa/bgp+Enil/8UsbjiCY0hjf07cjWeV Rf1A== X-Received: by 10.181.13.11 with SMTP id eu11mr24214352wid.30.1390486560619; Thu, 23 Jan 2014 06:16:00 -0800 (PST) Received: from david-ub.localdomain (stgt-5f71be19.pool.mediaWays.net. [95.113.190.25]) by mx.google.com with ESMTPSA id ci4sm22667871wjc.21.2014.01.23.06.15.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jan 2014 06:15:59 -0800 (PST) From: David Herrmann To: dri-devel@lists.freedesktop.org Cc: Ingo Molnar , linux-fbdev@vger.kernel.org, Dave Airlie , Daniel Vetter , Tomi Valkeinen , linux-kernel@vger.kernel.org, Tom Gundersen , David Herrmann Subject: [PATCH 07/11] drm: mgag200: remove redundant fbdev removal Date: Thu, 23 Jan 2014 15:14:59 +0100 Message-Id: <1390486503-1504-8-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1390486503-1504-1-git-send-email-dh.herrmann@gmail.com> References: <1390486503-1504-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=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 We already call remove_conflicting_framebuffers() on PCI BAR0 during pci-probe, no need to do that again during device loading. This avoids calling into remove_conflicting_framebuffers() from within DRM ->load() callback, which might deadlock, once we make this call remove DRM-backed sysfb-devices, too. Signed-off-by: David Herrmann --- drivers/gpu/drm/mgag200/mgag200_main.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index 26868e5..0ee093c 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -117,20 +117,11 @@ static int mga_probe_vram(struct mga_device *mdev, void __iomem *mem) static int mga_vram_init(struct mga_device *mdev) { void __iomem *mem; - struct apertures_struct *aper = alloc_apertures(1); - if (!aper) - return -ENOMEM; /* BAR 0 is VRAM */ mdev->mc.vram_base = pci_resource_start(mdev->dev->pdev, 0); mdev->mc.vram_window = pci_resource_len(mdev->dev->pdev, 0); - aper->ranges[0].base = mdev->mc.vram_base; - aper->ranges[0].size = mdev->mc.vram_window; - - remove_conflicting_framebuffers(aper, "mgafb", true); - kfree(aper); - if (!devm_request_mem_region(mdev->dev->dev, mdev->mc.vram_base, mdev->mc.vram_window, "mgadrmfb_vram")) { DRM_ERROR("can't reserve VRAM\n");