Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp829307pxb; Tue, 12 Apr 2022 14:38:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7IoL8hZBVcDWDSHNW1/0/xc6S4nMqcHnGHf6NcJ6JjfW9+Z7vUpLv+7OtnndY6GyAcA3b X-Received: by 2002:a63:4564:0:b0:39d:93f7:7959 with SMTP id u36-20020a634564000000b0039d93f77959mr4511583pgk.492.1649799495499; Tue, 12 Apr 2022 14:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649799495; cv=none; d=google.com; s=arc-20160816; b=HOvdteWKpHjyomSHA9lGn1f3WVjXvvC+zRdnE+yFvBItSuUhTpoFsCGbdu6+hSqAcS Mel7ZLJ34jOOx5jYeQd1C8/FDdT3m/7Ld08W6QQ2Wbi6VYntcsODMUMZ0YmDhQUFLuiG djQT3w9kxo4XzHEuuc2NByVT5/8ONMkHILAmg7tzIRBLkl7XBpdeq2p9MNIEf3otlwXL gqwvG0EAwOqqhtRjcb81sqJve2CU9Cg6U7OCnCsro1JNpYuylSdX4XarmbHDtlVF/3X2 IViCpPvBvH9yvnG8OCK6HI5UdNLV5/stEwKXsMagOVjVLGS7/pOlLPNOak1e1ItAwk6c 7Pzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:user-agent:from:references:in-reply-to:mime-version :dkim-signature; bh=tjT6fKt+FqeEOcNg0osLvB2083tulirjm/yjb0EMPNw=; b=iYIMIBBf9UtAMIhFSrzbtLizakCwwSmJHw1Cc8uKxUZo1Yy5c2fpJZMJ0Dr0zc60XU GdVQZtynrasbsjqrV2nfus2Olgz8hfCiv/oGKc5MJTkMHRVaFYgBntx/gjAVfmEsPE5l L/BT8K/MZkYNRH3dIH7QYXyWXhk8Fxk+2uhRBAD11Ko0J+5yIZJ0jeAMW5+Aov0ZA4B/ s0LxIV5g0GTsSBlpH/+N+NO1k4L8C59Z41Qdced0IkHUkR5pi0WJKe9kEakVGQD92dme ttV+S9QICe+sEYYGHANwq9YWe/mgbRGlf87bZRIja4pMnT3xhJLLspUVZ/tNYP6OxN7Z Ov6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=if+yP4Pk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w64-20020a638243000000b003820b4fb922si2724896pgd.56.2022.04.12.14.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=if+yP4Pk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F67B12558A; Tue, 12 Apr 2022 13:43:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243976AbiDLEYX (ORCPT + 99 others); Tue, 12 Apr 2022 00:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345627AbiDLEYT (ORCPT ); Tue, 12 Apr 2022 00:24:19 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310F42F39D for ; Mon, 11 Apr 2022 21:22:02 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id j83so17875609oih.6 for ; Mon, 11 Apr 2022 21:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc:content-transfer-encoding; bh=tjT6fKt+FqeEOcNg0osLvB2083tulirjm/yjb0EMPNw=; b=if+yP4Pk/q28d73RXmoK3hDDqXFu1H3qtu1L+w4XrCR45OD2hD75330dqbWLYDyMTy zuohjk0ezFvJVPyEO49t8DYP7+w021vx7wAl1bCj8P803lDE+8h5KCq+gAu4rSy2E+mp vdozwB+OGr/AC5hX7IBcHGLWZjwaGa8A8KSEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc:content-transfer-encoding; bh=tjT6fKt+FqeEOcNg0osLvB2083tulirjm/yjb0EMPNw=; b=DV8QSo8pebaDPx81azpucg/nAcO3pDZA51pyN3RzfHffkRTKRDSAmb1mLrL1WV6IEb AUCsr0b4HeKHH8rSrK6nB/XtVqnAVlQbs/8WtFoGoE9OTyNuVKlbyySkhgePE9nyn9i3 /U+W6+H78tRkQVhSd12bVS5bkfgp9lsHkFHzckeUWWU3vu55afPtxPdIF3unA0Q4rzTZ yG/K880BhKIosuhWcZ7cj28s6/qMoxWLWE55UOueHlQp3BX0hqBdKQ/Jo2Fspq3WtrXO 3ERMJTd0v3lm1h9ribKkAGTIT2uMOdvtgXno0CWVSu3dBxD/vibm/sPZ8YKsQ2z6ATRL 8DUQ== X-Gm-Message-State: AOAM531LrbJvtQYsmjxknRo5rVFq/lH81cxB+OvRe0yNZx/HE0bMBGOd PVjvTtk3z/71hxb8unVUX14lCJXNNjIGApoPvyLf0Q== X-Received: by 2002:aca:bd41:0:b0:2ec:ff42:814f with SMTP id n62-20020acabd41000000b002ecff42814fmr975536oif.63.1649737321426; Mon, 11 Apr 2022 21:22:01 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 12 Apr 2022 00:22:00 -0400 MIME-Version: 1.0 In-Reply-To: References: <1649722129-12542-1-git-send-email-quic_khsieh@quicinc.com> <7529d921-0b12-d162-416d-3542933a0aed@linaro.org> From: Stephen Boyd User-Agent: alot/0.10 Date: Tue, 12 Apr 2022 00:22:00 -0400 Message-ID: Subject: Re: [PATCH] drm/msm/dp: stop event kernel thread when DP unbind To: Abhinav Kumar , Dmitry Baryshkov , Kuogee Hsieh , agross@kernel.org, airlied@linux.ie, bjorn.andersson@linaro.org, daniel@ffwll.ch, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org Cc: quic_aravindh@quicinc.com, quic_sbillaka@quicinc.com, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Abhinav Kumar (2022-04-11 17:29:17) > > > On 4/11/2022 5:22 PM, Dmitry Baryshkov wrote: > > On 12/04/2022 03:21, Stephen Boyd wrote: > >> Quoting Kuogee Hsieh (2022-04-11 17:08:49) > >>> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 kthread_run(hpd_event_thread, d= p_priv, "dp_hpd_handler"); > >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dp_priv->ev_tsk =3D kthread_run= (hpd_event_thread, dp_priv, > >>> "dp_hpd_handler"); > >>> + > >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (IS_ERR(dp_priv->ev_tsk)) > >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 DRM_ERROR("failed to create DP event thread\n"); > >> > >> Why can't we error out? Why can't this kthread be started in probe? > > > > Just my 2c. I don't think starting it in probe is a good idea. The > > driver uses components, so, in my opinion, the thread should be started > > from bind and stopped in unbind. > > Yes, I also agree it should be started in bind and stopped in unbind. > Sounds good to me! I forgot that this is a component.