From patchwork Mon Oct 17 21:33:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 9380649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1DA9C60487 for ; Mon, 17 Oct 2016 21:34:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0ED3A28325 for ; Mon, 17 Oct 2016 21:34:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 039BA28D9E; Mon, 17 Oct 2016 21:34:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF5B628325 for ; Mon, 17 Oct 2016 21:34:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB1716E5CB; Mon, 17 Oct 2016 21:33:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kmu-office.ch (mail.kmu-office.ch [178.209.48.109]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F6AE6E5CA for ; Mon, 17 Oct 2016 21:33:52 +0000 (UTC) Received: from trochilidae.toradex.int (75-146-58-181-Washington.hfc.comcastbusiness.net [75.146.58.181]) by mail.kmu-office.ch (Postfix) with ESMTPSA id CFDE65C30E2; Mon, 17 Oct 2016 23:27:34 +0200 (CEST) From: Stefan Agner To: meng.yi@nxp.com, dri-devel@lists.freedesktop.org Subject: [PATCH v3 5/5] drm/fsl-dcu: only init fbdev if required Date: Mon, 17 Oct 2016 14:33:21 -0700 Message-Id: <20161017213321.8074-6-stefan@agner.ch> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161017213321.8074-1-stefan@agner.ch> References: <20161017213321.8074-1-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1476739656; bh=sQQpqqSEVUZdS9CMECS8NyQpRfyrEnjzJ6jgZ57axKk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=X8E4aHBDhGhPSZA45BlIkxZAW2J/Mr8egPrWuffIpLS2sgI6bbRoY7KFhDzTWFy4LIjkM/E3MK6liD5s0AI0YxNo0X4yl0RRdDi5drr/abuSsG/3bQlUkAh4HTLJoW4wv818pAM5QZG3/pztNCnmfkl8lg6Sl0ZCQoIaGWnX9w4= Cc: jianwei.wang.chn@gmail.com, linux-kernel@vger.kernel.org, alison.wang@freescale.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP There is no need to request a CMA backed framebuffer if fbdev emulation is not enabled. Signed-off-by: Stefan Agner --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index e04efbe..3a5880c 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -87,7 +87,8 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) goto done; dev->irq_enabled = true; - fsl_dcu_fbdev_init(dev); + if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)) + fsl_dcu_fbdev_init(dev); return 0; done: