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: 3529121 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 77BBA9F1C3 for ; Thu, 23 Jan 2014 14:16:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A7242018B for ; Thu, 23 Jan 2014 14:16:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B548B2017E for ; Thu, 23 Jan 2014 14:16:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A0A7FBF84; Thu, 23 Jan 2014 06:16:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 6425FFBC15 for ; Thu, 23 Jan 2014 06:16:01 -0800 (PST) Received: by mail-we0-f170.google.com with SMTP id u57so1234430wes.1 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 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> Cc: linux-fbdev@vger.kernel.org, Daniel Vetter , linux-kernel@vger.kernel.org, Tomi Valkeinen , Ingo Molnar 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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 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");