From patchwork Tue Aug 2 10:09:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101982 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp70171qga; Tue, 2 Aug 2016 03:09:57 -0700 (PDT) X-Received: by 10.66.216.70 with SMTP id oo6mr103626265pac.39.1470132590960; Tue, 02 Aug 2016 03:09:50 -0700 (PDT) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTP id lk5si2370297pab.204.2016.08.02.03.09.50; Tue, 02 Aug 2016 03:09:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF6606E434; Tue, 2 Aug 2016 10:09:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by gabe.freedesktop.org (Postfix) with ESMTPS id D22BC6E434 for ; Tue, 2 Aug 2016 10:09:42 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0MgTUE-1bs5tf0Ozm-00NmSs; Tue, 02 Aug 2016 12:09:29 +0200 From: Arnd Bergmann To: David Airlie , Gerd Hoffmann Subject: [PATCH] drm/virtio: fix building without CONFIG_FBDEV Date: Tue, 2 Aug 2016 12:09:15 +0200 Message-Id: <20160802100922.3914038-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:G0XCRL23kW8FdFW+cpvyRCkLedX7pEbnr2pd9dw8ginJglcbzsw ycbRIAG82JpvO5kfnoH4DN92vNT7BeUh8c3o0Qou8PwnHnqZKI/QVa4IdJX4/2KZmcaTEiS BJ2jHqJrdFOtXYolcZ1UDyiAIBhSnLRyIls5ffopr3bv5DFNeSfUGNo4zXLIUoqbGGrvX2A JfDHcxY0nTvBSDV9/Kw6A== X-UI-Out-Filterresults: notjunk:1; V01:K0:Sl8vee4lPuM=:HN/ylbQWZYNKpo7dTun2ml h6uyfC8CVoy/zF3CAX9R1SgaW4nkpLBu8M6zLGURwFBNEiXofGE3FCrjhSUMP4eg5XmFNK3LK XnTmrluJe2X33nyzva0D3YbETsPfSnyUw8z9kAuGINqQP+/tJuHc3r/Ho2Ui/QmlLSYTGJ2g1 k3PbWiL5n0YJ08wQDtkApEOkXTb/0oFIcwzmuR7wvfRng5deMwhd227Go5TY/M7ja/yPCtf5R hMBQOYvK1Vz3pelvGnh642KB22I0XKcHsJ/AwqeoP5H/RjGFZXuKWDGRY6w14MgNm/+0tjalj 1xcl7We2APmDImkUqNrnppm5z459urF+jwPFPc40V9vajkOF63/sBOOqVF0TFkt7R2SfEWi+c N8hdZ5gFrRMcGIWMPpdYWNiSMNqVMX8mYm9hoeGveLm9DZD562p6lck06QU6EjS0lz6uM/+ls YZk1hvGLsGE2/hGG8K2hkTrNy1eqpovfAhkta7BMhM2fvELjheH+APowte5vz4Lh9VM0IO5io GjCKAG7tim+UUQtD7w1EPGou8ukPpj81RLugWApPZETPQVJNGM7tsmu2CwM39Ad/p4+nP3ooN IFnGJt+VGidi3uPwIqSRYEnWahcEOD5AHGXFKVZVcpZhUAS+tIUXRmRDdeDGzhAWBKUpq8hLC 3dewC10L8MIp1W+i8TVnOMyzUkZorb77CKZcCcVP3bKnp30tkjUIUtrsGyvEOxGZgMy4= Cc: Arnd Bergmann , Daniel Vetter , Emil Velikov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Tobias Jakobi 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" Removing the build-time dependency on DRM_KMS_FB_HELPER means we can now build with CONFIG_FB disabled or as a loadable module, leading to a link error: ERROR: "remove_conflicting_framebuffers" [drivers/gpu/drm/virtio/virtio-gpu.ko] undefined! There is no need to call remove_conflicting_framebuffers() if CONFIG_FB is disabled, or if the virtio-gpu driver is built-in and CONFIG_FB=m, as there won't be any prior consoles that are registered at that point. This adds a compile-time check in the driver to ensure we only attempt to call that function if either CONFIG_FB=y or both subsystems are configured as loadable modules. Signed-off-by: Arnd Bergmann Fixes: 0b6320dfdfea ("drm/virtio: make fbdev support really optional") --- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c index 7f0e93f87a55..2087569ae8d7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -65,7 +65,7 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev) DRM_INFO("pci: %s detected\n", vga ? "virtio-vga" : "virtio-gpu-pci"); dev->pdev = pdev; - if (vga) + if (IS_REACHABLE(CONFIG_FB) && vga) virtio_pci_kick_out_firmware_fb(pdev); }