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: 5943 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp597055wrs; Wed, 19 Oct 2022 17:08:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4AWv9S69CaTgCh8pTTbGolqSpgkg/60lqFegkau2jCW5O46t8UHOq+S0DkqDzx+21LU0Jw X-Received: by 2002:a17:907:1c0a:b0:791:a477:10e9 with SMTP id nc10-20020a1709071c0a00b00791a47710e9mr6631998ejc.513.1666224499864; Wed, 19 Oct 2022 17:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666224499; cv=none; d=google.com; s=arc-20160816; b=nFxPE/fnszjqchyrp3eFWEbJdz9hFsDqeV8BqLXONAOlIWdMKx0+wyVWIvAv6wd57+ zZvaCtS3TmvY0xgYjoBn9ByQW/RRXAqjUNWSWrLR9WcufZONDFXDGNichUzOwgN/NGeo O5E+GdKj1vQRyCQZibkPmZPIhDZKlvZnvspeHY+0vrkmJqX70XMBRk+NywHuw0AQxOkH bpTPbimcpP4YU7BCJ1t2d0zNExz9JonZZsjLw7ki+1g81vskcDM1LKqDcERXDzjjeGIO kNlnZ1/izk7wX+vUO8MCXQrkySvXZpuHoJVX63W1ZsxksnRXj/nbYeCYpFeil6eCNqAK Zxew== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JFEAuRVxYze/rS1o+HmtzgS2VnFodVUCCckeeNQBPJo=; b=ZZ6hujvDy2OIV8sLEi76SH+fZ1c90v7VoVSfSWwHlAkZrA3hhfjhkvmHrZxRyo2+1V oA056VUX12BnKQLZ2RuwPTZ+ufXv78IYrKqtNCBeLOu4WjFCt4NPSxLGJ7gn4BvN3Cz7 4YFyM8BBQXMXY6gMtioU5vh5RLg1BwvteYZNnTtSiS7hjUYTzEw9u/CCL8e0CRosZcIB Fp9aGStN2WbjW2gWPJelI7yn0WyrCPpksKlYS718cglLX41Sh1bEv3DU8cKxkggzww2C vZ8HOK0+kKIbENwwAI9cB3VxuteBOLjhvvhmqviXeqC8vOygKQ/rUN+rYMOVrB3vqgkQ PKTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Qaz4H1Kw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs13-20020a170906dc8d00b0077b4248b138si15246131ejc.127.2022.10.19.17.07.51; Wed, 19 Oct 2022 17:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Qaz4H1Kw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230054AbiJTAEh (ORCPT + 99 others); Wed, 19 Oct 2022 20:04:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbiJTAEe (ORCPT ); Wed, 19 Oct 2022 20:04:34 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ECCE5F80 for ; Wed, 19 Oct 2022 17:04:24 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id s196so16413164pgs.3 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=ybrhsAumCfuUVLnxowCDgol9NFm8Fcfyl9n3Ad7hNTZ3App8AqXriFm4VKLlZQspac Ibb8DhheXY82xrPxoe5E0v4kN/AtMwNzyZSUBXOHxV6kO/VVjTFexdEwkGZICRLlDshz jwkIH9nbgI2CzKsX5bzYrXLkFgCF+8TvWtYydXtHSLa3o5UfFsss5yFCk5IKaSTz3slJ XVTtFFHSGKXr8GrCl+mo+SAV88Ta0E3L8wMaH9avj8drqf0qYKBx/WHYLQcPy/xBBf9J VLuJ8zzH9xzCifDhxSLq1GMF7gZVO/c0OjOTVCXERLslTg8hilXlSYZucUDL4rWFtCxX RKZQ== X-Gm-Message-State: ACrzQf2ePlmp7Yr58xrYMEixYPogwqyMulWbQUoLb83/Iv1eLq6DtSGe Ntmyc8yAkHo/NTdQtNIAlH+wYcgvTLL4KQ== 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-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747163021360187389?= X-GMAIL-MSGID: =?utf-8?q?1747163021360187389?= 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, }, };