From patchwork Tue Mar 7 13:01:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 659987 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFDB5C678D4 for ; Tue, 7 Mar 2023 13:01:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbjCGNBs (ORCPT ); Tue, 7 Mar 2023 08:01:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjCGNBp (ORCPT ); Tue, 7 Mar 2023 08:01:45 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78E0F6EBD for ; Tue, 7 Mar 2023 05:01:43 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id s22so16929001lfi.9 for ; Tue, 07 Mar 2023 05:01:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194102; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=kAKt9oLN/3E5C6T5cNeSMYOM4tUix3c4gih76FZI0vA=; b=IahDkcbRQh6PRKBga5k1xpkX1K12Pac+lBTOjur4Ti0gLOjDDwv1ebWjja2Amzvrhm AVSfZeAxWC3H+QVzUX4wJh3PQPOP+uPGPtASewchwgX8v1WgPcJSxGgVQgBCroTPB/mg HsMcEAxc695nc9l0DXFd6VCs9bT1zMaTsLnPVxLrfyQiZz305RiOFq5NmWZFETCwTxTc 9oRwQCpKs9+s2PIOpFs5WN8r4hx5aUJWzDWusUYGb0WLaHKFd0dV7mYbeEp0kMuhqCe6 Y2KZ83aFKHOAIT87E8HKO9M7AnhXKP18iZf56tRgRKqvRaMDaK5wzV+2K9LsK8WYusBs wuiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194102; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kAKt9oLN/3E5C6T5cNeSMYOM4tUix3c4gih76FZI0vA=; b=neV8/x9V230QXkaeLMHsix5v0AGt5v8SVGa6WGv+e0knIivO/rS0uWD4eJQmMjjBpy tN0xl3X2w9knULxU+aoZiJpady0rMaq2woov4vseumOHgGZ5Zv4G2QOW7YanqR7Wl88d dKY2x7L38q3mTo+cfdxg9TTGT24MbZGRiPvA8WD13SSLj/p/zwTyxCKDSSPtpe+UqdaN bvexSG7o3ruDGKK3npgy8qRfMSfG/O6d8xg1TwHMh1w9eJzvCniAYIvYH9D4kEdwY2cE 145N6jP4tF6XNaXHOTG/k2BNfWCMAUzHcaavL/W1V/BPUWdao7kt+ASZZOU4Iq89Gxnj vbaQ== X-Gm-Message-State: AO0yUKVphdsu5eZrrAaNQASRVhzBv1gxeszX9v0coW1iLxbBiPiJgdad jVsSBbQnHlFE/rCI+z2IiEyDww== X-Google-Smtp-Source: AK7set8z/qcx87HDZWoD6FwIXZM8Cu3r1uLjF3xt83ugybLjz1wVUQBna8yb7yA/JzAybC+nxf9qHQ== X-Received: by 2002:ac2:446b:0:b0:4d5:831a:1af8 with SMTP id y11-20020ac2446b000000b004d5831a1af8mr4246862lfl.40.1678194101601; Tue, 07 Mar 2023 05:01:41 -0800 (PST) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id u2-20020ac248a2000000b004cc5e97d356sm2048265lfg.148.2023.03.07.05.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:41 -0800 (PST) From: Konrad Dybcio Subject: [PATCH v3 00/10] Fix DSI host idx detection on HW revision clash Date: Tue, 07 Mar 2023 14:01:38 +0100 Message-Id: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIALI1B2QC/x2N0QqDMAxFf0XybKBYxsRfkSE1TWdAq2tUBuK/L +zxnMvhXqBchBW66oLCp6is2cDXFdAU8ptRojE0rvHOuyfu6yaEUWX40IIPis6TTalNYM0YlHE sIdNkVT7m2eRWOMn3f9K/7vsHASMEV3QAAAA= To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Krishna Manikandan , Bryan O'Donoghue , Andy Gross , Bjorn Andersson Cc: Rob Herring , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=2768; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=w8f97gizhKeQlAufN/gAw/Y5LqIn6pMqeGASKnoEWho=; b=eOnovxHa4VCfpFjQWjo/7ouKcm1gRhvXoxkVoIem0sV72MWp0RQkRWdMHfoK464VMtQQ+jCEmvl8 xv1AhdMGB6qQcL0Lqc6wVBgRMxS0VmSQ/b3zjT9XMv3HuJRhyP+u X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org v2 -> v3: - Merge with [1], I should have done that earlier.. - Squash 6115 compatible patches into one - Pick up tags (except Rob's ack in 6115 compatible addition, as it was changed) - Use b4 (sorry if you got an incomplete set of messages before..) [1] https://lore.kernel.org/linux-arm-msm/145066db-5723-6baa-237d-7c2b8fd476d9@linaro.org/ v2: https://lore.kernel.org/linux-arm-msm/20230213121012.1768296-1-konrad.dybcio@linaro.org/ v1 -> v2: - squash the 2d-array-ification and fixing up the logic into one patch - drop num_variants, loop over VARIANTS_MAX*DSI_MAX unconditionally - drop inadequate Fixes: tags - pick up rbs v1: https://lore.kernel.org/linux-arm-msm/20230211115110.1462920-1-konrad.dybcio@linaro.org/ Some DSI host versions are implemented on multiple SoCs which use vastly different register maps. This messes with our current assumptions of being able to map {dsi0, dsi1} to {reg0, reg1}. Solve that by adding a way of specifying multiple sets of base registers and try comparing them against the register specified in DT until we find a match. This removes the need for the QCM2290-specific compatible which was used in the SM6115 DT (which uses DSIv2.4.1, just like SC7180). The series also takes care of that. Tested on SM6115P Lenovo Tab P11 and SM8350 PDX215 Signed-off-by: Konrad Dybcio --- Konrad Dybcio (10): dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible drm/msm/dsi: Get rid of msm_dsi_config::num_dsi drm/msm/dsi: Fix DSI index detection when version clash occurs drm/msm/dsi: dsi_cfg: Deduplicate identical structs drm/msm/dsi: dsi_cfg: Merge SC7180 config into SDM845 drm/msm/dsi: Switch the QCM2290-specific compatible to index autodetection drm/msm/dsi: Remove custom DSI config handling dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible dt-bindings: display/msm: dsi-controller-main: Add SM6115 arm64: dts: qcom: sm6115: Use the correct DSI compatible .../bindings/display/msm/dsi-controller-main.yaml | 6 +- .../bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +- arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- drivers/gpu/drm/msm/dsi/dsi.c | 6 +- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 161 ++++++++------------- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 6 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 14 +- 7 files changed, 82 insertions(+), 121 deletions(-) --- base-commit: dc837c1a5137a8cf2e9432c1891392b6a66f4d8d change-id: 20230307-topic-dsi_qcm-5cd03c230f8f Best regards,