From patchwork Fri Apr 5 13:02:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10887353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92FCA15AC for ; Fri, 5 Apr 2019 13:02:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B7A828B61 for ; Fri, 5 Apr 2019 13:02:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DFCF28B68; Fri, 5 Apr 2019 13:02: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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 769E828B61 for ; Fri, 5 Apr 2019 13:02:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2EA789D63; Fri, 5 Apr 2019 13:02:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 35CA489D63; Fri, 5 Apr 2019 13:02:49 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 06:02:48 -0700 X-IronPort-AV: E=Sophos;i="5.60,312,1549958400"; d="scan'208";a="148330325" Received: from jkrzyszt-desk.igk.intel.com ([172.22.244.18]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 06:02:45 -0700 From: Janusz Krzysztofik To: Joonas Lahtinen , Jani Nikula , Rodrigo Vivi Subject: [PATCH 0/2] Stop users from using the device on driver unbind Date: Fri, 5 Apr 2019 15:02:33 +0200 Message-Id: <20190405130235.7707-1-janusz.krzysztofik@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Janusz Krzysztofik , michal.wajdeczko@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use drm_dev_unplug() to have device resources protected from user access by DRM layer as soon as the driver is going to be unbound. Also, cancel all pending work so associated resources can be quickly released. Janusz Krzysztofik (2): drm/i915: Use drm_dev_unplug() drm/i915: Mark GEM wedged right after marking device unplugged drivers/gpu/drm/i915/i915_drv.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) I'm resending these two patches together in series to make the robot happy about the second one. Also, I've added the Suggested-by: clause to credit actual Chris' contribution. Thanks, Janusz