From patchwork Tue Mar 7 13:01:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163422 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 CB331C678D5 for ; Tue, 7 Mar 2023 13:01:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AF0D10E359; Tue, 7 Mar 2023 13:01:48 +0000 (UTC) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2B45510E129 for ; Tue, 7 Mar 2023 13:01:45 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id f18so16972413lfa.3 for ; Tue, 07 Mar 2023 05:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194103; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZBjV0MIGjzxWCA4dde9ccbuSp/4SeZ0AfFye0IJguH0=; b=S8K842lXW/grOayUPiw1/stytcPwZSZw0ib3Rwy0G8TyU3BoqzW3i8GNnezA75iJe0 F7HbbM9q2lxbK5+c3ta6HNsfVLqMBtL+CzPhG4mIP/5W7xIU+socPmju4EYLTcIUOU79 +zj5AxGzs7WfjpWK/llomuMJ7Vp3dns4XOpOPPDLIZvJPcHMrWMDIkpBBQ0DVaik4aeC Myyy6/XxwQ8T9XVXJbWlX0/rC6juLAo+ZwwGNEAbopbofiS91kTYa9nKLJpyw/MP7lHw P0jWblIUN56/EU3Een7Ib8YU0ugO5btmCZdq2y6MOVR/gimEISu0JfHR37i7PelEw5ig eetg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194103; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZBjV0MIGjzxWCA4dde9ccbuSp/4SeZ0AfFye0IJguH0=; b=VQinL07PDxuwYrhr07SL2zmvokjalGfZzjPSR/pocd/vU2k3eat6ALoMbMAH+WVyEL lrgaTrvBJb8IVu/egThj1OTUlGQSXbGwYMjGJgPY6/zzYblHv376Mg6jw7DlbMaX7pwp f3DOS6UvfNKhBXgRTjB+myzYiBZmf7N0d2ITf18nDse2WUNsRkNUrsi7l1fxRlPxqtJA GwuFibTDfGqOd8LVa9XUVprFko5jAb9gEtMjOm0WdK+NLU6KFX5RKrM026qFHvrUkDN3 7GnHD383+bbqIFgEmnoM7ekUtiRqVNGw5BcHMRRBATs4WEUKHS/GGgrz0qQPon1I5+pT UzZg== X-Gm-Message-State: AO0yUKVIXP6O0qe6q6OMlvg+3Xbw7iAxYm7KXKtsa5EPP17TSmDSpkvo JuyNdZPLRydhRiJxgg24vP+9fQ== X-Google-Smtp-Source: AK7set/BUtMgR4MG5rcNS3SZZlwGfqldYfAdp5uYc++c6d8LEm3HWAca8HOGIbFj8Oi5XqD7hswj6A== X-Received: by 2002:ac2:43aa:0:b0:4b5:6042:d136 with SMTP id t10-20020ac243aa000000b004b56042d136mr4125457lfl.22.1678194103253; Tue, 07 Mar 2023 05:01:43 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:42 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:39 +0100 Subject: [PATCH v3 01/10] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-1-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=1022; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=yadLtYUd+NaBlrHtthnWah/BoxxYiya5SpI6g5dSH5k=; b=VXFbvloo8L6tf6wwoMkScWR9GbZ6ztU3t6q9TPy+AM8ughrYGsc0FKWNJHCSqgBFQH3zp2bjnBiP 1u/l49IqAkFsvhNRiqUfofrrCrYY3xmsfHQCG0TIA5f8YQPX277W X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The qcom, prefix was missed previously. Fix it. Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC") Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml index e75a3efe4dac..2494817c1bd6 100644 --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml @@ -33,7 +33,7 @@ properties: - const: qcom,mdss-dsi-ctrl - items: - enum: - - dsi-ctrl-6g-qcm2290 + - qcom,dsi-ctrl-6g-qcm2290 - const: qcom,mdss-dsi-ctrl deprecated: true From patchwork Tue Mar 7 13:01:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163423 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 B730BC6FD1B for ; Tue, 7 Mar 2023 13:01:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E425010E493; Tue, 7 Mar 2023 13:01:49 +0000 (UTC) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by gabe.freedesktop.org (Postfix) with ESMTPS id D408D10E139 for ; Tue, 7 Mar 2023 13:01:46 +0000 (UTC) Received: by mail-lf1-x12f.google.com with SMTP id s20so16923230lfb.11 for ; Tue, 07 Mar 2023 05:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194105; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wx65b6tHAAIHsJSsttrbtRIwIAX7Thn6gXbFwUEFkEQ=; b=vTU/OzncrcdvHDBc0YWnwoMNXNf+pFhP2l9Ep80IBtqVAJzJGMcfis0sLnAGf3EjGX SbzGAM8ipRiuTjDY/y/gMpQq7MNtS3D2M0ur2reHgySdAPyktewCFMBhZKmPSlJQCEmi mSwT5yXYq0tiaCP7w9x+dIe3hpHB6gZfsxXWDNCLr/kEGHJorKAF6d1/1GQeUD0psfsF 4SdMFGr63jJCwKUTl0us7+4bqHjUTjsuhXLQFUNINJSIkNs8+7IRxzq8UbFgQi/qKVnv vkJzZsK/757eOebOp/6L0VQueLY04Pg/cy65aV3F/B9UXYyfUjBXaavdRQgBbYMgc3hm uOUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194105; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wx65b6tHAAIHsJSsttrbtRIwIAX7Thn6gXbFwUEFkEQ=; b=yp462mLpFhNQeoo55Kg9wztLhGtfs2JfCTcTFQM2H3owOEPZsDve43+XcvhXDQLBbl hDwrrcjH8p/Z5Pmoy3vUxMKyKS6wuGyYYHLj8IWyrvdz0UcE+MDLqvtB2GfP4dB1maFz XuTdgvCaJAbfsqpSWoDRTyAjnAifDa+ybolgAgDlInwA9fUFoq8GLIW+dpH8lLXs3otU E+TMGNVPuPhU/LodPHnqyF1jfszcLnCVzmfAxtbXsBVN+Liyx4EcMIp6/Z1BUNXymTaC duEd8atunFcpnIzUj0xDgfQZY6eGsTmRlvxtChczed5HyFX0nW5uARhrr26cn9+uy6ce HTJg== X-Gm-Message-State: AO0yUKXK5dJrmsttTbBrJK13qrM4Hbxa4q0RLivrMqY6BNTXYo8wEI1g fu9BBJQftKqm0L9ux8xWL6jYjOy4qAQ5Pt9unJM= X-Google-Smtp-Source: AK7set9jrafvwImhbea+2NwdNxYqe4InfqnkSApRE2IgoEMsIZXl/6vpS8pkuH8DPFUBiaTVGwjYEg== X-Received: by 2002:ac2:4a85:0:b0:4b9:f5e5:8fb4 with SMTP id l5-20020ac24a85000000b004b9f5e58fb4mr3722068lfp.3.1678194104784; Tue, 07 Mar 2023 05:01:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:44 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:40 +0100 Subject: [PATCH v3 02/10] drm/msm/dsi: Get rid of msm_dsi_config::num_dsi MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-2-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=5659; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=qNGmgSDARDPbwjPqlQOeXVvCmCFaveBX4Casc6DHvz4=; b=JDj2+PYyZuOr5jZ965RePL4Lo0u91NdEH45hK5STufYOKg86qRx38/3S1k7lX7SCnycYHyDnYs1b 9Oui7tGTDVChv+I92HbrRBMdFLxeIejvcvXgjh0IpAssADzHnRoG X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In preparation for supporting multiple sets of possible base registers, remove the num_dsi variable. We're comparing the io_start array contents with the reg value from the DTS, so it will either match one of the expected values or don't match against a zero (which we get from partial array initialization). Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 13 ------------- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 1 - drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index 6d21f0b33411..4515f52b407a 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -22,7 +22,6 @@ static const struct msm_dsi_config apq8064_dsi_cfg = { .bus_clk_names = dsi_v2_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_v2_bus_clk_names), .io_start = { 0x4700000, 0x5800000 }, - .num_dsi = 2, }; static const char * const dsi_6g_bus_clk_names[] = { @@ -42,7 +41,6 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = { .bus_clk_names = dsi_6g_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), .io_start = { 0xfd922800, 0xfd922b00 }, - .num_dsi = 2, }; static const char * const dsi_8916_bus_clk_names[] = { @@ -61,7 +59,6 @@ static const struct msm_dsi_config msm8916_dsi_cfg = { .bus_clk_names = dsi_8916_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names), .io_start = { 0x1a98000 }, - .num_dsi = 1, }; static const char * const dsi_8976_bus_clk_names[] = { @@ -80,7 +77,6 @@ static const struct msm_dsi_config msm8976_dsi_cfg = { .bus_clk_names = dsi_8976_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), .io_start = { 0x1a94000, 0x1a96000 }, - .num_dsi = 2, }; static const struct regulator_bulk_data msm8994_dsi_regulators[] = { @@ -99,7 +95,6 @@ static const struct msm_dsi_config msm8994_dsi_cfg = { .bus_clk_names = dsi_6g_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), .io_start = { 0xfd998000, 0xfd9a0000 }, - .num_dsi = 2, }; static const char * const dsi_8996_bus_clk_names[] = { @@ -119,7 +114,6 @@ static const struct msm_dsi_config msm8996_dsi_cfg = { .bus_clk_names = dsi_8996_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names), .io_start = { 0x994000, 0x996000 }, - .num_dsi = 2, }; static const char * const dsi_msm8998_bus_clk_names[] = { @@ -138,7 +132,6 @@ static const struct msm_dsi_config msm8998_dsi_cfg = { .bus_clk_names = dsi_msm8998_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names), .io_start = { 0xc994000, 0xc996000 }, - .num_dsi = 2, }; static const char * const dsi_sdm660_bus_clk_names[] = { @@ -156,7 +149,6 @@ static const struct msm_dsi_config sdm660_dsi_cfg = { .bus_clk_names = dsi_sdm660_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names), .io_start = { 0xc994000, 0xc996000 }, - .num_dsi = 2, }; static const char * const dsi_sdm845_bus_clk_names[] = { @@ -178,7 +170,6 @@ static const struct msm_dsi_config sdm845_dsi_cfg = { .bus_clk_names = dsi_sdm845_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), .io_start = { 0xae94000, 0xae96000 }, - .num_dsi = 2, }; static const struct regulator_bulk_data sm8550_dsi_regulators[] = { @@ -192,7 +183,6 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { .bus_clk_names = dsi_sdm845_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), .io_start = { 0xae94000, 0xae96000 }, - .num_dsi = 2, }; static const struct regulator_bulk_data sc7180_dsi_regulators[] = { @@ -206,7 +196,6 @@ static const struct msm_dsi_config sc7180_dsi_cfg = { .bus_clk_names = dsi_sc7180_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), .io_start = { 0xae94000 }, - .num_dsi = 1, }; static const char * const dsi_sc7280_bus_clk_names[] = { @@ -224,7 +213,6 @@ static const struct msm_dsi_config sc7280_dsi_cfg = { .bus_clk_names = dsi_sc7280_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names), .io_start = { 0xae94000, 0xae96000 }, - .num_dsi = 2, }; static const char * const dsi_qcm2290_bus_clk_names[] = { @@ -242,7 +230,6 @@ static const struct msm_dsi_config qcm2290_dsi_cfg = { .bus_clk_names = dsi_qcm2290_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_qcm2290_bus_clk_names), .io_start = { 0x5e94000 }, - .num_dsi = 1, }; static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h index 44be4a88aa83..6b6b16c5fd25 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h @@ -39,7 +39,6 @@ struct msm_dsi_config { const char * const *bus_clk_names; const int num_bus_clks; const resource_size_t io_start[DSI_MAX]; - const int num_dsi; }; struct msm_dsi_host_cfg_ops { diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 18fa30e1e858..9021f0d65515 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1868,7 +1868,7 @@ static int dsi_host_get_id(struct msm_dsi_host *msm_host) if (!res) return -EINVAL; - for (i = 0; i < cfg->num_dsi; i++) { + for (i = 0; i < DSI_MAX; i++) { if (cfg->io_start[i] == res->start) return i; } From patchwork Tue Mar 7 13:01:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163424 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 964D9C678D5 for ; Tue, 7 Mar 2023 13:01:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9966610E48F; Tue, 7 Mar 2023 13:01:50 +0000 (UTC) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 38D5D10E264 for ; Tue, 7 Mar 2023 13:01:48 +0000 (UTC) Received: by mail-lf1-x12a.google.com with SMTP id t11so16974923lfr.1 for ; Tue, 07 Mar 2023 05:01:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194106; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tKiXCG4bbxlqg4TZuhn1lShaquHQ+BPuyW0xhFs0ICg=; b=tZaZP0FyqV0gNReyC679bi8CT0Th0omgS+EoRTEnAD3riOmZsa+mcSjJyqcfkWH4Ao IvJ9m82jdcjokfNRv3cT+rqdJ1o/OZlV7d669NyXq8esHk+jllnLcGB4khEBa00+gMda +t8fPDutFT07fVECMCXLY48Rzqg/1ut1axARViYSSCqAn+cDA7uhmo1mKuT3WGhlMHIk bAu5VC8ChDxF2CdoshgXTrGAxGDLm/HZ7R+9+RWPRRZfVAkuTPo4fUFdLpnVkpFHqYYH B8gUOLGDThhN/UzwJyYf3TIukCW1XxPeqaMai/ZeYJk9K1OLINUAW5Zpu/wTj6hh+j+t uV7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194106; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tKiXCG4bbxlqg4TZuhn1lShaquHQ+BPuyW0xhFs0ICg=; b=JrfdCmCDmX73QmaIFyXL4zewPIAS4HWeTFWctzRkMlMdkyiMzcdm3+qkOGSwmZqOCX UgAoyvOdcLwfYypIoOYgd+JUUF2Da18OSJRsaMO9iuzUXjnm708nozvMMHUpDNUe4VIT ZRh1uPxKt3hRf90G1IbyCCIv+IDDR9rakX4CdVnpk3+loUSiKUf/k0F8ZfUstLSQuD3G ysNr+dhUMU4xtJ/2f5qcvXDKE5kQCMkSeVbvjKuv5PORQmEMh9LnhJPMhnoqAQzfCyy/ OHKEHRJQj/oP5edQ8oQofUrYWy/JsK4e/2n5CnVcKani1JyXoGbPsK/gYMXqD/vMxmXl 8O7A== X-Gm-Message-State: AO0yUKWfvX6ecESaj90F0+6218ZwTBywZpsaz2jXhYap+itagWsaW0rG NVmONSaXQBq1Pg4KLUKfk+sqFA== X-Google-Smtp-Source: AK7set9yRiUK/gXCYxKRurzVGUKwD21wl9+qwBpUD/i/i5FnRraWO9ocW4u/sbjG+BEe3iFx6irhZA== X-Received: by 2002:a19:5212:0:b0:4d5:a0d2:f542 with SMTP id m18-20020a195212000000b004d5a0d2f542mr4223293lfb.18.1678194106320; Tue, 07 Mar 2023 05:01:46 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:46 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:41 +0100 Subject: [PATCH v3 03/10] drm/msm/dsi: Fix DSI index detection when version clash occurs MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-3-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=8155; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=CgPPBWXxtg/cf0U+pXW2+cQoa7CuqDjjXQcr9orrQS4=; b=qXiUBICAvOwDvzHakzzS9oTY5TbLxWE4fBJrqxuJMvESTctvtTtRBrZD/bUOi1pHRYNJd0udFTwB iSLiiAU/B0xoMvN7kRKd+BKOoP3lsU6zQk4WmZx2hTiUiKxm+WWr X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently, we allow for MAX_DSI entries in io_start to facilitate for MAX_DSI number of DSI hosts at different addresses. The configuration is matched against the DSI CTRL hardware revision read back from the component. We need a way to resolve situations where multiple SoCs with different register maps may use the same version of DSI CTRL. In preparation to do so, make msm_dsi_config a 2d array where each entry represents a set of configurations adequate for a given SoC. This is totally fine to do, as the only differentiating factors between same-version-different-SoCs configurations are the number of DSI hosts (1 or 2, at least as of today) and the set of base registers. The regulator setup is the same, because the DSI hardware is the same, regardless of the SoC it was implemented in. In addition to that, update the matching logic such that it will loop over VARIANTS_MAX variants, making sure they are all taken into account. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 52 ++++++++++++++++++++++++++++---------- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 5 +++- drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++---- 3 files changed, 48 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index 4515f52b407a..6c192963c100 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -21,7 +21,9 @@ static const struct msm_dsi_config apq8064_dsi_cfg = { .num_regulators = ARRAY_SIZE(apq8064_dsi_regulators), .bus_clk_names = dsi_v2_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_v2_bus_clk_names), - .io_start = { 0x4700000, 0x5800000 }, + .io_start = { + { 0x4700000, 0x5800000 }, + }, }; static const char * const dsi_6g_bus_clk_names[] = { @@ -40,7 +42,9 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8974_apq8084_regulators), .bus_clk_names = dsi_6g_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), - .io_start = { 0xfd922800, 0xfd922b00 }, + .io_start = { + { 0xfd922800, 0xfd922b00 }, + }, }; static const char * const dsi_8916_bus_clk_names[] = { @@ -58,7 +62,9 @@ static const struct msm_dsi_config msm8916_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8916_dsi_regulators), .bus_clk_names = dsi_8916_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names), - .io_start = { 0x1a98000 }, + .io_start = { + { 0x1a98000 }, + }, }; static const char * const dsi_8976_bus_clk_names[] = { @@ -76,7 +82,9 @@ static const struct msm_dsi_config msm8976_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8976_dsi_regulators), .bus_clk_names = dsi_8976_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), - .io_start = { 0x1a94000, 0x1a96000 }, + .io_start = { + { 0x1a94000, 0x1a96000 }, + }, }; static const struct regulator_bulk_data msm8994_dsi_regulators[] = { @@ -94,7 +102,9 @@ static const struct msm_dsi_config msm8994_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8994_dsi_regulators), .bus_clk_names = dsi_6g_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), - .io_start = { 0xfd998000, 0xfd9a0000 }, + .io_start = { + { 0xfd998000, 0xfd9a0000 }, + }, }; static const char * const dsi_8996_bus_clk_names[] = { @@ -113,7 +123,9 @@ static const struct msm_dsi_config msm8996_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8996_dsi_regulators), .bus_clk_names = dsi_8996_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names), - .io_start = { 0x994000, 0x996000 }, + .io_start = { + { 0x994000, 0x996000 }, + }, }; static const char * const dsi_msm8998_bus_clk_names[] = { @@ -131,7 +143,9 @@ static const struct msm_dsi_config msm8998_dsi_cfg = { .num_regulators = ARRAY_SIZE(msm8998_dsi_regulators), .bus_clk_names = dsi_msm8998_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_msm8998_bus_clk_names), - .io_start = { 0xc994000, 0xc996000 }, + .io_start = { + { 0xc994000, 0xc996000 }, + }, }; static const char * const dsi_sdm660_bus_clk_names[] = { @@ -148,7 +162,9 @@ static const struct msm_dsi_config sdm660_dsi_cfg = { .num_regulators = ARRAY_SIZE(sdm660_dsi_regulators), .bus_clk_names = dsi_sdm660_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm660_bus_clk_names), - .io_start = { 0xc994000, 0xc996000 }, + .io_start = { + { 0xc994000, 0xc996000 }, + }, }; static const char * const dsi_sdm845_bus_clk_names[] = { @@ -169,7 +185,9 @@ static const struct msm_dsi_config sdm845_dsi_cfg = { .num_regulators = ARRAY_SIZE(sdm845_dsi_regulators), .bus_clk_names = dsi_sdm845_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), - .io_start = { 0xae94000, 0xae96000 }, + .io_start = { + { 0xae94000, 0xae96000 }, + }, }; static const struct regulator_bulk_data sm8550_dsi_regulators[] = { @@ -182,7 +200,9 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { .num_regulators = ARRAY_SIZE(sm8550_dsi_regulators), .bus_clk_names = dsi_sdm845_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), - .io_start = { 0xae94000, 0xae96000 }, + .io_start = { + { 0xae94000, 0xae96000 }, + }, }; static const struct regulator_bulk_data sc7180_dsi_regulators[] = { @@ -195,7 +215,9 @@ static const struct msm_dsi_config sc7180_dsi_cfg = { .num_regulators = ARRAY_SIZE(sc7180_dsi_regulators), .bus_clk_names = dsi_sc7180_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), - .io_start = { 0xae94000 }, + .io_start = { + { 0xae94000 }, + }, }; static const char * const dsi_sc7280_bus_clk_names[] = { @@ -212,7 +234,9 @@ static const struct msm_dsi_config sc7280_dsi_cfg = { .num_regulators = ARRAY_SIZE(sc7280_dsi_regulators), .bus_clk_names = dsi_sc7280_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names), - .io_start = { 0xae94000, 0xae96000 }, + .io_start = { + { 0xae94000, 0xae96000 }, + }, }; static const char * const dsi_qcm2290_bus_clk_names[] = { @@ -229,7 +253,9 @@ static const struct msm_dsi_config qcm2290_dsi_cfg = { .num_regulators = ARRAY_SIZE(qcm2290_dsi_cfg_regulators), .bus_clk_names = dsi_qcm2290_bus_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_qcm2290_bus_clk_names), - .io_start = { 0x5e94000 }, + .io_start = { + { 0x5e94000 }, + }, }; static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h index 6b6b16c5fd25..8772a3631ac1 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h @@ -32,13 +32,16 @@ #define DSI_6G_REG_SHIFT 4 +/* Maximum number of configurations matched against the same hw revision */ +#define VARIANTS_MAX 2 + struct msm_dsi_config { u32 io_offset; const struct regulator_bulk_data *regulator_data; int num_regulators; const char * const *bus_clk_names; const int num_bus_clks; - const resource_size_t io_start[DSI_MAX]; + const resource_size_t io_start[VARIANTS_MAX][DSI_MAX]; }; struct msm_dsi_host_cfg_ops { diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9021f0d65515..9cfb9e91bfea 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -1862,16 +1862,16 @@ static int dsi_host_get_id(struct msm_dsi_host *msm_host) struct platform_device *pdev = msm_host->pdev; const struct msm_dsi_config *cfg = msm_host->cfg_hnd->cfg; struct resource *res; - int i; + int i, j; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dsi_ctrl"); if (!res) return -EINVAL; - for (i = 0; i < DSI_MAX; i++) { - if (cfg->io_start[i] == res->start) - return i; - } + for (i = 0; i < VARIANTS_MAX; i++) + for (j = 0; j < DSI_MAX; j++) + if (cfg->io_start[i][j] == res->start) + return j; return -EINVAL; } From patchwork Tue Mar 7 13:01:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163425 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 5C9DBC6FD1B for ; Tue, 7 Mar 2023 13:01:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D3EA10E49B; Tue, 7 Mar 2023 13:01:52 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id E176F10E48F for ; Tue, 7 Mar 2023 13:01:49 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id i28so17038640lfv.0 for ; Tue, 07 Mar 2023 05:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194108; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fjTJZiNd6R83QWqXCKgFPnIkCB7wIuy8qVdIkOb07TA=; b=B0jnwDviZ8EhOE7w6tWBqfeMLopMAcGiR608LOWDrRlR71R/bUdHkK4NtwW1OSjIee wctBeCLwXMGGrHYgvZzrcpUq7hsaQEjSKlTgr9ebz4dnkvAU5+upgCR6Als1+52C1QfE o4E5ZDH/DHsKwQZcaUPcUT1tZfzLf+9pvamao/jhCtrlTYyNe7F2RMMFU5Gnl9tAHtDO GYpWBgyFvdK0k/Yor7A6QVguoMEzmC737ORKGShwOoBaTo2Q9ZIySmwiO2hYAmAKhd+f u+ca3oM3i9HJEAVTxukn64qusfJd4ZmgcY83cuOgNAhh+ty9COwF+utK8MkO4dAjITcG Y4kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194108; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fjTJZiNd6R83QWqXCKgFPnIkCB7wIuy8qVdIkOb07TA=; b=LTd+9tignj3QzyoHn/bih6yzTuxLKJkKSkAqa/dQPyY6CPrje2Uf33MX9aT/B981+u jRIaRnVYFFUna9j/l/bmlciYMg5s73ZXv+GtIp2JEqfJTPfJiXOTcrYh+na/zYoT7dpy Zd1zFqGq6NODd476BawN9zkkbYPF4qk/8uDxkEL0D+/ZOz5sfJ13I44DmGByvpbm0zvg eWn8+xcIYAsqRh5J0Rf/f+gKKzBW0p7mcNz/UlJ1nttyuT18CrPZCFnzpNOF3dnaTKYo k2566D9WaH37EfRSO9PpBDnYuzUsfVUxdnbDFaIhleenLCNIEhxuPzN2fPSJsVcWi/Ix el2g== X-Gm-Message-State: AO0yUKWwPNuRAD+u4Nrlu5gydMj6Il1lMxbl61ULTu1GwaT1yvkQNKAt xX3vn/XxVhjppZrc5LFjjpXFqA== X-Google-Smtp-Source: AK7set+kayW1sZVFsTQr5RJ5KKxF+jK3HOLp1DlOBTi9s24WW5X7rv6EvopWoHue1ql2b0ghxnumKw== X-Received: by 2002:ac2:51c4:0:b0:4cc:53e3:771d with SMTP id u4-20020ac251c4000000b004cc53e3771dmr3975638lfm.64.1678194107831; Tue, 07 Mar 2023 05:01:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:47 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:42 +0100 Subject: [PATCH v3 04/10] drm/msm/dsi: dsi_cfg: Deduplicate identical structs MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-4-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=6178; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=FOznmitAnsxsxj/BCqVtxW8B1SKled4a7NwV407MWtY=; b=f50KP8xbmhZ1EHJCTyYfLubVlBW91cQUMunNAqQmHzGh11J7Agpwyyq0/osuTb3ZQdJKJ1Gbo6yO fqhhu507Dcd6Fo6Fo7cfObXUR9ivMkYpImKBOFeUGS3jbTarxfzt X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Some structs were defined multiple times for no apparent reason. Deduplicate them. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 77 +++++++++++++-------------------------- 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index 6c192963c100..d39521850018 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -47,41 +47,32 @@ static const struct msm_dsi_config msm8974_apq8084_dsi_cfg = { }, }; -static const char * const dsi_8916_bus_clk_names[] = { +static const char * const dsi_v1_3_1_clk_names[] = { "mdp_core", "iface", "bus", }; -static const struct regulator_bulk_data msm8916_dsi_regulators[] = { +static const struct regulator_bulk_data dsi_v1_3_1_regulators[] = { { .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */ { .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */ }; static const struct msm_dsi_config msm8916_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = msm8916_dsi_regulators, - .num_regulators = ARRAY_SIZE(msm8916_dsi_regulators), - .bus_clk_names = dsi_8916_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_8916_bus_clk_names), + .regulator_data = dsi_v1_3_1_regulators, + .num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators), + .bus_clk_names = dsi_v1_3_1_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names), .io_start = { { 0x1a98000 }, }, }; -static const char * const dsi_8976_bus_clk_names[] = { - "mdp_core", "iface", "bus", -}; - -static const struct regulator_bulk_data msm8976_dsi_regulators[] = { - { .supply = "vdda", .init_load_uA = 100000 }, /* 1.2 V */ - { .supply = "vddio", .init_load_uA = 100000 }, /* 1.8 V */ -}; - static const struct msm_dsi_config msm8976_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = msm8976_dsi_regulators, - .num_regulators = ARRAY_SIZE(msm8976_dsi_regulators), - .bus_clk_names = dsi_8976_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_8976_bus_clk_names), + .regulator_data = dsi_v1_3_1_regulators, + .num_regulators = ARRAY_SIZE(dsi_v1_3_1_regulators), + .bus_clk_names = dsi_v1_3_1_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v1_3_1_clk_names), .io_start = { { 0x1a94000, 0x1a96000 }, }, @@ -107,10 +98,6 @@ static const struct msm_dsi_config msm8994_dsi_cfg = { }, }; -static const char * const dsi_8996_bus_clk_names[] = { - "mdp_core", "iface", "bus", "core_mmss", -}; - static const struct regulator_bulk_data msm8996_dsi_regulators[] = { { .supply = "vdda", .init_load_uA = 18160 }, /* 1.25 V */ { .supply = "vcca", .init_load_uA = 17000 }, /* 0.925 V */ @@ -121,8 +108,8 @@ static const struct msm_dsi_config msm8996_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, .regulator_data = msm8996_dsi_regulators, .num_regulators = ARRAY_SIZE(msm8996_dsi_regulators), - .bus_clk_names = dsi_8996_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_8996_bus_clk_names), + .bus_clk_names = dsi_6g_bus_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_6g_bus_clk_names), .io_start = { { 0x994000, 0x996000 }, }, @@ -167,24 +154,20 @@ static const struct msm_dsi_config sdm660_dsi_cfg = { }, }; -static const char * const dsi_sdm845_bus_clk_names[] = { +static const char * const dsi_v2_4_clk_names[] = { "iface", "bus", }; -static const char * const dsi_sc7180_bus_clk_names[] = { - "iface", "bus", -}; - -static const struct regulator_bulk_data sdm845_dsi_regulators[] = { +static const struct regulator_bulk_data dsi_v2_4_regulators[] = { { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ }; static const struct msm_dsi_config sdm845_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = sdm845_dsi_regulators, - .num_regulators = ARRAY_SIZE(sdm845_dsi_regulators), - .bus_clk_names = dsi_sdm845_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), + .regulator_data = dsi_v2_4_regulators, + .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators), + .bus_clk_names = dsi_v2_4_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { { 0xae94000, 0xae96000 }, }, @@ -198,32 +181,24 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, .regulator_data = sm8550_dsi_regulators, .num_regulators = ARRAY_SIZE(sm8550_dsi_regulators), - .bus_clk_names = dsi_sdm845_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_sdm845_bus_clk_names), + .bus_clk_names = dsi_v2_4_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { { 0xae94000, 0xae96000 }, }, }; -static const struct regulator_bulk_data sc7180_dsi_regulators[] = { - { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ -}; - static const struct msm_dsi_config sc7180_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = sc7180_dsi_regulators, - .num_regulators = ARRAY_SIZE(sc7180_dsi_regulators), - .bus_clk_names = dsi_sc7180_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_sc7180_bus_clk_names), + .regulator_data = dsi_v2_4_regulators, + .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators), + .bus_clk_names = dsi_v2_4_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { { 0xae94000 }, }, }; -static const char * const dsi_sc7280_bus_clk_names[] = { - "iface", "bus", -}; - static const struct regulator_bulk_data sc7280_dsi_regulators[] = { { .supply = "vdda", .init_load_uA = 8350 }, /* 1.2 V */ }; @@ -232,8 +207,8 @@ static const struct msm_dsi_config sc7280_dsi_cfg = { .io_offset = DSI_6G_REG_SHIFT, .regulator_data = sc7280_dsi_regulators, .num_regulators = ARRAY_SIZE(sc7280_dsi_regulators), - .bus_clk_names = dsi_sc7280_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_sc7280_bus_clk_names), + .bus_clk_names = dsi_v2_4_clk_names, + .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { { 0xae94000, 0xae96000 }, }, From patchwork Tue Mar 7 13:01:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163428 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 DDB12C6FD1E for ; Tue, 7 Mar 2023 13:02:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 348B110E4A5; Tue, 7 Mar 2023 13:01:58 +0000 (UTC) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE0B710E264 for ; Tue, 7 Mar 2023 13:01:49 +0000 (UTC) Received: by mail-lf1-x136.google.com with SMTP id g17so16971748lfv.4 for ; Tue, 07 Mar 2023 05:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194109; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=55lMFXFd7GmMBP4PF1xB1lq9Cw+L1BmijVr1G6D/aP0=; b=fRfy53cEsWZ9faDm5Cd0zlm9rKYQXRpJVLFZt2OVknK3ljQGsqfc1ZQHGRstMJeatU OPNPlp0mlLvJU24T7Nyi8DLtqzcFambcmfWwoxANwdKOiJ65QD+CQO9PA2/l83lX8D11 S5anBLqxPqO+SvQKASzZmsVM83CV4tb83LwMfSs+zLGWggOAgOAMu6EFsexpad7x81Pc GSrwhcqCcXOxQO2j+/LxxXQzHyRjggC+mjiIZ+fXZIijnNGYN3u9OaKMiZ0Ii1+2Q8kB gCki9l2R1n6B1KK/Cid/IQf8Opf09tq/aIn3JN/BAPB3PtCUE7cB2LMgVBnNY6pM4W19 34AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194109; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=55lMFXFd7GmMBP4PF1xB1lq9Cw+L1BmijVr1G6D/aP0=; b=0sD9HZHwpM13FOTz6BbjyhWtapN8yKbYi3Zu8FUFUyqR6mHZPbgfbo0onZ8jY12VWR 9Es+ilrgHhiAuGrTYOImBDJwShcFJBhXV7xEU5m2cLR8N2htcdk3yv9WrTb1UGWx7DJr JkBS0j8gp2utm3OGVeewgyceofxjgDMt88JRtE3ZgrQEO+J2PTOWgNYaLEiqlMu4obF5 Rpro7BcN/Yk3dMQqbWacNPE6GuGW1rdz0A//E00QZKGEyWTHdB1KASAehvekIc0rKZHY eAZo34kSZ+i5nWpKE9mVyLUzkWrCKOyp5OSfFMtTZRXXkMt2Pcexgyhl31gQEp//96Eu woUg== X-Gm-Message-State: AO0yUKVKbs3nSxElggUINGBM/8Zr/89KgZCIMV1SewCtcdOHqja1HnbH sxk/MsWe5k9+aXHAm+ACQDzcVw== X-Google-Smtp-Source: AK7set87sMy1FszPQ3DFVXd9IWgFz6raEtqYLt7QEcdv4tEsY/E1WspeaJtD9IFkiPEzi5szujvaZg== X-Received: by 2002:ac2:5df6:0:b0:4b5:964d:499e with SMTP id z22-20020ac25df6000000b004b5964d499emr3789572lfq.8.1678194109317; Tue, 07 Mar 2023 05:01:49 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:49 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:43 +0100 Subject: [PATCH v3 05/10] drm/msm/dsi: dsi_cfg: Merge SC7180 config into SDM845 MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-5-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=2145; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=FABCSvB5sJjrFfkmtzbHoBqH7FB7e/a49B1A9lWjwfw=; b=TJaWnNwL/YZbaSACXrVBkph5QhvBKJ7DBK7miT7PVfOpKqHUafq2Dask7moFQVTIwwTzqjuhfKpq l3JDU3AHBjIqQEBaUWt+8I/wXLi5YvT06nylSKUYBAdJoiNNtp9y X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The configs are identical, other than the number of *maximum* DSI hosts allowed. This isn't an issue, unless somebody deliberately tries to access the inexistent host by adding a dt node for it. Remove the SC7180 struct and point the hw revision match to the SDM845's one. On a note, this could have been done back when 7180 support was introduced. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index d39521850018..6d4b2ce4b918 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -169,7 +169,7 @@ static const struct msm_dsi_config sdm845_dsi_cfg = { .bus_clk_names = dsi_v2_4_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { - { 0xae94000, 0xae96000 }, + { 0xae94000, 0xae96000 }, /* SDM845 / SDM670 / SC7180 */ }, }; @@ -188,17 +188,6 @@ static const struct msm_dsi_config sm8550_dsi_cfg = { }, }; -static const struct msm_dsi_config sc7180_dsi_cfg = { - .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = dsi_v2_4_regulators, - .num_regulators = ARRAY_SIZE(dsi_v2_4_regulators), - .bus_clk_names = dsi_v2_4_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), - .io_start = { - { 0xae94000 }, - }, -}; - static const struct regulator_bulk_data sc7280_dsi_regulators[] = { { .supply = "vdda", .init_load_uA = 8350 }, /* 1.2 V */ }; @@ -299,7 +288,7 @@ static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = { {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0, &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1, - &sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops}, + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_5_0, &sc7280_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_6_0, From patchwork Tue Mar 7 13:01:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163426 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 776F9C678D5 for ; Tue, 7 Mar 2023 13:02:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0796D10E497; Tue, 7 Mar 2023 13:01:56 +0000 (UTC) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F5A110E495 for ; Tue, 7 Mar 2023 13:01:52 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id m6so16956908lfq.5 for ; Tue, 07 Mar 2023 05:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194111; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z5pR4WgQc9HEY23Sq27MPiR8dNOQq4AhkDDUyfnXpBY=; b=XYOHftSIp51QGOWt8pZnbNohm/ua6EviqPB6m4t9y82KxkeLLpu6FXhg0BMoMtOfP+ wGeaRgJX67bGunMG7D8KDOCzu9lc0CH6yS3vnzOK6qZ8cQbG/TZAfOZonn/kaEdQqgK2 9MKmb68hxXIYNG33hZy4OT/Jc+Y6szJ/YxDNCKxLmV9DmlFuRv2cwhwuQ7oMRfwMhhut TD54ZdsdgOfSP7YNk3EI8YDyYNXwYsgcgABSfh2nBjoOgMHw1J7/cVeTufSuW5dAKbP6 RHb14Cvun18zBgcN8l3bazXC9VPVmQ7qBJhb9M+EeBTiv7CkwjGVWsnkfibZpPzvUukI J05Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194111; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z5pR4WgQc9HEY23Sq27MPiR8dNOQq4AhkDDUyfnXpBY=; b=TIFWACVR/w/dVioM/pyilqmgF8dhzNEhNB7SNnGqUfG4XnsELkAWiRIiyUjUXs8hna K6oMmhf0Vi8/F7mtZho1OTY0A6UdtkkWWvVc8xVhugEWn4cvFX2dkIhhCY0CrsU0rc9h f3Bt9lN0Il5m5lqRfybmvPV1qzQFKWShgjFUiEM/BBQEOCDb0N6UhXVo4XbROLTMCNNM 4XqI5g3ZPi860GsADYgJits2UmmK3I3Jk/MWVZayV3hujleH+RsePdMUrgHPWNVbFJ8C hW0ZOIwbUIlvbmd0L6PklACy3y6g3uvjJFCUqcYaiPEk5G+Q1FFnOwIlijsNTGQAlmYl wNKw== X-Gm-Message-State: AO0yUKUIDfB6Shq4MmfM/Pr17G2YYDyNp2qLTRuSdqddoAdmQaejJ8XX fNt0v/7VFCyXtinPlBT6VCm7RA== X-Google-Smtp-Source: AK7set8Tfe55LLhyLRQRBQYWkb+wwuPfq7m3hjK7jkiG2ZCjWLSQParDWJpsDC2F6uq0c6EgnqLAxQ== X-Received: by 2002:ac2:508b:0:b0:4dc:4afe:1622 with SMTP id f11-20020ac2508b000000b004dc4afe1622mr4328016lfm.42.1678194110798; Tue, 07 Mar 2023 05:01:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:50 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:44 +0100 Subject: [PATCH v3 06/10] drm/msm/dsi: Switch the QCM2290-specific compatible to index autodetection MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-6-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=2792; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tOEY+naDG6ZngTYbV5QlUfaQyGkhOYqaG0FLMZ1065Y=; b=7jAUGQvPullBMwXQ4AJI84UFe2g79Mwjf6UICr6eBwcWViJdA3EVgmN0zMVGHhzYo//BQAq/Zfhm bJxtNnOhBXFWLwYm0jrEYOJY1Y2yTQz06FI1GGIAhqU27ujHOUd4 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now that the logic can handle multiple sets of registers, move the QCM2290 to the common logic and mark it deprecated. This allows us to remove a couple of structs, saving some memory. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/dsi/dsi.c | 4 +++- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 28 ++-------------------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 31fdee2052be..90d43628b22b 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -174,7 +174,9 @@ static int dsi_dev_remove(struct platform_device *pdev) static const struct of_device_id dt_match[] = { { .compatible = "qcom,mdss-dsi-ctrl", .data = NULL /* autodetect cfg */ }, - { .compatible = "qcom,dsi-ctrl-6g-qcm2290", .data = &qcm2290_dsi_cfg_handler }, + + /* Deprecated, don't use */ + { .compatible = "qcom,dsi-ctrl-6g-qcm2290", .data = NULL }, {} }; diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.c b/drivers/gpu/drm/msm/dsi/dsi_cfg.c index 6d4b2ce4b918..29ccd755cc2e 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.c +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.c @@ -169,7 +169,8 @@ static const struct msm_dsi_config sdm845_dsi_cfg = { .bus_clk_names = dsi_v2_4_clk_names, .num_bus_clks = ARRAY_SIZE(dsi_v2_4_clk_names), .io_start = { - { 0xae94000, 0xae96000 }, /* SDM845 / SDM670 / SC7180 */ + { 0xae94000, 0xae96000 }, /* SDM845 / SDM670 */ + { 0x5e94000 }, /* QCM2290 / SM6115 / SM6125 / SM6375 */ }, }; @@ -203,25 +204,6 @@ static const struct msm_dsi_config sc7280_dsi_cfg = { }, }; -static const char * const dsi_qcm2290_bus_clk_names[] = { - "iface", "bus", -}; - -static const struct regulator_bulk_data qcm2290_dsi_cfg_regulators[] = { - { .supply = "vdda", .init_load_uA = 21800 }, /* 1.2 V */ -}; - -static const struct msm_dsi_config qcm2290_dsi_cfg = { - .io_offset = DSI_6G_REG_SHIFT, - .regulator_data = qcm2290_dsi_cfg_regulators, - .num_regulators = ARRAY_SIZE(qcm2290_dsi_cfg_regulators), - .bus_clk_names = dsi_qcm2290_bus_clk_names, - .num_bus_clks = ARRAY_SIZE(dsi_qcm2290_bus_clk_names), - .io_start = { - { 0x5e94000 }, - }, -}; - static const struct msm_dsi_host_cfg_ops msm_dsi_v2_host_ops = { .link_clk_set_rate = dsi_link_clk_set_rate_v2, .link_clk_enable = dsi_link_clk_enable_v2, @@ -312,9 +294,3 @@ const struct msm_dsi_cfg_handler *msm_dsi_cfg_get(u32 major, u32 minor) return cfg_hnd; } - -/* Non autodetect configs */ -const struct msm_dsi_cfg_handler qcm2290_dsi_cfg_handler = { - .cfg = &qcm2290_dsi_cfg, - .ops = &msm_dsi_6g_v2_host_ops, -}; From patchwork Tue Mar 7 13:01:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163427 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 BBEB8C678D5 for ; Tue, 7 Mar 2023 13:02:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5FB710E4A4; Tue, 7 Mar 2023 13:01:56 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id DCC3B10E49F for ; Tue, 7 Mar 2023 13:01:52 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id i28so17038970lfv.0 for ; Tue, 07 Mar 2023 05:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7PaidmNsI4X4+HjLVSO/Mw/Vgb1gA+84W9VJP5fzGmw=; b=ybDeVf3o3AYMMPETLq2Rdp9UGraYIOlwXEM3om7QZZEOw1tG4ydNiM9rck7drBz1h0 jWEFVmcl/EKs/NL/y1jVMDZ49zWO7OBk4um0M0rK9XpMSU7r8RZG17JZIxmgQ6hmXKA1 /jDMG8WfHpNXWlGxHtJrAP/YQeCgxwGS/Tw5baoUbjUo8glTUO0xB5AUpDZ92/0kwt7+ Sh99yfvUMkuPgHA+uCbGtpApsCwT9j1U0kUGYA6nyFASz+kT6rT0TzFm3NfXubj+9+7H P1kJMStI5ESo46W0i1Za41E43Fqd2IOOTtWplXoKOocoX7tGl1tnkvilQleSmdrFDGIy 495A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7PaidmNsI4X4+HjLVSO/Mw/Vgb1gA+84W9VJP5fzGmw=; b=iT3nPYmxlCau7XuPrZurG60iSrpWmwaqxbH/BKqwCA/09HKCCQ/KlUEeLrC4pwAo44 vCsO5x/VyJCEAI5TptNnQr4H6AxsnmOlsshBG6U7HtrMJBYlcHbMtCO5y2k5c2F1JDnW 2cVDOyFiJRS/BQI1Z78eWRnX4YWjgoc65vFwxKJQP03zqU/QwDNsCCBcVZnIoM7OJAfr dvoZKkzANcDRxLgHq6/Swd0SW5xsZxTTWY58slOnSQirspaAKQC2k3ddbPqFZHa5gC85 otWosf6y3alnaUjCLbD7hrKejgPGoZ7jqKm56Hes61ccK6D5oAuSH3Olo2LBSE97Sap4 fl9A== X-Gm-Message-State: AO0yUKWzzGGsza44dm6XNBr4shch1cTu5DutU5eI4FrubPOEyO2NT85E 1Q70JnhBdfI4U/x+95P8kX4g/w== X-Google-Smtp-Source: AK7set86logaWA856+uKhpszQ0hgdJdLY0fLjfYHHI2H8Bw8JAPRe3fTlXWXmcU0Ng9gw9NRXSTViw== X-Received: by 2002:ac2:5dfb:0:b0:4d5:8f3e:7852 with SMTP id z27-20020ac25dfb000000b004d58f3e7852mr4051427lfq.49.1678194112386; Tue, 07 Mar 2023 05:01:52 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:51 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:45 +0100 Subject: [PATCH v3 07/10] drm/msm/dsi: Remove custom DSI config handling MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-7-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=1669; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=x9eSVOGZMp5LDI1BiTB/gmaSF0y+os8hsi63E66yEQw=; b=SE4rbaWLt+hWaIAtC7Qt02TIAq4KXSrCYpl8fpJ4Mi/B1KvuDGHtJetP3PvPm2tCvYDkNx2j6kcR POEjl9jlCTiSdZQTrezBPqu+t3WWg1iGpvdUwufC2NSGmldNRviD X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now that the only user is handled by common code, remove the option to specify custom handlers through match data. This is effectively a revert of commit: 5ae15e76271 ("drm/msm/dsi: Allow to specify dsi config as pdata") Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- drivers/gpu/drm/msm/dsi/dsi.c | 4 ++-- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 90d43628b22b..e0b911af618d 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -173,10 +173,10 @@ static int dsi_dev_remove(struct platform_device *pdev) } static const struct of_device_id dt_match[] = { - { .compatible = "qcom,mdss-dsi-ctrl", .data = NULL /* autodetect cfg */ }, + { .compatible = "qcom,mdss-dsi-ctrl" }, /* Deprecated, don't use */ - { .compatible = "qcom,dsi-ctrl-6g-qcm2290", .data = NULL }, + { .compatible = "qcom,dsi-ctrl-6g-qcm2290" }, {} }; diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 9cfb9e91bfea..961689a255c4 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -214,10 +214,6 @@ static const struct msm_dsi_cfg_handler *dsi_get_config( int ret; u32 major = 0, minor = 0; - cfg_hnd = device_get_match_data(dev); - if (cfg_hnd) - return cfg_hnd; - ahb_clk = msm_clk_get(msm_host->pdev, "iface"); if (IS_ERR(ahb_clk)) { pr_err("%s: cannot get interface clock\n", __func__); From patchwork Tue Mar 7 13:01:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163430 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A3000C6FD1B for ; Tue, 7 Mar 2023 13:02:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 612DB10E4A7; Tue, 7 Mar 2023 13:02:03 +0000 (UTC) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 95D9A10E498 for ; Tue, 7 Mar 2023 13:01:54 +0000 (UTC) Received: by mail-lf1-x12a.google.com with SMTP id t11so16975530lfr.1 for ; Tue, 07 Mar 2023 05:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194114; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CzTyTjVeEOwx0n8Fcur27AsP/7zLfRdjtQMUW7H4GE8=; b=Y1f+YlSj6leQtVLh4lCNFkqAnnKyFkvUu4KNMasglEwHsnWS1CWIDaXG7NV3c9WUpX NRiQgWMEX6piVxBRmiPzOJLCj9wq7Mndy58OUirCUh71Ng+EWAJp2N88aliHOiJBAM8E 7b+5iVUIMPTBh5XMzrbrJsAwhdEJ+pXbt4J/gOLoQl58q0//eingsEpM5Atz0mHjkfIL MVds9sbVXLf6OJi3DteMUbxILXRjYwf9FtQPM9Fh9Wbrp/DCvlxsZx8ZUbFrPa7tcRYE VAD1V182jVcf+x6kIIfb/LVWMkOiQ9MgZcBCAdKXMyruYXQzmOHE0jasp4f3/h/ddBQe mstA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194114; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CzTyTjVeEOwx0n8Fcur27AsP/7zLfRdjtQMUW7H4GE8=; b=T4WtSEN1VLYZFcvGyEcFJ6/lUBTEPJaaKwMliqRVHXp9CxpkdYO9qDqhNGi7LpJ0tw 3Xo7e3kRX/7YjTBb7THjmoQzSMfsVF+QtkNnB1HiHL8rl/KH4Z68//HgVXIshJXV2g3I cdVFHAceIgmZqOLHl23bm4WQ9HCbyhTHwhEyxwVT+WUPUp6DS4lXSMmA2uR3f2nMHlny 0t/3cuH9NH4hgCVpP6AFigq+57sKmnBMo59x23mH66HYJj0O8DSskvrRxwwVlDm6hAwC mvdn2Bw1vp7jawd7vYBGaxmzSPyXfzrCjymTnVECTOoZHu4inizQCJlqwQk3dGDoqCrQ 8VuA== X-Gm-Message-State: AO0yUKUpYE7UUil3pi+Sr/UI0a0KDqCpEOv3+qYkI5OgnULmFx7W7p6h 304h344bCB4Yt2hp8ewqjnwxWw== X-Google-Smtp-Source: AK7set8LRRjQl6lQLEVNGwZ+0gcThjUGm/9xpH5kwnxGoIMBR35JIMlsB+tSxqVDk6aJ4RD2FJiseA== X-Received: by 2002:ac2:5922:0:b0:4d6:ef7f:fc53 with SMTP id v2-20020ac25922000000b004d6ef7ffc53mr3535050lfi.34.1678194113951; Tue, 07 Mar 2023 05:01:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:53 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:46 +0100 Subject: [PATCH v3 08/10] dt-bindings: display/msm: dsi-controller-main: Fix deprecated compatible MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-8-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=1144; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dS1N11h2C4bKZ0sJcpp7JilD8JmZ3GC3KRjbGbtwF6E=; b=j/CpsyJ5hcGj4Xtxf52pKDseNdb0oMAW4eomJS4lqedzemS1xNJgvbpmqQMJyYoFFERldyqiFvqY oNpwyFyeCer8XmHhcOK5oX/9ZOJQHICK1L5Zr8bg/kwTGDpgKXU2 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The point of the previous cleanup was to disallow "qcom,mdss-dsi-ctrl" alone. This however didn't quite work out and the property became undocumented instead of deprecated. Fix that. Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC") Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml index 2494817c1bd6..94f4cdf88c95 100644 --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml @@ -34,7 +34,7 @@ properties: - items: - enum: - qcom,dsi-ctrl-6g-qcm2290 - - const: qcom,mdss-dsi-ctrl + - qcom,mdss-dsi-ctrl # This should always come with an SoC-specific compatible deprecated: true reg: From patchwork Tue Mar 7 13:01:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163429 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 2213CC678D4 for ; Tue, 7 Mar 2023 13:02:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06FE410E139; Tue, 7 Mar 2023 13:02:00 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 70A7810E4A2 for ; Tue, 7 Mar 2023 13:01:56 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id i28so17039255lfv.0 for ; Tue, 07 Mar 2023 05:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194116; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZF+P+KuHxf5dBJTVkEyyKo/3JePMMypQFYOBYKOGgac=; b=gH11q8jaF2QSf5Mxc8Ar3BA3u6PQu60JC7bmQnGCqpawbd/wBQpe6X56ikR28DQqvY fZjF3Kl/eMBQ6j3aNYSMVuxpYVK+HmHDOOHPYnCiO/lPzyar7SJhqms0+AahzOARALLm /cccSx/plO2b1ZtNU4OGxKjvuRyUfgoTu5ZzevyCLBCgfy3hRXtGiG7xBPzazn/VvWLL Ux89C9F3uySfkMlacczhdxawRtzOA9yiTzSypGR0p+LU8jXiIuzvU9XLUbkleshIgDiE mWb+Mj7QmUsnFgpcZeJHnhGSHaXkICre1QPPlx32EGHUkJUp75oEHzexeEkTs2gGC0PP hqgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194116; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZF+P+KuHxf5dBJTVkEyyKo/3JePMMypQFYOBYKOGgac=; b=DbzfjCrZGRDV9X8eavjg+6PJBkGEPb0fFuFPmEm1gxrFQ4THAoFaK2X5AcZuv+Os+4 NxwNXRMP3wr1l/jAxhqxXDFcz1ZKKwNEJPF0jaIuHU8yFseLnVXYpw1io2FVhTNee31e Vqdli2ZmPVZF6iDdsaVwS7k9ERpeqFrfyGfBvmLh8xTBu4VbKv6k6t2xiE7yC4c5JLnj f1fL8m0FuwCWWsCYKKWY4geHjS/oRW6vagz/004LOuWtPQ8NBY2KgNb/M5GjIY+qrElR tZHqHYE2uKHozTXrmHmZ28hsIoY7Ljy0itov8Bb/9KJlSD+3OlxPLRJ4xt1xsS+HgGqo do4w== X-Gm-Message-State: AO0yUKW7jmig5u7mZ4GDXBrJ8E6AOBEtS3HgWWmz1de03M4z8qznc1DQ L6+XjiYSYrCWJ5FEMCpFE+Z3Dw== X-Google-Smtp-Source: AK7set9xw8Dw5H4iw9qKZOv6rmUxjR22BePQJRIxzWdIatHaLcBQewJoS0t1ZGrUSx58OCfrYzITkg== X-Received: by 2002:ac2:46f8:0:b0:4e0:a7cb:33fd with SMTP id q24-20020ac246f8000000b004e0a7cb33fdmr3402725lfo.27.1678194115481; Tue, 07 Mar 2023 05:01:55 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:55 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:47 +0100 Subject: [PATCH v3 09/10] dt-bindings: display/msm: dsi-controller-main: Add SM6115 MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-9-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=1973; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=zfDVyzhXwH/WgE9j+QCB1vVza9+Omo+GX8sYcEeMzLs=; b=/RRmg0u5dKuyfv+1AQdnxpgBD4qmZ80GyzHiRnbNGFbB1XB8KCKMCe+pvq6H+onFvB4GUudLNBA4 dtnsYpKEBrXGhsLdy4zycKMVWSnnt7ctlAPE2Dw8ZsHOpD+zd1Mr X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add a compatible for the DSI on SM6115. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring --- .../devicetree/bindings/display/msm/dsi-controller-main.yaml | 2 ++ .../devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml index 94f4cdf88c95..d534451c8f7f 100644 --- a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml +++ b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml @@ -25,6 +25,7 @@ properties: - qcom,sc7280-dsi-ctrl - qcom,sdm660-dsi-ctrl - qcom,sdm845-dsi-ctrl + - qcom,sm6115-dsi-ctrl - qcom,sm8150-dsi-ctrl - qcom,sm8250-dsi-ctrl - qcom,sm8350-dsi-ctrl @@ -351,6 +352,7 @@ allOf: contains: enum: - qcom,sdm845-dsi-ctrl + - qcom,sm6115-dsi-ctrl then: properties: clocks: diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml index 2491cb100b33..605b1f654d78 100644 --- a/Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml +++ b/Documentation/devicetree/bindings/display/msm/qcom,sm6115-mdss.yaml @@ -40,7 +40,13 @@ patternProperties: type: object properties: compatible: - const: qcom,dsi-ctrl-6g-qcm2290 + oneOf: + - items: + - const: qcom,sm6115-dsi-ctrl + - const: qcom,mdss-dsi-ctrl + - description: Old binding, please don't use + deprecated: true + const: qcom,dsi-ctrl-6g-qcm2290 "^phy@[0-9a-f]+$": type: object From patchwork Tue Mar 7 13:01:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13163431 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4BCB7C678D4 for ; Tue, 7 Mar 2023 13:02:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E6D010E495; Tue, 7 Mar 2023 13:02:05 +0000 (UTC) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 958E310E4A6 for ; Tue, 7 Mar 2023 13:01:57 +0000 (UTC) Received: by mail-lf1-x130.google.com with SMTP id m6so16957403lfq.5 for ; Tue, 07 Mar 2023 05:01:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678194117; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ut4TSC+Pm5nzJkEcVTKrAQ4k73YguRqK0sCMCjuGo+M=; b=RctBDUqYGaVBaAXQf5/lse6b4+tNd03LMZwng8E/TBLAQUmEE5N66KheYcYYmKp2ht kOSzCu0nMnFVhY1vTG6YJHSgwI8/8K+R9sXn9mmQ51LqCK0aqDWzpRKWdA1NJpW6VzJ+ yZhicAGZ1Why6iRCQ00SZNqhyw8fAGhSdztQ1UEKaEYxrR7Rc1J/yE9S0Sm+k+1wUrEv pyPzfDonMbse1nMFTLryoyxJIej73IdfydVzvfOc3njvNk9lu4sVtHYe6M59tERvzo1t F31fGmrPRWsDvFqWqw6mDAx1GPMa63V3bCynZH4Y1R0oFHVWKZAKyCrQSQ+03P8g1ySJ UAvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678194117; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ut4TSC+Pm5nzJkEcVTKrAQ4k73YguRqK0sCMCjuGo+M=; b=A8nn0laCvbx8JIeILpglCRQ4IbDtipltggYcqkBBvsxtP+QNidkiT0utKE4GM36tOK sSg66jSGL8o/BCNFkVURZgFLdy0ARgrJ6hOhnlJMYtiwfwdpaa/a6oQiIS7kpf1eovD4 VEg0GC03U5Vk+FkFXWOen9YvzTQypLeNrGoX6jqdHeAKhue48KGI5h505DUuRx6twfa0 I0WIdBT/pfiwnCFuYklvm0L8Il2CxjWMu9QpAnlW54syt8Kux2dHWJD3sVaqjRLL06WC k1M6CBwHlJZX7pAbmdOKMQo45tvpYueAWiwTUHGB0daG63C6b0bzAxFT1CYq5UnHSgwZ qg4w== X-Gm-Message-State: AO0yUKVdQOuEUb+LPU41qCgvCj7djeDdeXsykte924Nu98u+4lM3k3Zk 9t45pyIYeNFrQduwWeyBXCeKHg== X-Google-Smtp-Source: AK7set9QFz3KRQJXUKWAKcSHi9uuaSO2igyVSU9CwQNTpt9S6qAlxCJmvrWEsgumpGjaPbhvrd//tg== X-Received: by 2002:ac2:44ca:0:b0:4df:7586:cc3a with SMTP id d10-20020ac244ca000000b004df7586cc3amr4114540lfm.5.1678194116959; Tue, 07 Mar 2023 05:01:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 05:01:56 -0800 (PST) From: Konrad Dybcio Date: Tue, 07 Mar 2023 14:01:48 +0100 Subject: [PATCH v3 10/10] arm64: dts: qcom: sm6115: Use the correct DSI compatible MIME-Version: 1.0 Message-Id: <20230307-topic-dsi_qcm-v3-10-8bd7e1add38a@linaro.org> References: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> In-Reply-To: <20230307-topic-dsi_qcm-v3-0-8bd7e1add38a@linaro.org> 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 X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678194100; l=774; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=+M7SeQ5R6naG5dqrsHPHLQ1roECLpDh+fCC/guUalJs=; b=uUDF9bfXttb4MlshbWaj4RoQrPAaqam2ks171eqq2ViQ+Fp+8e7De9vuIHXKvzypvVuVpo9pCPGz sHGReTBbADnojBvX1oHJF1d1QFDVvxIXHB8n8l5NDzbRrAL7cJej X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use the non-deprecated, SoC-specific DSI compatible. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 4d6ec815b78b..26e2c7919961 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -1218,7 +1218,7 @@ opp-384000000 { }; mdss_dsi0: dsi@5e94000 { - compatible = "qcom,dsi-ctrl-6g-qcm2290"; + compatible = "qcom,sm6115-dsi-ctrl", "qcom,mdss-dsi-ctrl"; reg = <0x0 0x05e94000 0x0 0x400>; reg-names = "dsi_ctrl";