From patchwork Tue Feb 7 12:49:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9559827 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 6DF9F6047A for ; Tue, 7 Feb 2017 12:50:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 612052846A for ; Tue, 7 Feb 2017 12:50:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 563122846C; Tue, 7 Feb 2017 12:50:05 +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 191C62846B for ; Tue, 7 Feb 2017 12:50:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F4B56E37A; Tue, 7 Feb 2017 12:50:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75EB56E37A; Tue, 7 Feb 2017 12:50:01 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id c85so28116285wmi.1; Tue, 07 Feb 2017 04:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zneLrOeJshiXrEafH/RD6t77wIM9Al9igJlpH9Rwugs=; b=ErCGm5ruYSh+GeWZfFjZPuGVMkBUuoe3lB9vKeXJELsHVhQaowAG1yAymQ7s6zuTVX UZRDMw/onZ4MWx3uqiHf0NFzrMeohJRveZ6ADZg7Ctn4dGLG+c9+vPENnGMioR3qK4FK 24Kvg3iJ4S1PSpLJTowSg4Bx0pJ62iRrDljsDStztsvzDioFjJuZe7Y4uLnM+v7ZAvq4 qFfEUdEy30fjLELh6M+N/ynQ/pUGjeZHUL7jkDNELecrUTfx398NWH/bMKKi28+Nq6n9 u6K+rkAqkii77YevZcnB4lt0y7NWiTQynZ04g91jpMezuG7kvbKQkK5ZX6Zn8Vwn/RqT r88g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zneLrOeJshiXrEafH/RD6t77wIM9Al9igJlpH9Rwugs=; b=FrcZdlaTRqIta5rJceGJmS69HYPscrBhLz8g84mVLrIQOvwsKGvT7KiHYYvnvyc+EK sgoHDWSQLHz3v3J44W+1Z3+1W91a4kSeXBJ1cc9lVbSE6DxdHzdI1I/jM55YdhBWN5HU BIDsPonfYwTzVnfbD4dTlTbsgNIKKY5amIuUo97kBmp552sWTf202UqMvhDzFs5gmMW3 ZD2fhEWFSuC8AtDCPqHThQ62rk8zKfBwWimN6Gh0HZhF6HfuOeXe9Kr+6p6L3gB59/4N 3gYgtvfwOxBsMBwtr8iC/fh1WhvBBrr2PPGE1PuWy+ZPUWNQjJU7X50iF7ks0JKdOJAQ rqJA== X-Gm-Message-State: AMke39m24A36OtFBAcYxa6gvV64KxApFZjUk5ZZDUWFS/i+Lx38RanUdMgIV7F6E0bIojA== X-Received: by 10.28.230.194 with SMTP id e63mr13240824wmi.25.1486471800188; Tue, 07 Feb 2017 04:50:00 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id 202sm18646026wmp.20.2017.02.07.04.49.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 04:49:59 -0800 (PST) From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm: Cancel drm_fb_helper_resume_work on unload Date: Tue, 7 Feb 2017 12:49:56 +0000 Message-Id: <20170207124956.14954-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170207124956.14954-1-chris@chris-wilson.co.uk> References: <20170207124956.14954-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, "# v4 . 9+" 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We can not allow the worker to run after its fbdev, or even the module, has been removed. Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()") Signed-off-by: Chris Wilson Cc: Noralf Trønnes Cc: Daniel Vetter Cc: Jani Nikula Cc: Sean Paul Cc: dri-devel@lists.freedesktop.org Cc: # v4.9+ --- drivers/gpu/drm/drm_fb_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 2d0810c9f3dc..842c461b0b21 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -860,6 +860,7 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper) if (!drm_fbdev_emulation) return; + cancel_work_sync(&fb_helper->resume_work); cancel_work_sync(&fb_helper->dirty_work); mutex_lock(&kernel_fb_helper_lock);