From patchwork Fri Dec 14 23:57:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10731835 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 E77EF13AD for ; Fri, 14 Dec 2018 23:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A1872D19A for ; Fri, 14 Dec 2018 23:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CC732D1D9; Fri, 14 Dec 2018 23:58: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F380D2D19A for ; Fri, 14 Dec 2018 23:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726609AbeLNX6C (ORCPT ); Fri, 14 Dec 2018 18:58:02 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:36226 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbeLNX6C (ORCPT ); Fri, 14 Dec 2018 18:58:02 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7468560735; Fri, 14 Dec 2018 23:58:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544831881; bh=yCjymV5+v+amAOunhWwXlNcVvMqK9+AIdJg2uPpEfCY=; h=From:To:Cc:Subject:Date:From; b=IDq9fvfBQ5k64Susiz+pCWxZ75ANVS/3JChXb6TViUzfAnEbLkrp7Q4j8wDHfqhvu 0wVBNNkOLJfR9zX0p8+mgAdk08occ/abSxhhp51oZ9bZhptsB0eCmTh/VmYFawd22k Rh3QoGXNFMuRUjhSs/wKgRL83BXI6/CJex5R9bOo= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1AE5060312; Fri, 14 Dec 2018 23:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544831880; bh=yCjymV5+v+amAOunhWwXlNcVvMqK9+AIdJg2uPpEfCY=; h=From:To:Cc:Subject:Date:From; b=PcWIIqCbZqHKrHg9SZGoYXdD357upQ3yYlx+uo+3jNjNM3IF+0AFYLFCO82TD1M8H dV+sXu3nXMFS4kdOIQyc55DIVKsOzRVdsH/zE6Niq37Dc0FzNkmh7IqbhvmogWkSEs hSvyPlTh7MydLL+GrqXIO/rpHZidEsl5dtNXJikM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1AE5060312 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Jeykumar Sankaran , seanpaul@chromium.org, robdclark@gmail.com, hoegsberg@google.com, jcrouse@codeaurora.org Subject: [PATCH v5 1/5] drm/msm/dpu: use kthread_destroy_worker to release msm workers Date: Fri, 14 Dec 2018 15:57:51 -0800 Message-Id: <1544831875-32566-1-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP use kthread_destroy_worker to destroy workers and release their associated kthreads. changes in v3: - introduced in the series changes in v4: - none changes in v5: - none Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/msm_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 6265be8..78d5b1c 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -291,14 +291,12 @@ static int msm_drm_uninit(struct device *dev) /* clean up display commit/event worker threads */ for (i = 0; i < priv->num_crtcs; i++) { if (priv->disp_thread[i].thread) { - kthread_flush_worker(&priv->disp_thread[i].worker); - kthread_stop(priv->disp_thread[i].thread); + kthread_destroy_worker(&priv->disp_thread[i].worker); priv->disp_thread[i].thread = NULL; } if (priv->event_thread[i].thread) { - kthread_flush_worker(&priv->event_thread[i].worker); - kthread_stop(priv->event_thread[i].thread); + kthread_destroy_worker(&priv->event_thread[i].worker); priv->event_thread[i].thread = NULL; } }