Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp463438pxb; Fri, 28 Jan 2022 03:10:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLrVJNlZFa4AM5QzrJOzG2KtDepjvL+2oJYD95UnOfNXGwO1CjjL2lL8BJU+6MGyk+1Bpg X-Received: by 2002:a05:6402:1e92:: with SMTP id f18mr7742219edf.347.1643368222138; Fri, 28 Jan 2022 03:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643368222; cv=none; d=google.com; s=arc-20160816; b=x7SwhxI9WMxzuupSK7cIJu14C1uY2oRrzmnY5iMTBZOjrB5SOu7rjypIHaXNphsTmp dFLkeUwrxoPqL7o2ZGMSWsUBJp4UnBaQELrcX/BXoTk936GSzY6TXExTFdKc+Z71gQyA L4x5vTAzOhTpfFZk/eYBa6B37lfj8iHeXZtyBOZgNXQOpGxadblrhapLTeKn9i+GkPU8 Ti+6eLXirk1r7XW6sZbxdSw9M2hj74wa2Spqu/Ed/iv+PeNVTcNKOuLJlbSC9/qKwrTi ehuOi1PP7YKWWzHN95wLB2VUERFIxdOlMJkAt78dzvpW+yRbB2lkpQhFOaxSwDzeWYmm Lt/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Xq5JSeGAWZi1OsdDMQABwbOnDerwbPa8wE4vgOTW8/Y=; b=emECBIGBy8cP6eWZroc/5kN4rL8Qaa4MF26rdu5F+mwyqmfXMP9Q3lJNvlJBOlK5Vo JzUGnudShiu+Cxbn9q9CCi3yXAmYi3jlNcyVIMpvR5Zf3cx9qii62asJmSdIoskoMMie h9mCFZyY7imgsxvp50UWELgq2YYWoszYuNkkov30DhyieV98m5L3hdZHr2wuxVjAYx/B yn6oX7D2tSRB4Ae+UAkcZtvjPvbvTldqAL9919M3blcVF/Y/gbwJ9u6dqaadKL5WqwjK cfE14Ly6R4neyjMHlR2DfkK66tq6ntDjlkq0up1PfrwV04qC3RXJwvOFmTuETAYpHzoX Hl/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zcjytRgZ; 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 e13si3317621edz.571.2022.01.28.03.09.54; Fri, 28 Jan 2022 03:10:22 -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=zcjytRgZ; 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 S238708AbiA0REW (ORCPT + 99 others); Thu, 27 Jan 2022 12:04:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244258AbiA0REV (ORCPT ); Thu, 27 Jan 2022 12:04:21 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 696FDC06173B for ; Thu, 27 Jan 2022 09:04:21 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id i187-20020a1c3bc4000000b0034d2ed1be2aso6391821wma.1 for ; Thu, 27 Jan 2022 09:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xq5JSeGAWZi1OsdDMQABwbOnDerwbPa8wE4vgOTW8/Y=; b=zcjytRgZhKk0UVB7sTJ2tWYadwRdtz8tU5dbL4itdSgdGa+Vfi1ivXb0DOX0wFJnF+ jCTR+jwLKPiSOZAKRpM2zaK0baqKzuM5lWOZLUdDtKR3vP11Hlv8hQflCJkcyq/suMp/ AxQ45gYnkkKnBGDvIN/sZ+HoA8TZhod5ouV9IHOJBGuU2m5JJMgoATDywhudRYjGpBJ9 zdnW/Z8ZeWGS8QML+ZprPfhrzpxL8QTqPzqoszoFH1RaF/15uSsx0BRE/LhZ6UtlmPD9 rz9A0ZscZRDDQsqNh1Ni9CxtrlmHzWAgfpbaBPX4WaTRRbLvOQ7TVyvEifxwMsr4j/oA Ey4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xq5JSeGAWZi1OsdDMQABwbOnDerwbPa8wE4vgOTW8/Y=; b=rV1WR3cSrxQY/mhZHwoen0V3rEc+mWTusl7aWseWs/hAVAvtdqqoZzC95rBKXc6xk7 +j+JI1AHEA/q1Cw++PuuhzaBKpdVQ7n7dPhLycdhYR8pb4AprXx4DF8huPTM9XngF27Z hfhjiFRFsOgNUrWy+605wc/sylLTnP38T51i3OkQ2d65h/3YipBIWQ0APAcqlApgtT7P VCUIs+C0BxrTA0tOuQKyy+hrcWXW/3thqIj5VLqHU1Sg/VrnLHGwl3kpXcCuKY1bb6NC FKx+aid6JHBwjsnfT96tiqZOYp/Kno4EeJMLjh8EXAEVWtfGr1TdMtvvE68kAsK6BJ/m Lx2w== X-Gm-Message-State: AOAM531KrH40FklzDrIj7YSLu44e6ekphYwINjSO0nlAGzpPhKEyZ2hC +MgxTMcFgke5Ys39spC02vbztw== X-Received: by 2002:a05:600c:3ac5:: with SMTP id d5mr3902521wms.107.1643303059880; Thu, 27 Jan 2022 09:04:19 -0800 (PST) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id t18sm2677495wri.34.2022.01.27.09.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 09:04:19 -0800 (PST) From: Daniel Thompson To: Rob Clark , Sean Paul , Abhinav Kumar Cc: Daniel Thompson , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/msm: Remove spurious IRQF_ONESHOT flags from dsi & hdmi Date: Thu, 27 Jan 2022 17:04:05 +0000 Message-Id: <20220127170405.155710-1-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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