From patchwork Mon Mar 1 23:24:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 388764 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3773526jap; Mon, 1 Mar 2021 15:26:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7/aVaRsCdaKnQHOydv4uM8HVRNQDeDgKsfiWLpPSaRxKRYOJilNgcs8mj1vw2xxaH5JK6 X-Received: by 2002:a63:5647:: with SMTP id g7mr15450620pgm.113.1614641189365; Mon, 01 Mar 2021 15:26:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614641189; cv=none; d=google.com; s=arc-20160816; b=gZDTVeBrtCAB4F+vK4CgfXwf8sSQshA96r9Nkn6sH20OiuOJ2uGokveJzhiRjNVNqz 1cfGwIKu6U1umJmzESIogc8r6Haz1nl5S79hqw8LLGaw2hSSLAli1AVPegOfpIwtxb5w NT3ak2T198sZHdeNMNhmp46ZrS8jNFpXYVgthxhhApHD+lDR9tTTcK+8MC34lHQIs8cW uJl+yM+LlPOdzMYbXG48PthmHXYploQ8CiPDHWiHV2hb+TVnQou3H4igEZk7WYEwKN+S 25+8gU69OrVkME7BHNBeIM04WdzAZECSP+HS27InV8/EmcGXHfhMm3SQmExsgC8zhU/R 5b2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=vPYbbTnj814/VYg3WRwev59LHoDxha0nz30Pl8Hbr20=; b=OF9FBomMYj+S3bgOTXnw+94Ie9F0FvQkgVllslMdlNGiX0skExnukkT6G70V0+Pm/g zlAuqqoIacbKsCQEUlcBIVeD3IeHit+IZRrITO0SEQjSFQ5otBs0so9+58F/s8FHHsX/ 0JpQobNmdbsdSLfWm7Xyf0Q1kFHL1u79q4pmPZbVqDZtZ8x8/MTxVoS6EUwUZDqkH5sf L+KrIzCIVB/JcH8AiIERI8KN6NF6x6Eg9G+Bt4Mfz2SfvIElttg+yLZ8MgZ8wmY6smKI LugsPQQpHCK/FOWKSptKCC9Y8m6lQdC5aHPTZObZX7+EcOEZ4n9nmTPIFSj73OSMbyr6 HnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gRaCJ8Yf; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s5si18442582plq.321.2021.03.01.15.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Mar 2021 15:26:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=gRaCJ8Yf; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3951989F27; Mon, 1 Mar 2021 23:26:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id C321189E5B for ; Mon, 1 Mar 2021 23:26:13 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id f1so28336724lfu.3 for ; Mon, 01 Mar 2021 15:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uhn5/C+evIA7tDsqUwWd+RbfLfedz+uHT/OEwoNKii4=; b=gRaCJ8Yf1K5j6xyskm6GAoLP+j9lIeUFP1E0Pn6QY8oGxrmkLJtq05QJ8/QLBQk0kx 83JSCWvMr4wGb3iuvfbhdqMDe+kBBmNuf8CIw/OGkFcBWKb9eQH7qtaUk7acq/GmTKzp 1kTiO5cqZpAKsI4cXfS1I/3cE0EZmGgoN7h99jf0lb6ixClUS9tGKcc5irTEnJf2hgYv RtQ+mBGnGsor3mB2L3NI779ap5FhS/UsNLCzt7tK7zcXvevcAsz0ymyQnCfmhhODUMwd 1Zv0zHwQDCcw8bVbxXduCmoMEzE/fRHFAYHiOMy6pHj3UssMqzlVAgftAPIk1kU71ZPF KIfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uhn5/C+evIA7tDsqUwWd+RbfLfedz+uHT/OEwoNKii4=; b=XPUezx+hybLBRuiuVhQFq6rzJzShMHzjEjEIQVGUyg1aEZXOOuDil7lpYvhx2Jtji0 dBYUik5qPa1J6IcmfrhjYTk+PEHB+9izWevEZu7BjVhhvsyadvlwgEQh1bMDXTcO0qzm QAgDL/hGjKRBPgV7rI0oey2MVHcGk5xv915tOg78FFv7ohfQxY3ibSfxCyafL6JcpuPj QMhydviysh4rDvEO4uMa4aODcNi2IDWM0syOY8qsHIsB/YYnul+WchHFB5onp1fLf+om 4zOoUILMcAFbq8e4zYlnUjiux4wEjJIiiNFFWoyFsvwHH/wf/mznf8I542hV+YZRGzAc rhBA== X-Gm-Message-State: AOAM531hHEvWtpEuSy0rz1Btbc8IyPmkNdYaPqlliqlWfDk0CT7k8iTJ k1HI7s3XKZmBd7NZjsflwrQnSg== X-Received: by 2002:ac2:5c45:: with SMTP id s5mr11391579lfp.594.1614641172224; Mon, 01 Mar 2021 15:26:12 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id b20sm154749lfa.183.2021.03.01.15.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Mar 2021 15:26:11 -0800 (PST) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Jonathan Marek Subject: [RFC 05/24] drm/msm/dsi: remove msm_dsi_pll_set_usecase Date: Tue, 2 Mar 2021 02:24:48 +0300 Message-Id: <20210301232506.3057401-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210301232506.3057401-1-dmitry.baryshkov@linaro.org> References: <20210301232506.3057401-1-dmitry.baryshkov@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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" msm_dsi_pll_set_usecase() function is not used outside of individual DSI PHY drivers, so drop it in favour of calling the the respective set_usecase functions directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.h | 7 ------- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 -- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 4 +--- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 4 +--- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 4 +--- drivers/gpu/drm/msm/dsi/phy/dsi_pll.c | 9 --------- 6 files changed, 3 insertions(+), 27 deletions(-) -- 2.30.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h index 21cf883fb6f1..a130330b97b6 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.h +++ b/drivers/gpu/drm/msm/dsi/dsi.h @@ -112,8 +112,6 @@ int msm_dsi_pll_get_clk_provider(struct msm_dsi_pll *pll, struct clk **byte_clk_provider, struct clk **pixel_clk_provider); void msm_dsi_pll_save_state(struct msm_dsi_pll *pll); int msm_dsi_pll_restore_state(struct msm_dsi_pll *pll); -int msm_dsi_pll_set_usecase(struct msm_dsi_pll *pll, - enum msm_dsi_phy_usecase uc); #else static inline void msm_dsi_pll_destroy(struct msm_dsi_pll *pll) { @@ -130,11 +128,6 @@ static inline int msm_dsi_pll_restore_state(struct msm_dsi_pll *pll) { return 0; } -static inline int msm_dsi_pll_set_usecase(struct msm_dsi_pll *pll, - enum msm_dsi_phy_usecase uc) -{ - return -ENODEV; -} #endif /* dsi host */ diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h index ce2969c63927..b8dd8072d24c 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h @@ -33,8 +33,6 @@ struct msm_dsi_pll_ops { void (*destroy)(struct msm_dsi_pll *pll); void (*save_state)(struct msm_dsi_pll *pll); int (*restore_state)(struct msm_dsi_pll *pll); - int (*set_usecase)(struct msm_dsi_pll *pll, - enum msm_dsi_phy_usecase uc); }; struct msm_dsi_phy_cfg { diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c index 799d7f44cf6d..339f7a56e555 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c @@ -1046,7 +1046,7 @@ static int dsi_10nm_phy_enable(struct msm_dsi_phy *phy, int src_pll_id, /* Select full-rate mode */ dsi_phy_write(base + REG_DSI_10nm_PHY_CMN_CTRL_2, 0x40); - ret = msm_dsi_pll_set_usecase(phy->pll, phy->usecase); + ret = dsi_pll_10nm_set_usecase(phy->pll, phy->usecase); if (ret) { DRM_DEV_ERROR(&phy->pdev->dev, "%s: set pll usecase failed, %d\n", __func__, ret); @@ -1122,7 +1122,6 @@ const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs = { .destroy = dsi_pll_10nm_destroy, .save_state = dsi_pll_10nm_save_state, .restore_state = dsi_pll_10nm_restore_state, - .set_usecase = dsi_pll_10nm_set_usecase, }, .min_pll_rate = 1000000000UL, .max_pll_rate = 3500000000UL, @@ -1150,7 +1149,6 @@ const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs = { .destroy = dsi_pll_10nm_destroy, .save_state = dsi_pll_10nm_save_state, .restore_state = dsi_pll_10nm_restore_state, - .set_usecase = dsi_pll_10nm_set_usecase, }, .min_pll_rate = 1000000000UL, .max_pll_rate = 3500000000UL, diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c index cd66b01ad17d..a141c37d86ab 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c @@ -1190,7 +1190,7 @@ static int dsi_14nm_phy_enable(struct msm_dsi_phy *phy, int src_pll_id, REG_DSI_14nm_PHY_CMN_GLBL_TEST_CTRL, DSI_14nm_PHY_CMN_GLBL_TEST_CTRL_BITCLK_HS_SEL); - ret = msm_dsi_pll_set_usecase(phy->pll, phy->usecase); + ret = dsi_pll_14nm_set_usecase(phy->pll, phy->usecase); if (ret) { DRM_DEV_ERROR(&phy->pdev->dev, "%s: set pll usecase failed, %d\n", __func__, ret); @@ -1247,7 +1247,6 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_cfgs = { .destroy = dsi_pll_14nm_destroy, .save_state = dsi_pll_14nm_save_state, .restore_state = dsi_pll_14nm_restore_state, - .set_usecase = dsi_pll_14nm_set_usecase, .disable_seq = dsi_pll_14nm_disable_seq, .enable_seq = dsi_pll_14nm_enable_seq, }, @@ -1277,7 +1276,6 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs = { .destroy = dsi_pll_14nm_destroy, .save_state = dsi_pll_14nm_save_state, .restore_state = dsi_pll_14nm_restore_state, - .set_usecase = dsi_pll_14nm_set_usecase, .disable_seq = dsi_pll_14nm_disable_seq, .enable_seq = dsi_pll_14nm_enable_seq, }, diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c index 5e53682c4275..d34ddf50c5ff 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c @@ -1061,7 +1061,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy, int src_pll_id, /* Select full-rate mode */ dsi_phy_write(base + REG_DSI_7nm_PHY_CMN_CTRL_2, 0x40); - ret = msm_dsi_pll_set_usecase(phy->pll, phy->usecase); + ret = dsi_pll_7nm_set_usecase(phy->pll, phy->usecase); if (ret) { DRM_DEV_ERROR(&phy->pdev->dev, "%s: set pll usecase failed, %d\n", __func__, ret); @@ -1155,7 +1155,6 @@ const struct msm_dsi_phy_cfg dsi_phy_7nm_cfgs = { .destroy = dsi_pll_7nm_destroy, .save_state = dsi_pll_7nm_save_state, .restore_state = dsi_pll_7nm_restore_state, - .set_usecase = dsi_pll_7nm_set_usecase, }, .min_pll_rate = 1000000000UL, .max_pll_rate = 3500000000UL, @@ -1183,7 +1182,6 @@ const struct msm_dsi_phy_cfg dsi_phy_7nm_8150_cfgs = { .destroy = dsi_pll_7nm_destroy, .save_state = dsi_pll_7nm_save_state, .restore_state = dsi_pll_7nm_restore_state, - .set_usecase = dsi_pll_7nm_set_usecase, }, .min_pll_rate = 600000000UL, .max_pll_rate = (5000000000ULL < ULONG_MAX) ? 5000000000ULL : ULONG_MAX, diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_pll.c b/drivers/gpu/drm/msm/dsi/phy/dsi_pll.c index e607adffe001..98ee4560581a 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_pll.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_pll.c @@ -113,12 +113,3 @@ int msm_dsi_pll_restore_state(struct msm_dsi_pll *pll) return 0; } - -int msm_dsi_pll_set_usecase(struct msm_dsi_pll *pll, - enum msm_dsi_phy_usecase uc) -{ - if (pll->cfg->pll_ops.set_usecase) - return pll->cfg->pll_ops.set_usecase(pll, uc); - - return 0; -}