Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp758481pxb; Fri, 28 Jan 2022 09:19:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsoZo848jz2Qgo8B2wMPeM1SczvxKvt1DQJie03Gvp+uPE2IGrJEALHALewG+D9mIXk/HB X-Received: by 2002:a63:501e:: with SMTP id e30mr7407936pgb.198.1643390390030; Fri, 28 Jan 2022 09:19:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643390390; cv=none; d=google.com; s=arc-20160816; b=y2uYk4VufTt+FFpkJFyUH/UJQvIIogmpusb9eKo2rFQJeC1h4osY+dHkiHLWQ8plnK aR2dsEDv+euybI1qcrM93ENSHFz43lyNeX9a8zFbxP0SqYZ6GNHIyWcbKl5lZYW3TWIp WfxL4jNy8IkA0WIBWOGufCGQX8UMD58LPt+91cdCNBgIkQ0eubZ1nuW7LLfbeHOW9Sz0 8XbaXryGF/dNuk8wb9RF3z9c1INA64i+/Ue2CELDa6lPDZTM5HIZNoYS0UJ+s/5LaHss KMZqBQe6m2xxXdKBRV7++/FQRBuRxNyGBnQG4y96GoafCI/epGxOvOx3QOfcdUeQOfUv li/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=411z1vQK/uyJWyTA0mh5NoWT3UN44dWhOArvuxGcycY=; b=IsL8VZzCih4zbrkuB0lBxK+t34BSc4Hvlw09yFZ9H33PL5UrbWxtuct0MBA3N7g/6+ lBS7vqxGO3qMfouF5wchiypU+9X5RKRoAb8+rwDnwqxKynR8mkVWSAIEGrV34fmY5nKY C7yCEOACsoSRfqKdxPLyPp0e6gwteOkUr8teQlemL+NxRRSY2t3ixp0fgql2mAY6RMb8 /gpm0ldMAlWj8MK3RLdS7NWFZK1OJYlBy0ez7m6bHe0N89IxBo71A4HR6oyFvEqefI5f 4XUrE7rscwZFFX7coeFiv+M7IktZ0M2cbEhMW42M4tprf5OB7o/khv9axTcUBWbH7vFu H1hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oqRkdvd0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si6619422plg.592.2022.01.28.09.19.38; Fri, 28 Jan 2022 09:19:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oqRkdvd0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235759AbiA0UE7 (ORCPT + 99 others); Thu, 27 Jan 2022 15:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235878AbiA0UE4 (ORCPT ); Thu, 27 Jan 2022 15:04:56 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B100BC06173B for ; Thu, 27 Jan 2022 12:04:56 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id z1so2324142qto.3 for ; Thu, 27 Jan 2022 12:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=411z1vQK/uyJWyTA0mh5NoWT3UN44dWhOArvuxGcycY=; b=oqRkdvd05f1e+XOO+JL4So5nZNRq09NGBnqQML56y2IHYB2M7bFhId/11Tca1Aj5S4 ED4cp4aEOW88tsIH707iF2iLcRhJeLhqc7G8uPFq36JBhPk2QtQE7vet9vRYJP9Nw38j zHY0sGW1Wuk9tkBp1drE/8KJRmGr2HtC5EH/XYpvvFJD265ufrr4ID11f0Kf5l7jbiU8 YKFAjQ8McWwDhnsO1sMqI/2TbNwJrryEDi4imukFHLSLdr7G6cz76YxV5XdZyBW0RDkW wiQRqKcD0QWK71lJkas0XCt2Pk3oc1TKjQ5OY/+nL3QJtb+CxYKJygokfdonUOL/rliM N32Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=411z1vQK/uyJWyTA0mh5NoWT3UN44dWhOArvuxGcycY=; b=3gJMLkOExDWqGLtbiwcl8zOq7/F3gGvOC+D6+Et5k9JAZFyFDMPpJywcf9VBFtmdPP etsIiYOLPUJfskOi/XTd1lmS/PjkvrN9l9SxP9BY+f2Y78AmxzPYOE2vhihPX5i3BWYY 5KrzdXjYnhb39w+K6q4rjbAiJbmm+ndIuE6y14e90LCEKQxJohPcAm8PuDGFkQld4MNK nppe8duGpSd1WtBGdBqrX0IMmRoOPZnxgNWdT88jS03M5ZiasArNluOOroYFcBYLViWC bCaulbpLoxT2a/innP/Lzh1bCuVYgkFkutWnG2VEdUYkge0s9nAsM12A6n6EiQ1H1LUd d9wg== X-Gm-Message-State: AOAM5332gf/ZdLuHfkY+dT56u6DlbBktdiNPPpoyP/yCd9AdR6KCQOyi AD+rQ9Q5S+hIdO3b98hY8+MGTIRABcrLIjpHAQLk7g== X-Received: by 2002:ac8:7fca:: with SMTP id b10mr4156416qtk.62.1643313895857; Thu, 27 Jan 2022 12:04:55 -0800 (PST) MIME-Version: 1.0 References: <20220127170405.155710-1-daniel.thompson@linaro.org> In-Reply-To: <20220127170405.155710-1-daniel.thompson@linaro.org> From: Dmitry Baryshkov Date: Thu, 27 Jan 2022 23:04:44 +0300 Message-ID: Subject: Re: [PATCH] drm/msm: Remove spurious IRQF_ONESHOT flags from dsi & hdmi To: Daniel Thompson Cc: Rob Clark , Sean Paul , Abhinav Kumar , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jan 2022 at 20:04, Daniel Thompson wrote: > > Quoting the header comments, IRQF_ONESHOT is "Used by threaded interrupts > which need to keep the irq line disabled until the threaded handler has > been run.". When applied to an interrupt that doesn't request a threaded > irq then IRQF_ONESHOT has a lesser known (undocumented?) side effect, > which it to disable the forced threading of irqs (and for "normal" kernels > it is a nop). In this case I can find no evidence that suppressing forced > threading is intentional. Had it been intentional then a driver must adopt > the raw_spinlock API in order to avoid deadlocks on PREEMPT_RT kernels > (and avoid calling any kernel API that uses regular spinlocks). > > Fix this by removing the spurious additional flag. > > This change is required for my Snapdragon 7cx Gen2 tablet to boot-to-GUI > with PREEMPT_RT enabled. > > Signed-off-by: Daniel Thompson Could you please split it into two parts: separate DSI and HDMI patches > --- > > Notes: > Just in case anybody asks, yes! I did use coccinelle to do a quick scan > for similar issues. I didn't find any other instances in drivers/drm/ . > > drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- > drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 6b3ced4aaaf5d..3a3f53f0c8ae1 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -1877,7 +1877,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi) > > /* do not autoenable, will be enabled later */ > ret = devm_request_irq(&pdev->dev, msm_host->irq, dsi_host_irq, > - IRQF_TRIGGER_HIGH | IRQF_ONESHOT | IRQF_NO_AUTOEN, > + IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN, > "dsi_isr", msm_host); > if (ret < 0) { > dev_err(&pdev->dev, "failed to request IRQ%u: %d\n", > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c > index 3acdeae25caf0..a1bfbc4c74bf7 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c > @@ -301,7 +301,7 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, > } > > ret = devm_request_irq(&pdev->dev, hdmi->irq, > - msm_hdmi_irq, IRQF_TRIGGER_HIGH | IRQF_ONESHOT, > + msm_hdmi_irq, IRQF_TRIGGER_HIGH, > "hdmi_isr", hdmi); > if (ret < 0) { > DRM_DEV_ERROR(dev->dev, "failed to request IRQ%u: %d\n", > > base-commit: e783362eb54cd99b2cac8b3a9aeac942e6f6ac07 > -- > 2.34.1 > -- With best wishes Dmitry