From patchwork Tue Feb 7 12:49:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9559825 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 9C74D6047A for ; Tue, 7 Feb 2017 12:50:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F6F128466 for ; Tue, 7 Feb 2017 12:50:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 844C42846F; Tue, 7 Feb 2017 12:50:03 +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=unavailable 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 48C8128466 for ; Tue, 7 Feb 2017 12:50:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18EB46E6A8; Tue, 7 Feb 2017 12:50:02 +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 9F40F6E37A; Tue, 7 Feb 2017 12:50:00 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id r18so28179570wmd.3; Tue, 07 Feb 2017 04:50:00 -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:mime-version :content-transfer-encoding; bh=fSoqkFchvvDXwmyUzjM/mpcpzYPaJp1VRo652N+g3zE=; b=YcGRsagxclBiQINrn8Gq5NirKmRGi3YsZnh9xb1hozweW6NHdCJMBE1HmFzamfqYRh SqM0p3FZb41o1uekLBsNZssgNEmXS0p3Se3KjLs6TA+J055uF8r7KTmmkAdd3u9V4JTo +JFQBXgVEcfxSrdUYf306Nwk+3ADsX0zE/tiuzA/zd37fXyB6WFcP+VEajTCccCaT2JB pyo1FRCVMZdE8aVy4gnFFzkmTHC30IMWb+ZkGvCxT3wSbu+twYJCYKLzixiIb/xyw0Hb HrLt7N3zpwvxSFGlRXqWDKHX+uI71cI1EGyNmAGMtbwmkokHO9zdqZJUuCw0NJuK11tz UvYQ== 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 :mime-version:content-transfer-encoding; bh=fSoqkFchvvDXwmyUzjM/mpcpzYPaJp1VRo652N+g3zE=; b=gEWHOPs1XoK3p81Ev4nBlP0AFM81xGLBdOqG8Nnqu7viplu9a3y4frtT9nGtd+LsX2 Z2g02n1WPe+SQOlv2u/+gqK+TAvqU/stBSCf9WjkPCVZ9Y5Y3omrxL/o4bt9iAR+WYgq TfBTtV9RQZVDTiKXqHBWhJiGNccc7/6/v64ORPMt8FfUJ7lGPnU/GqQ/YzYWzO7tDgTH 6czxKTQXBt9SmB08cywfuy0IpohkFW87L5DNP8VcFW3zTcKP2tOtqRSoBZzAvzLZlsRT vHUoiKjxnLjLeuvWpq3s7nIRSrN4XQ2Ctvg3kVPSmO8odyJecN8RBGXi06774FbZMDYF cPmw== X-Gm-Message-State: AMke39m7wEX75sFy/ujGMX8oV8rM8euT6uGh0IUiplCP4crvZoL1/8EXemDuDRMBmdbe4g== X-Received: by 10.223.130.111 with SMTP id 102mr16402850wrb.59.1486471799331; Tue, 07 Feb 2017 04:49:59 -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.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 04:49:58 -0800 (PST) From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm: Cancel drm_fb_helper_dirty_work on unload Date: Tue, 7 Feb 2017 12:49:55 +0000 Message-Id: <20170207124956.14954-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, "# v4 . 7+" 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: eaa434defaca ("drm/fb-helper: Add fb_deferred_io support") 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.7+ --- drivers/gpu/drm/drm_fb_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index ee7cbcd3cfeb..2d0810c9f3dc 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -860,6 +860,8 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper) if (!drm_fbdev_emulation) return; + cancel_work_sync(&fb_helper->dirty_work); + mutex_lock(&kernel_fb_helper_lock); if (!list_empty(&fb_helper->kernel_fb_list)) { list_del(&fb_helper->kernel_fb_list);