From patchwork Tue Jul 4 15:18:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9825265 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 EF76360237 for ; Tue, 4 Jul 2017 15:20:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0AC0274B4 for ; Tue, 4 Jul 2017 15:20:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D547327FA9; Tue, 4 Jul 2017 15:20:16 +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 D1690274B4 for ; Tue, 4 Jul 2017 15:20:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7287D6E391; Tue, 4 Jul 2017 15:18:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id EED956E391 for ; Tue, 4 Jul 2017 15:18:57 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id j85so26983648wmj.0 for ; Tue, 04 Jul 2017 08:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0YUrQtArmNkxx8RNIK+iHF6T7lDj1WDUT/eRdeNWBcM=; b=X4eJ7rHo16cWnC1sNd+jm/NfaKtWGfolqABeixC2dbeyoCjx1z6kMy7OOsK08n2//o uwaRImWYMKVnicbmLeDcDIwYqfdG5Sjp/UURgaGUWISjFQZ3CHd/LJLcgfWzib0d4axw dlDahfenfytuXAJOObxfGINrhu1+57tpdNe+8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0YUrQtArmNkxx8RNIK+iHF6T7lDj1WDUT/eRdeNWBcM=; b=goUVtZ+LUELMm/3JfjvbuKmTnX4tuQ3x0CPieMgC9f5QZiQEIZlPzMVnhoO2o2IvTU O9DiKB5s1M+imfmA7/ka1Zztdpm/RSPYdB5XeCZBnwKhAu8ab4b5jUEKB2EbpTEgTj5W MgZNWk9mdHur1XRr65BswLxkisJdzAEu4ytCcYn5J9f5KZTGy4DrNKA9D2H1eOVpadm9 kKLa8BeBRRq/1LERY7W7PTHLCDl69SXkC8Mt1wmyI5ihU5i8gR7teg3rbuzU5ZApSwmm lggt+F+7oyIqd6R1+yJIUxXD5/rxuKzakb6Ty7S1NKRpsSDPe9QojEqux8li5y9neS1J 8biA== X-Gm-Message-State: AKS2vOxVF9r/TDsgqxPGNQlBVkVl8VEyEvNGu13ZbyXo3/BwhMgGFVhv YKEfjwD9q8RKvBVNEcs= X-Received: by 10.80.137.45 with SMTP id e42mr18853602ede.67.1499181536331; Tue, 04 Jul 2017 08:18:56 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5640:0:960b:2678:e223:c1c6]) by smtp.gmail.com with ESMTPSA id 2sm23676308edt.36.2017.07.04.08.18.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 08:18:55 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 11/13] drm/i915: Protect against deferred fbdev setup Date: Tue, 4 Jul 2017 17:18:31 +0200 Message-Id: <20170704151833.17304-12-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170704151833.17304-1-daniel.vetter@ffwll.ch> References: <20170704151833.17304-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Intel Graphics Development , Daniel Vetter 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 We could probably hit this already with our current async fbdev init, but it's much easier to hit this with the new deferred fbdev setup that I'm working on polishing. Cc: Maarten Lankhorst Reported-by: Maarten Lankhorst Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 580bd4f4a49e..a4224566ebca 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1931,7 +1931,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) return ret; #ifdef CONFIG_DRM_FBDEV_EMULATION - if (dev_priv->fbdev) { + if (dev_priv->fbdev && dev_priv->fbdev->helper.fb) { fbdev_fb = to_intel_framebuffer(dev_priv->fbdev->helper.fb); seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ",