From patchwork Mon Feb 13 12:10:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138360 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 B8077C6379F for ; Mon, 13 Feb 2023 12:10:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 970AD10E588; Mon, 13 Feb 2023 12:10:20 +0000 (UTC) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 434F710E588 for ; Mon, 13 Feb 2023 12:10:19 +0000 (UTC) Received: by mail-ej1-x62a.google.com with SMTP id qw12so31325845ejc.2 for ; Mon, 13 Feb 2023 04:10:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=sLkh67ooWyVObn1J2I1Qu7dXdNbX+Cd0UoL9axKT34o=; b=p8WGCP9v5yIWbqJlLQRmMt4chiH79pIdn/7AB+4u36M/TTmmzVK1ZVLXeajFDjlSHT cOO6it7vveZEhpkGjAAqnz+csbNPwy1aG25sAbzN4xBu1iIBCSLIb+fADM842f8D4gU1 vQ4YjvIWiUj59NG7bCE+aUwx3nanN3FFInJXJjsDakUUBBnZAw+6/B6KYznfiPE7vDgR x/+Qq/jef9admT0KChEbH1aLvyLMslwfGF3JUJ/gV2UvFeChYwTlEswgOF0tTQtk4ig4 SmoFfdXxu1QehBVPm4G9hbjnzNCyjRlo/EIr6YaxVp4mWcB6aW2elIkYazjylBN6HoKN 8Xrw== 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=sLkh67ooWyVObn1J2I1Qu7dXdNbX+Cd0UoL9axKT34o=; b=2NFXXNAxibj6Yn6y6m652GMaXbCZlNCopAMBnogZyrxKoZRLO8J7McVMlkWT/vz424 KwDlC+1THYkRiB77YUPQk5J5O3Xnasyf/dehUmUz9RdWiO3YfjqfKlC9RvWf8MzUpODd ZLDlaLSZwoBSNO/fjCJrGMc7Yvc8b06hWwRk4sY9BHxGqGwbEd+7M+6XXOo6SkQYzAYt y/JndzGU5mYJxE5A+0mSRcpF/o5jxV+Q85EJNOlyUuGbFTbuiMpjo5IF6Wnc+svewzpC AHOra9umeTfxWOd3zcYL2Nu+PyK/+F3jOk+laVrZdFfac95G8sVSfRNRL76zo0BfYXWx OvGg== X-Gm-Message-State: AO0yUKWWv+BI7DpXNR8JtJ7N1Y3SyRspvIPfg6rsXtIUYd9Ybdyq6qjC qCBa1QjFK4tn7D4zra0LFx226A== X-Google-Smtp-Source: AK7set81z61FZiKoN0s7dy9ixfbbUA4wWNKA2rBI/8l8V7YwRzxhtMm5RnVtHF6TGfXBlSD4ZM0jEA== X-Received: by 2002:a17:906:1908:b0:878:5f8e:26c0 with SMTP id a8-20020a170906190800b008785f8e26c0mr17900635eje.7.1676290217679; Mon, 13 Feb 2023 04:10:17 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:17 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 1/9] dt-bindings: display/msm: dsi-controller-main: Fix deprecated QCM2290 compatible Date: Mon, 13 Feb 2023 13:10:04 +0100 Message-Id: <20230213121012.1768296-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: freedreno@lists.freedesktop.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Abhinav Kumar , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Rob Herring , Krishna Manikandan , Bryan O'Donoghue , Dmitry Baryshkov , marijn.suijten@somainline.org, Sean Paul 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") Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Reviewed-by: Marijn Suijten --- .../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 Mon Feb 13 12:10:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138361 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 51EC3C636CC for ; Mon, 13 Feb 2023 12:10:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4695A10E591; Mon, 13 Feb 2023 12:10:26 +0000 (UTC) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D5B510E590 for ; Mon, 13 Feb 2023 12:10:23 +0000 (UTC) Received: by mail-ej1-x62f.google.com with SMTP id rp23so31255116ejb.7 for ; Mon, 13 Feb 2023 04:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=XBhzuhNM7NkSSplcxwh545i2vRIYXp6Q58I+x2Dr50w=; b=BBuNyU0GRinWhiIGAaqfLo2auMIm4XY8zH2oQBzzD4CYEcfunorOoPuNGmPjbO4DYJ y0/TrHQkiGt8g1wgslyWUtUJrHiHWTfUsgBy49+aLu5ZfOB7vIwTNherccZAlrfYPv1a CZYgfpu5wF/nRvVv/BYdFGlPEsxRBNM/1OPPYYrVHBPmK7IrgbRGxOiSm4W5uLah8Mms QEsi9/yxznsMOo+efvp9xoOeNP3ZM+0KjZ1HdFfkL/pYYhOLNyYYDjZYmG0D9mKCgaFS SFouTDAxrB6JxTys43yJmZiD+/GF6ECQgbT0Q7co4Wt2H7ZVRGJDOAVniKjS5qASTAPp jOGA== 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=XBhzuhNM7NkSSplcxwh545i2vRIYXp6Q58I+x2Dr50w=; b=4N7ShqRBc/YuUuwVDJro+OnsiId65jciI1dFIBsid/8S5UzT6ZCE4LNS57dMNfxY1s FtO0MSaAPSKUlRJ15VynsyLuTwaFE8Tr0RasYMoxfy3VGmrDK0Smy5OIxdMAcHgae+FE Tgq8JAEHqEBUzal+j7sisZN2tMYafybUWnL3M4B3jFGhotDxXThSObjR2PKI61xcRuz1 U1WW/Z/w+8UHAme8Z5xHRmqqki1ngqZKKVSO85dA7AefLpHgfx6SnXKiGCyEB1IR63Lt 8z8vcPH4K5gyQz0Q2LRZSBRlO2kh8JAMotHCp1tfDZPBA9U0GnSoJuDIk6LkGZdWvLcR hEpA== X-Gm-Message-State: AO0yUKUQ1t2kYxD9QvnljO9DII2SnfRYOj7wfwWfKR6BiVxKumVQg9zA fd38w0aLeqpFOxsauzDPJ2G9vQ== X-Google-Smtp-Source: AK7set/8IIWOkcrwvpOhvw+pWzKlb6hcwdVmjPBD+rVDtEYl4I8O3Nzkq6P/lP5b8mn4F7r2mdhvCQ== X-Received: by 2002:a17:906:4913:b0:88c:9b39:23c6 with SMTP id b19-20020a170906491300b0088c9b3923c6mr24353289ejq.14.1676290221727; Mon, 13 Feb 2023 04:10:21 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:21 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 2/9] drm/msm/dsi: Get rid of msm_dsi_config::num_dsi Date: Mon, 13 Feb 2023 13:10:05 +0100 Message-Id: <20230213121012.1768296-3-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Neil Armstrong , Loic Poulain , Vinod Koul , Vladimir Lypak , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , linux-kernel@vger.kernel.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). Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- 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 Mon Feb 13 12:10:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138362 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 A98DBC64ED6 for ; Mon, 13 Feb 2023 12:10:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41F5910E592; Mon, 13 Feb 2023 12:10:30 +0000 (UTC) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2ECB110E592 for ; Mon, 13 Feb 2023 12:10:27 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id p26so31216809ejx.13 for ; Mon, 13 Feb 2023 04:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=X1p7GyMiFl6B+M8ooZ4rzUDYUkYWhAen7YZQHaQlBug=; b=a+N9Hh9Vvx8QQvZ7yjPj1W8RXjvaTVSookTsfjtBbnhF4iWdP5UYFfla4icv/UhdFF kFKkASlSY5Ws3D+qr4rwDfpg7StZ96z29PZqRo/24qeYlz5y3yQKWwUd5uR55Kvmljg9 uDCDGIsvKaPI8xcw/xY/yfKg/S9UdLPkZY9Vieb8S6VKyZVI/GCPTG4tdYb5esG/ilDB vqlk10DphZox1A4YdJBoPyqIFVkCeBIS4m9Xx0gFAsUkdu8wJwIJ0hfPFy7ncc2Xs3MB Nc23cVGrAaqcXWbY0rHkXf+lf9w79WpqXBYMwrOdQBnyLE77AESXetvBVjF+CScfSjex fL5w== 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=X1p7GyMiFl6B+M8ooZ4rzUDYUkYWhAen7YZQHaQlBug=; b=OQ/aX5gLTJ+c+OvYtiI5NpEceG7VahuRcpyLzw7p1crIS8Encc8KPKs9oHaG4jhCC1 iIWIiWpfTFLa+a2Oo6sfYoy6GFT9uXE2vc8lLVLmo8CLHLy7gdf5ptwyCFK8AcRyGKN5 w3DoJ+ocroKvw4Bqm+4Kxse9idQ77Ein+Wd6SivF5IlUhcF63Iwg6d8hl3JtqrzEWbuA mSvhj3pKkRz2SOMGApaVvmOqsMuPUFZOGyg1Kxc+flqzGn4z4/BOkjy5Y70ynqpcqQmp RkqiKkqcWRPCjkZirlDKt7Aa9eKMIxS3bUg8jZRwHOKsbxvGIyF1rV9kIz4IPs/btDNB GsWg== X-Gm-Message-State: AO0yUKVYhr7LvkTZoBB0fFg8ZDsXo008vSDh2kp+DSNxbPeT1vNhuf52 Ska8vPd5XfQDcRD9PvPW/wzuSw== X-Google-Smtp-Source: AK7set8yZ1TeVY0DFnpmeCMlGrwc4QLe6iCNIvbLzU3DHuynekD2tECYQdwMGP3YAqaz2A2ATgoQCQ== X-Received: by 2002:a17:906:fe4c:b0:8aa:be5c:b7c5 with SMTP id wz12-20020a170906fe4c00b008aabe5cb7c5mr28378785ejb.41.1676290225707; Mon, 13 Feb 2023 04:10:25 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:25 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 3/9] drm/msm/dsi: Fix DSI index detection when version clash occurs Date: Mon, 13 Feb 2023 13:10:06 +0100 Message-Id: <20230213121012.1768296-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Neil Armstrong , Loic Poulain , Vinod Koul , Vladimir Lypak , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , linux-kernel@vger.kernel.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. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- 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 Mon Feb 13 12:10:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138363 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 94B3CC636D4 for ; Mon, 13 Feb 2023 12:10:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E89810E58E; Mon, 13 Feb 2023 12:10:32 +0000 (UTC) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DF9A10E592 for ; Mon, 13 Feb 2023 12:10:28 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id sb24so7328338ejb.8 for ; Mon, 13 Feb 2023 04:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=vNtO6TjtSJEcp8uPwtQuefcLvw6u6ONtxjs37g8Gm+4=; b=toYQaFXONrXRhcBi2/hw4dFUyhYBRB7y87GTU4Y3klK3WIh2/uojlLE5PuGh5xcMTo i4tnKd/9xLb6WIiHTyIVSfDnRmJp6YE/wtXaunfK2/hlmGOlKcJ2+D7LG4ZvuV8ilmk9 3Bue5mpoKtVVoa8G0pnbWlKaxmTQZVMxOPJJTc4UxtNn27hpuHtphGJMZI8N1YQjCGC0 EIMfxN3ypFRJMClIQ2Zfb9sckLN/A9nDfpSB4tFeiFAsfZUZF+chkCbH3N7rB7Ib6itM DAK8Uh31Rrf/AAEuPq/JAtje50o8BBtM8UA7qsrFLsl6AEBUpE1OyFB5HjQT6Eiv+OIv B18w== 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=vNtO6TjtSJEcp8uPwtQuefcLvw6u6ONtxjs37g8Gm+4=; b=4gjT1EU3ruc1RcylfXPHN8oyEwpvC/sDZLfbiSwVL/YGO2mac6y8YSb0jXY2ohJ/HU bKE7HZiuZ/Gix9lPv1+pgy0w/kWigDxCVAmBM2dsq70BTKecOYV0UPYT95YzzN6/mrkT RoY4Rtp911qz9rr7a7p7STtZtcWLHFsL66znHtswIP0kO1vjzSe4vgnlSPuvObRHjnMq WEiRN1hFRLdgCbGUZC++d42Cb3gek3yLR2pnmaYnNtQxJZaIRc+FriBzanwo9ntpn4j+ f1Cg6TBWjcJ/R4Ew7+Zg3Plqk6p+YJ0Ri3SVqgarvvV9OGG4licp+XuqtONsuns5jfPx 2R9A== X-Gm-Message-State: AO0yUKXOp/TyT4nZVjLX/DqJ+Io25+qa9Nlz8eQ5AWjai/J1OAz5PNho qKuCJh0KjiCR42JIg5NWzxeKag== X-Google-Smtp-Source: AK7set+2HZz0BOon+XsyYOSj4boCldns/BHsuJJeXI+oH2c45FDwpraOuwUwCHEGTa8c1INQ+1A1mg== X-Received: by 2002:a17:907:6090:b0:8ae:3380:ff56 with SMTP id ht16-20020a170907609000b008ae3380ff56mr22903380ejc.63.1676290228220; Mon, 13 Feb 2023 04:10:28 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:27 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 4/9] drm/msm/dsi: dsi_cfg: Deduplicate identical structs Date: Mon, 13 Feb 2023 13:10:07 +0100 Message-Id: <20230213121012.1768296-5-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Neil Armstrong , Loic Poulain , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , linux-kernel@vger.kernel.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 --- 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 Mon Feb 13 12:10:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138364 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 AAD45C636CC for ; Mon, 13 Feb 2023 12:10:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 20BFE10E58A; Mon, 13 Feb 2023 12:10:35 +0000 (UTC) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3218F10E593 for ; Mon, 13 Feb 2023 12:10:32 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id n10so4357066ejc.4 for ; Mon, 13 Feb 2023 04:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=5CCpIfLPbXHR0+gI6eH61855DNORB1t4V7ruf8s/UBM=; b=e6Aan7qtCOxr5uDXtDUzG8ZzspEzCH1OWMJ0ANGQcXzyajvonRNGcX6E0PQhMK4ubp EsPdEK1Wt604WHWLzA3gocqn/O1Yq94/qGEba8CgTeyagFyb7flx3QKyfofC3W/xkCgX o+sXtRr2XFkzKQ1IHWlOe974Tx8NyoXi7U1wDyvxRwE9dY5XiLtkhS4ZD1H0NH8ZWpoL QmsZQtnpFQUC6s9T5aIBzqb3aZSSAp8pptCpVljhu8TnskssVtGavxxFQh6KU+/uJ2Ku jWqb8xl9JCMUm2kAVGuq7rgS1xyblVvB4EaXZwNwCI1JYGR/a6KtL9g0vx2gUxCoc6p/ BErQ== 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=5CCpIfLPbXHR0+gI6eH61855DNORB1t4V7ruf8s/UBM=; b=w/26wArcW8btnupShe3kT/n6RjyVDPSA9u6nNlBMCrT8W3OT6lEFmJy1JuA9eakaoD zPKsGDQAriAkZ0LAWBIyOd6rqYmEt6HbhBUrg0QKxIRXjL3cMgqr5swTmwYCUUkcJ25e on7j4rNt2lbK8ZpNMcpegTjKmnNf8IpkxTIkhesNYj6ZxS0fnti/bb68/skxE8QoDHih FfVRN4UHbDcx+Tse/dRADVbv6uxMyof2Wa1WkX4KRS+U3gvim6MwbYLBhpChE88KMYm+ t90BS4mW62ElE+BLwluAbE6c3/T1kQtIPi5CL2tMePCgf2MfMgNVpYXNLQ7r8qINacSc MvOQ== X-Gm-Message-State: AO0yUKXwFDguGIQqQEts3aATSkUn3W2mKDvv7R8b1KbQ4VV3KkQK+pIe WkMsqYDf1irsSEGR8WACaSe00A== X-Google-Smtp-Source: AK7set9FUwNWxLhIYL/63n4aMNiaV4/BAVMRT1B+FTa/0pk9vzPH8kUQq52WhJU8S50AgOqvsrqlYw== X-Received: by 2002:a17:906:584:b0:888:6294:a1fa with SMTP id 4-20020a170906058400b008886294a1famr24306942ejn.14.1676290230754; Mon, 13 Feb 2023 04:10:30 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:30 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 5/9] drm/msm/dsi: dsi_cfg: Merge SC7180 config into SDM845 Date: Mon, 13 Feb 2023 13:10:08 +0100 Message-Id: <20230213121012.1768296-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Neil Armstrong , Loic Poulain , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , linux-kernel@vger.kernel.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 --- 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 Mon Feb 13 12:10:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138365 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 0BD5EC636D4 for ; Mon, 13 Feb 2023 12:10:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B44E310E590; Mon, 13 Feb 2023 12:10:38 +0000 (UTC) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8327610E59B for ; Mon, 13 Feb 2023 12:10:34 +0000 (UTC) Received: by mail-ej1-x62a.google.com with SMTP id qw12so31327845ejc.2 for ; Mon, 13 Feb 2023 04:10:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=8/ijGdXUpk/bOx95tYb/G/O+ZlxWtjcaYyWfUGg3pEc=; b=DQNyvOFFReWgBK1ik8krxhrLtoU4RC3T3FNeQZM+IOH5fE25SpEsOmynkFIcOly4zE 5vTQcN9tsmTUaOxhE1XWjX74cAr31Fv7gx3dNDnI4FAuIj6/MPPIE6+p1riWKtProoEl 5XUuTj1eTuMnNnoe60nTOsz/Dq8xyj0q4Wrenh8d+E0c9ab8VekE77Ym6zG3GyOn8+VG fONx6Tn4uDY7rfUVo+d3EW8+id9Qbsfz4k6SdlUeaL4r2mjYVq3QdSFB4ioj1xc1ARZt U6uWRirFXGKLwXkxc926LYP8ixrmsL7OqcJw64yMqxPd4UdwE9e2GrOQkyGEA1zlRqqy x27A== 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=8/ijGdXUpk/bOx95tYb/G/O+ZlxWtjcaYyWfUGg3pEc=; b=DXuFTifI4MpnZ+m1S40Moc/+f6snJ+1z4uNE+NUzoITkrJrwr2Hpbi63LqhZYhNHvF 55CZ/1ymzdDdS6+ywTTjyhvIexxYzSGxC47/dWJk1YDOHOx3XB2aS43M4RWXudyVvDS3 6uHGfPBaqwjYBxVn/opXvV4qrcgQnHW2gBsgLTQxnLaa1ZPEFF25OdBYfvYxbGRe1SPJ Sjl3YfreOuQt8jCPgxuRk69IqYxe0I3EhUeVrPjIB+T0QtUyhVKxfUiG8Nz870MtcEPq 3FuqTaNNHAHpLDU7xRl3DDmR4XXMp3tNrsh8c0x56AO7H2b88neHTTZ6/AfoaXLtYRlx 3+qQ== X-Gm-Message-State: AO0yUKUw8oCeOkq9jh5uRr4C5UMs7PVCItCRwS42x7DsjmTw5W05GwAa 0PL9wEttYA0YaSlXVQLkPvRB/w== X-Google-Smtp-Source: AK7set8VRfGa+KfnQjVhfn3F5v7L1J78Hco7aKsO/3w9H+E1cGLytKoet1JVeXmFGI7XmTc+P8cJiQ== X-Received: by 2002:a17:907:1ddc:b0:886:221b:44e5 with SMTP id og28-20020a1709071ddc00b00886221b44e5mr24043584ejc.62.1676290234028; Mon, 13 Feb 2023 04:10:34 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:33 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 6/9] drm/msm/dsi: Switch the QCM2290-specific compatible to index autodetection Date: Mon, 13 Feb 2023 13:10:09 +0100 Message-Id: <20230213121012.1768296-7-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Vinod Koul , Loic Poulain , linux-kernel@vger.kernel.org, Neil Armstrong , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , Johan Hovold 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. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- 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 Mon Feb 13 12:10:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138367 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 9912EC636CC for ; Mon, 13 Feb 2023 12:10:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9286A10E59B; Mon, 13 Feb 2023 12:10:42 +0000 (UTC) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA61910E59B for ; Mon, 13 Feb 2023 12:10:38 +0000 (UTC) Received: by mail-ej1-x62b.google.com with SMTP id jg8so31298883ejc.6 for ; Mon, 13 Feb 2023 04:10:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=W/kPvMZiwgDK+KZq9Kf+lEuw04CYRxX2KFNzK4CB7Pw=; b=jMzFgbQ0fUe+4erNDvsfQTczPffpIp1t3k7O7tJhiPwIdCtYM+LM5pICdn7e7aqDvJ FhV2wU5125wBpyZqKBPD4oatdrTOkpv78KhcKieVTA31YzenyPoCe04XSFgXbKP8ya4T ZbQ6poWo5m4nl7GtVy4nKWGyJe+UVfT25kLdjxSkVcnfyQ9OPrpmrF/exUckeBgDln2i 9oc5meWaJgngoMFPr3z34EFEjPglCKPMthuBIxto4VNRZrU8GP2BEKtYiLG81m7EOQhE 6PyVlX45x58ss46CYbSKjyqgUho+TI46cNjnW57JnRR9jVBnXWIRN0lqQh8JdxsFJopr PeBw== 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=W/kPvMZiwgDK+KZq9Kf+lEuw04CYRxX2KFNzK4CB7Pw=; b=4HeLJZuZUakGDLMB1ouB4s9tvUm+5rxi2V9rL8kb30dL0iH4kahdMXfYEJG2+Qjbs+ lkJETF4DmjifEnOyzpJrw2uMeLeuPuZ0Jrl88bc5MRd3bWPTzNkCYvdB42FC8adH4qlo kTpQbuXfML5BsB2sli4RmqJkD1PWxe1n8lDbFj/H8n7yNGIKEwggiavaYlG+/U3w+FC+ r6duqRDovymGsVjBAO/pLg3agTOSZ9sz7CUB206MmXtutO4TtGtizK14zT6IrAdOH2dy D+J8SqPne/oKAnN3h6e7PABgMe6SxrfcdQn4l8y83loIp1ruq39iZ0gFTrNgvM3FSbiP g2nA== X-Gm-Message-State: AO0yUKXttQCdWIx77vQxi1nbcwovovUbPmhW7cXyVI3cEjEM58h/O8h4 9S9brfyLH/47vzvQ4bVl95QDwQ== X-Google-Smtp-Source: AK7set/SJhRGtx/3GLxajWM1yaOaxem6JoqH27SsAme+rzLOiTZ1xSMA18qD5+XtxWSmj5vuNMVXBw== X-Received: by 2002:a17:907:804:b0:8a9:fa2f:e440 with SMTP id wv4-20020a170907080400b008a9fa2fe440mr28641469ejb.55.1676290237351; Mon, 13 Feb 2023 04:10:37 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:37 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 7/9] drm/msm/dsi: Remove custom DSI config handling Date: Mon, 13 Feb 2023 13:10:10 +0100 Message-Id: <20230213121012.1768296-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: Vinod Koul , Loic Poulain , linux-kernel@vger.kernel.org, Vladimir Lypak , Abhinav Kumar , dri-devel@lists.freedesktop.org, Douglas Anderson , Konrad Dybcio , Dmitry Baryshkov , marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, Sean Paul , Johan Hovold 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 --- 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 Mon Feb 13 12:10:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13138366 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 C7A91C64EC7 for ; Mon, 13 Feb 2023 12:10:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 957D510E59A; Mon, 13 Feb 2023 12:10:41 +0000 (UTC) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFBC910E59B for ; Mon, 13 Feb 2023 12:10:39 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id p26so31218531ejx.13 for ; Mon, 13 Feb 2023 04:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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=ep4dAxNDBfiGXuqBk5NhBpEX23ggwEaT57AExj6qK0E=; b=eGCWScynR/KATjl4CR1NQ0awa37mNI8v0bJtA/rygcer1I0LVc7i04Jp43z2vUlwgn a+ODzt8JJtOMHJOwKcCsq7PmgRM4WcbMAMOhQTU4Ci90i6K301aHcKQZccfvxfyaNlVl qdpImCNac1yuuItnpKBJdB6tXjAMeE+rAK9UAEKMKsNuUjIwN5FrnvTlt+JfeE388AzT 1WMdLj1Yy/arp6lE7YgTtFbdACRVTqZNkLGtqBdxfIyyiH5WVbvZ2iqgvpSSuTpYFMK0 Rx7E/iMJySn0UCfGQ882aKjZRwOjoh6lAECPD324X5W2V2SMOjomSR8NJ8OIcKr9EB/k 8PyQ== 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=ep4dAxNDBfiGXuqBk5NhBpEX23ggwEaT57AExj6qK0E=; b=w1tMl0j70DbadkdYizX35hia2ihrEXG+Vdy1dwFKdufvHH2xs9Of+xWI5e7/U5U//D iFTUL/NK9pX7mrIFFaTyy6XfzsFFpW/lghWnEDHseSsbLvjy4wELlIMzxL4mo/FUzefZ frufiHEJVYA0lXaTMcuXNYKqR2PiH9Uq//aAzWQHOXpr/st3R0Xb1ca2XReIiXaH8tP1 +HMilPpwoc5mnO6rofvTUZbtuzMIV0K1Q3Z7R5ZAGPwFCt1zBjppeOewmi5PgFtg344+ gqgtkTP9SAZ/klFwSpsstuSspoQsREomCleWMfDJZ2gJkshU+NPRoALSjIrNI4Ztl5HG a5/w== X-Gm-Message-State: AO0yUKUkIe/oVt1oRGzZFz+RSFZ0R9daTGfE2DY4Du4hJYHi/ToPcFOn F97vdT9zy9bAVmyaAbe+7K1PCw== X-Google-Smtp-Source: AK7set+oaFvbn6bdk7MKi3sYaFLAIXKhNo6TsrYTdMaZ19tEGQAs+T1gzlVpdLZijLrJ/9xVXmdmjw== X-Received: by 2002:a17:906:988b:b0:88c:3a48:715b with SMTP id zc11-20020a170906988b00b0088c3a48715bmr26558712ejb.30.1676290239364; Mon, 13 Feb 2023 04:10:39 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id dt19-20020a170906b79300b0088ed7de4821sm6651586ejb.158.2023.02.13.04.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 04:10:39 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Subject: [PATCH v2 8/9] dt-bindings: display/msm: dsi-controller-main: Add SM6115 Date: Mon, 13 Feb 2023 13:10:11 +0100 Message-Id: <20230213121012.1768296-9-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230213121012.1768296-1-konrad.dybcio@linaro.org> References: <20230213121012.1768296-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 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: freedreno@lists.freedesktop.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Abhinav Kumar , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Rob Herring , Krishna Manikandan , Dmitry Baryshkov , marijn.suijten@somainline.org, Sean Paul 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 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml b/Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml index 2494817c1bd6..f195530ae964 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: