From patchwork Tue Jun 28 15:42:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paauwe, Bob J" X-Patchwork-Id: 9203467 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 497EC60752 for ; Tue, 28 Jun 2016 15:40:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B729285DF for ; Tue, 28 Jun 2016 15:40:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FB272860D; Tue, 28 Jun 2016 15:40:53 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2E0E285DF for ; Tue, 28 Jun 2016 15:40:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 454526E5D4; Tue, 28 Jun 2016 15:40:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 74FC48930F for ; Tue, 28 Jun 2016 15:40:49 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 28 Jun 2016 08:40:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,541,1459839600"; d="scan'208";a="996663850" Received: from bpaauwe-desk.fm.intel.com ([10.1.134.207]) by fmsmga001.fm.intel.com with ESMTP; 28 Jun 2016 08:40:49 -0700 From: Bob Paauwe To: intel-gfx Date: Tue, 28 Jun 2016 08:42:01 -0700 Message-Id: <1467128521-6037-1-git-send-email-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [Intel-gfx] [PATCH] drm/i915: Skip fbdev core suspend/resume when fbdev emulation is disabled. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP When fbdev emulation is disabled it is not a good idea to call into the core fb_set_suspend() function as this will cause suspend and resume to fail. Also ifbdev->fb is null so the defeference farther down will oops. Nothing in that path is needed in this case so bail early when ifbdev->fb is null. Signed-off-by: Bob Paauwe --- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index b75484a..9b14c13 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -767,7 +767,7 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous struct intel_fbdev *ifbdev = dev_priv->fbdev; struct fb_info *info; - if (!ifbdev) + if (!ifbdev || !ifbdev->fb) return; info = ifbdev->helper.fbdev;