From patchwork Thu Oct 20 00:03:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 13012516 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 678EBC4332F for ; Thu, 20 Oct 2022 00:05:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cgKcqLgX8ummARDtPLQpzPnwQAHJk+90YAv8GsuCxb4=; b=fYG5lBr9PdRW4j 467utWAAZX0M/xZqLnHPXBNa6w+zywpRbBZlXqy3vPrWwYVVL71qN8ZuEKQqx37oPjHgdGX03Qv5N MuX8z2IEoCi/4x6ISK0IPOXYPC0fvWHEE9ugJegGAKP5DVJdU359wf/fQn3jaQYMVeAl0AL2l6yPg 9mOGRn6jxbUJYkkO0ExMlACInHuuhvJ78OT0vYF6AY3+GLu6GfdkXuC6gtWxZn1R679lCbt/It+hd VQRKxIfrvV+XIRoefb0t/GU+mRHpN8BFqdrlxgQm9f9UoDAMGmnqF147ykbv5saM3otvBIil+UyPX Ol+b8+P+sFZ6Baeq+Wrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olJ3J-006zb7-1N; Thu, 20 Oct 2022 00:04:49 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olJ2v-006xSD-CZ for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2022 00:04:26 +0000 Received: by mail-pf1-x436.google.com with SMTP id 67so18705322pfz.12 for ; Wed, 19 Oct 2022 17:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JFEAuRVxYze/rS1o+HmtzgS2VnFodVUCCckeeNQBPJo=; b=Qaz4H1KwKV2rEH1XylJDVh+Jyd+kjjCT40sHv0yltr24IPXS3A7bCxHahuIbL/aKxK HQymcu6lvjyUm4M3opQtknDcwkb3CpXipIAuZsVPTT02+205ImH7Ygnwl0k1o1zk3Lfe PIFtNfZeI46Af+097eiyWVE6XVf79YgCLePDI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JFEAuRVxYze/rS1o+HmtzgS2VnFodVUCCckeeNQBPJo=; b=ZQ9gdWEP5xDPNyeaP2kRIBGwEEYylAp+8Qbj6/KfxuDmWCGR7MfcRX5P+faY+N+pdb jcryU47OC33Kdg9MrHK0Izt5c4VynLyKl0y+f+GpTbW84GMdN7cVqnF4mNxyBHncIIPu /y7QQJmNJ616aS0etFJdEKNL2xtLrBC0iBPI4uQigobNYrdgIOAGqYYCE0up8VOUKnxZ n5WiSQAfIsKshpK/64faA6THEdxFySxjLpKOr0cdHvi+A/T/WeUiybQMCKI+h9F52boR CgAyA2ZtTI2RbtuFi36ywLK+UUAA1kL2UJG8pS42HQrffswJBcR86Ls881S38sGE0bMD JonA== X-Gm-Message-State: ACrzQf0KYNXRk76gnHd2mdvvHOEZgbAuJlaypfxyS3FnIynOg2UUdsQe v87tC7nE5O3I4sTArc2XmbHRCg== X-Google-Smtp-Source: AMsMyM4/WuzkNI/KO9rd2JcSdJmmamHNIYsZ7bctseAbBQ/6EBWhOKRYCFsmPMPJl382wA/rvveujQ== X-Received: by 2002:a63:4426:0:b0:464:4e1d:80e3 with SMTP id r38-20020a634426000000b004644e1d80e3mr9460506pga.106.1666224263585; Wed, 19 Oct 2022 17:04:23 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:57b7:1f0e:44d1:f252]) by smtp.gmail.com with UTF8SMTPSA id b11-20020a17090a6acb00b00200a85fa777sm541885pjm.1.2022.10.19.17.04.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 17:04:23 -0700 (PDT) From: Brian Norris To: =?utf-8?q?Heiko_St=C3=BCbner?= Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Sandy Huang , linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Heiko Stuebner , Helen Koike , Brian Norris , stable@vger.kernel.org Subject: [PATCH 2/2] drm/rockchip: dsi: Force synchronous probe Date: Wed, 19 Oct 2022 17:03:49 -0700 Message-Id: <20221019170255.2.I6b985b0ca372b7e35c6d9ea970b24bcb262d4fc1@changeid> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog In-Reply-To: <20221019170255.1.Ia68dfb27b835d31d22bfe23812baf366ee1c6eac@changeid> References: <20221019170255.1.Ia68dfb27b835d31d22bfe23812baf366ee1c6eac@changeid> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_170425_455303_C8346666 X-CRM114-Status: GOOD ( 12.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We can't safely probe a dual-DSI display asynchronously (driver_async_probe='*' or driver_async_probe='dw-mipi-dsi-rockchip' cmdline), because dw_mipi_dsi_rockchip_find_second() pokes one DSI device's drvdata from the other device without any locking. Request synchronous probe, at least until this driver learns some appropriate locking for dual-DSI initialization. Cc: Signed-off-by: Brian Norris --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index d222c6811207..528ddce144e5 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -1689,5 +1689,11 @@ struct platform_driver dw_mipi_dsi_rockchip_driver = { .of_match_table = dw_mipi_dsi_rockchip_dt_ids, .pm = &dw_mipi_dsi_rockchip_pm_ops, .name = "dw-mipi-dsi-rockchip", + /* + * For dual-DSI display, one DSI pokes at the other DSI's + * drvdata in dw_mipi_dsi_rockchip_find_second(). This is not + * safe for asynchronous probe. + */ + .probe_type = PROBE_FORCE_SYNCHRONOUS, }, };