From patchwork Sat Jul 17 12:40:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479232 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346496jao; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOPsqBTLlNykTxBNSDhXlaVUlj1I8q08a6l9w92ZdXalgBJ3kis+zoM9xZ888dVsifeDHi X-Received: by 2002:a6b:f41a:: with SMTP id i26mr11082576iog.162.1626525626090; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525626; cv=none; d=google.com; s=arc-20160816; b=dYKwB3AUsekxkAlTTS61xFrss8fTei5NbCmGlxprhoaVybHY6nr+w4jpZaWwoEKFOe T7mI0paFxgrG6c2+8ItRobHodx5adz0/I2x0mbRoo0TjbDOWGN9b794EWz+BPeixsnUW BIF1r/42DLw25ByHAupbiyVTkRwelS2olUPX1azNJAxLRr5papYBHISpg9ruawb29+3b hw0eidjZ9AbVhrwB10cfoy6HcLyckxowSCgpo97lSuOrQ87zwjCRQxgkuFymC4XzE8j/ 4a4ZOghkD7soVYz0cqNrInsXYAMgnCvzruiahYnWEk3JMJsEgFN5V/ZstczMtAshWebL 4Pxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=j/O9I6LsCmUmZCP4Xo8t4h9lRMmkbMnDcDvW/SPU4/I=; b=NO1i3DJAIQaaqM5b9x3bu5WM+X+S5lYmUQ6HRv4xDcb6q/8ACiqwoOUQkl4udD7UAE ZXoTLBlG5/wz7Z50/OK0un7t5EFIbU6JyI/McFUx6bvx8ndGrkjEUhXOVZpQsIa6RIdm YkqHpf8SpotY7RV4HDN0PZlk05do+r7fsrIDBQ/w8NHXrqGQ3nJl2M807jQCKLCo06w4 mu2/tqIJATU4GZbAEVOlnBA4numx81H4a+D7nNQEk9fCs6Wpi0YqJybCt3+zZe4pmrJT aedzzvk50LYg1KG4OpRhpUSWB0GXNAgS/dwMQboqZBrw2+9MGI8DKjN8+M3/Y12kS32S 4Fyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="NC4p7/kn"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.25; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="NC4p7/kn"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233521AbhGQMnV (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232040AbhGQMnU (ORCPT ); Sat, 17 Jul 2021 08:43:20 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7FE1C061762 for ; Sat, 17 Jul 2021 05:40:23 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id u14so18049675ljh.0 for ; Sat, 17 Jul 2021 05:40:23 -0700 (PDT) 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=j/O9I6LsCmUmZCP4Xo8t4h9lRMmkbMnDcDvW/SPU4/I=; b=NC4p7/knvZ2dlfjVgL396lJSRbXyuTMAd4qGop7vQCQkHYKh+wjIdzORxiRatNUtyY S7VVxkwlCOfs/EttuKJTKYT6pl+ZZYOfLKKqk28uLPuRUnpxVs0MpzodLa6nCI9q96jq xxN8XUqtqrkpcT4mKXyiECD9F12Dgyj7efV7T8FpOZHD/hQmX3mjb1nPhwYyS6tknFzJ j4D6rwN0WQeGtsKI0ViOvkC+0auN8kkt3/iYgYGxGmgxwMRyz29tCqc4eqsiz9G/3LPs rhQNky/70MD76NGN4GjJv/oJac0NrH1yVa2FQ/rbfZUxjlz5Z/1p3Z7MIOCkmaOY7k3l m+JA== 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=j/O9I6LsCmUmZCP4Xo8t4h9lRMmkbMnDcDvW/SPU4/I=; b=bJ8AuHfNhDeNlsQx/oDAJk5tvMfFj0RVLlGEhFBn9e0LGzR8q/zSI7cTC8dGx3PR+t hgqfXYc+fJNsXfEW+EtYip4PcM8vjL5c66vMdivvdrgCIiIc96+Pm/tWpJmbM396Fd/g n1Igd6SLTq0Ww9Vk+naSyjJumBdmuSGJOvstJjzhLwam+WWi2FDNeNmOHgAsZKSq9nBZ ZLEn08bHLZRC7jedE6toa5Xsa/EA8fnBx6qJ0RNGPOOyvp77fvC+VBZUWHKhiDyABvlV KjC9I6HpSSXHhb4llDTh2UvrSDqbNvmwVTh8vibpTTUuPYV50h6fKuKSsBGYpjltGCCz MKVQ== X-Gm-Message-State: AOAM531IcfNKYdapfZulqbCTgpJHr1EV/I9N9+MWg3tk+n5B2A1oEj5h waxayCC8wQTirSYVNvSYXjwxdg== X-Received: by 2002:a05:651c:1143:: with SMTP id h3mr7676496ljo.300.1626525621936; Sat, 17 Jul 2021 05:40:21 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:21 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Date: Sat, 17 Jul 2021 15:40:10 +0300 Message-Id: <20210717124016.316020-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org We are preparing to support two independent DSI hosts in the DSI/DPU code. To remove possible confusion (as both configurations can be referenced as dual DSI) let's rename old "dual DSI" (two DSI hosts driving single device, with clocks being locked) to "bonded DSI". Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 2 +- drivers/gpu/drm/msm/dsi/dsi.h | 8 +- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 2 +- drivers/gpu/drm/msm/dsi/dsi_host.c | 34 +++---- drivers/gpu/drm/msm/dsi/dsi_manager.c | 101 ++++++++++----------- drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c | 2 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 6 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 2 +- 8 files changed, 78 insertions(+), 79 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c index 81b0c7cf954e..1220f2b20e05 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c @@ -737,7 +737,7 @@ struct mdp5_ctl_manager *mdp5_ctlm_init(struct drm_device *dev, } /* - * In Dual DSI case, CTL0 and CTL1 are always assigned to two DSI + * In bonded DSI case, CTL0 and CTL1 are always assigned to two DSI * interfaces to support single FLUSH feature (Flush CTL0 and CTL1 when * only write into CTL0's FLUSH register) to keep two DSI pipes in sync. * Single FLUSH is supported from hw rev v3.0. diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h index 9b8e9b07eced..856a532850c0 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.h +++ b/drivers/gpu/drm/msm/dsi/dsi.h @@ -109,7 +109,7 @@ int msm_dsi_host_enable(struct mipi_dsi_host *host); int msm_dsi_host_disable(struct mipi_dsi_host *host); int msm_dsi_host_power_on(struct mipi_dsi_host *host, struct msm_dsi_phy_shared_timings *phy_shared_timings, - bool is_dual_dsi); + bool is_bonded_dsi); int msm_dsi_host_power_off(struct mipi_dsi_host *host); int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host, const struct drm_display_mode *mode); @@ -123,7 +123,7 @@ int msm_dsi_host_set_src_pll(struct mipi_dsi_host *host, void msm_dsi_host_reset_phy(struct mipi_dsi_host *host); void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host, struct msm_dsi_phy_clk_request *clk_req, - bool is_dual_dsi); + bool is_bonded_dsi); void msm_dsi_host_destroy(struct mipi_dsi_host *host); int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, struct drm_device *dev); @@ -145,8 +145,8 @@ int dsi_dma_base_get_6g(struct msm_dsi_host *msm_host, uint64_t *iova); int dsi_dma_base_get_v2(struct msm_dsi_host *msm_host, uint64_t *iova); int dsi_clk_init_v2(struct msm_dsi_host *msm_host); int dsi_clk_init_6g_v2(struct msm_dsi_host *msm_host); -int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi); -int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi); +int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi); +int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi); void msm_dsi_host_snapshot(struct msm_disp_state *disp_state, struct mipi_dsi_host *host); /* dsi phy */ struct msm_dsi_phy; diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h index ade9b609c7d9..2bce00d5a9fc 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h +++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h @@ -47,7 +47,7 @@ struct msm_dsi_host_cfg_ops { void* (*tx_buf_get)(struct msm_dsi_host *msm_host); void (*tx_buf_put)(struct msm_dsi_host *msm_host); int (*dma_base_get)(struct msm_dsi_host *msm_host, uint64_t *iova); - int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_dual_dsi); + int (*calc_clk_rate)(struct msm_dsi_host *msm_host, bool is_bonded_dsi); }; struct msm_dsi_cfg_handler { diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index ed504fe5074f..706634d766ee 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -679,7 +679,7 @@ void dsi_link_clk_disable_v2(struct msm_dsi_host *msm_host) clk_disable_unprepare(msm_host->byte_clk); } -static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi) +static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_bonded_dsi) { struct drm_display_mode *mode = msm_host->mode; u32 pclk_rate; @@ -687,22 +687,22 @@ static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi) pclk_rate = mode->clock * 1000; /* - * For dual DSI mode, the current DRM mode has the complete width of the + * For bonded DSI mode, the current DRM mode has the complete width of the * panel. Since, the complete panel is driven by two DSI controllers, * the clock rates have to be split between the two dsi controllers. * Adjust the byte and pixel clock rates for each dsi host accordingly. */ - if (is_dual_dsi) + if (is_bonded_dsi) pclk_rate /= 2; return pclk_rate; } -static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi) +static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_bonded_dsi) { u8 lanes = msm_host->lanes; u32 bpp = dsi_get_bpp(msm_host->format); - u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_dual_dsi); + u32 pclk_rate = dsi_get_pclk_rate(msm_host, is_bonded_dsi); u64 pclk_bpp = (u64)pclk_rate * bpp; if (lanes == 0) { @@ -720,28 +720,28 @@ static void dsi_calc_pclk(struct msm_dsi_host *msm_host, bool is_dual_dsi) } -int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_dual_dsi) +int dsi_calc_clk_rate_6g(struct msm_dsi_host *msm_host, bool is_bonded_dsi) { if (!msm_host->mode) { pr_err("%s: mode not set\n", __func__); return -EINVAL; } - dsi_calc_pclk(msm_host, is_dual_dsi); + dsi_calc_pclk(msm_host, is_bonded_dsi); msm_host->esc_clk_rate = clk_get_rate(msm_host->esc_clk); return 0; } -int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_dual_dsi) +int dsi_calc_clk_rate_v2(struct msm_dsi_host *msm_host, bool is_bonded_dsi) { u32 bpp = dsi_get_bpp(msm_host->format); u64 pclk_bpp; unsigned int esc_mhz, esc_div; unsigned long byte_mhz; - dsi_calc_pclk(msm_host, is_dual_dsi); + dsi_calc_pclk(msm_host, is_bonded_dsi); - pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_dual_dsi) * bpp; + pclk_bpp = (u64)dsi_get_pclk_rate(msm_host, is_bonded_dsi) * bpp; do_div(pclk_bpp, 8); msm_host->src_clk_rate = pclk_bpp; @@ -938,7 +938,7 @@ static void dsi_ctrl_config(struct msm_dsi_host *msm_host, bool enable, dsi_write(msm_host, REG_DSI_CTRL, data); } -static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi) +static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi) { struct drm_display_mode *mode = msm_host->mode; u32 hs_start = 0, vs_start = 0; /* take sync start as 0 */ @@ -956,13 +956,13 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi) DBG(""); /* - * For dual DSI mode, the current DRM mode has + * For bonded DSI mode, the current DRM mode has * the complete width of the panel. Since, the complete * panel is driven by two DSI controllers, the horizontal * timings have to be split between the two dsi controllers. * Adjust the DSI host timing values accordingly. */ - if (is_dual_dsi) { + if (is_bonded_dsi) { h_total /= 2; hs_end /= 2; ha_start /= 2; @@ -2285,13 +2285,13 @@ void msm_dsi_host_reset_phy(struct mipi_dsi_host *host) void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host, struct msm_dsi_phy_clk_request *clk_req, - bool is_dual_dsi) + bool is_bonded_dsi) { struct msm_dsi_host *msm_host = to_msm_dsi_host(host); const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; int ret; - ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_dual_dsi); + ret = cfg_hnd->ops->calc_clk_rate(msm_host, is_bonded_dsi); if (ret) { pr_err("%s: unable to calc clk rate, %d\n", __func__, ret); return; @@ -2354,7 +2354,7 @@ static void msm_dsi_sfpb_config(struct msm_dsi_host *msm_host, bool enable) int msm_dsi_host_power_on(struct mipi_dsi_host *host, struct msm_dsi_phy_shared_timings *phy_shared_timings, - bool is_dual_dsi) + bool is_bonded_dsi) { struct msm_dsi_host *msm_host = to_msm_dsi_host(host); const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; @@ -2392,7 +2392,7 @@ int msm_dsi_host_power_on(struct mipi_dsi_host *host, goto fail_disable_clk; } - dsi_timing_setup(msm_host, is_dual_dsi); + dsi_timing_setup(msm_host, is_bonded_dsi); dsi_sw_reset(msm_host); dsi_ctrl_config(msm_host, true, phy_shared_timings); diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 4ebfedc4a9ac..b20645ab279b 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -21,14 +21,14 @@ struct msm_dsi_manager { struct msm_dsi *dsi[DSI_MAX]; - bool is_dual_dsi; + bool is_bonded_dsi; bool is_sync_needed; int master_dsi_link_id; }; static struct msm_dsi_manager msm_dsim_glb; -#define IS_DUAL_DSI() (msm_dsim_glb.is_dual_dsi) +#define IS_BONDED_DSI() (msm_dsim_glb.is_bonded_dsi) #define IS_SYNC_NEEDED() (msm_dsim_glb.is_sync_needed) #define IS_MASTER_DSI_LINK(id) (msm_dsim_glb.master_dsi_link_id == id) @@ -42,18 +42,17 @@ static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id) return msm_dsim_glb.dsi[(id + 1) % DSI_MAX]; } -static int dsi_mgr_parse_dual_dsi(struct device_node *np, int id) +static int dsi_mgr_parse_of(struct device_node *np, int id) { struct msm_dsi_manager *msm_dsim = &msm_dsim_glb; - /* We assume 2 dsi nodes have the same information of dual-dsi and - * sync-mode, and only one node specifies master in case of dual mode. + /* We assume 2 dsi nodes have the same information of bonded dsi and + * sync-mode, and only one node specifies master in case of bonded mode. */ - if (!msm_dsim->is_dual_dsi) - msm_dsim->is_dual_dsi = of_property_read_bool( - np, "qcom,dual-dsi-mode"); + if (!msm_dsim->is_bonded_dsi) + msm_dsim->is_bonded_dsi = of_property_read_bool(np, "qcom,dual-dsi-mode"); - if (msm_dsim->is_dual_dsi) { + if (msm_dsim->is_bonded_dsi) { if (of_property_read_bool(np, "qcom,master-dsi")) msm_dsim->master_dsi_link_id = id; if (!msm_dsim->is_sync_needed) @@ -72,7 +71,7 @@ static int dsi_mgr_setup_components(int id) struct msm_dsi *clk_slave_dsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); int ret; - if (!IS_DUAL_DSI()) { + if (!IS_BONDED_DSI()) { ret = msm_dsi_host_register(msm_dsi->host, true); if (ret) return ret; @@ -100,7 +99,7 @@ static int dsi_mgr_setup_components(int id) if (ret) return ret; - /* PLL0 is to drive both 2 DSI link clocks in Dual DSI mode. */ + /* PLL0 is to drive both 2 DSI link clocks in bonded DSI mode. */ msm_dsi_phy_set_usecase(clk_master_dsi->phy, MSM_DSI_PHY_MASTER); msm_dsi_phy_set_usecase(clk_slave_dsi->phy, @@ -119,9 +118,9 @@ static int enable_phy(struct msm_dsi *msm_dsi, { struct msm_dsi_phy_clk_request clk_req; int ret; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); - msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_dual_dsi); + msm_dsi_host_get_phy_clk_req(msm_dsi->host, &clk_req, is_bonded_dsi); ret = msm_dsi_phy_enable(msm_dsi->phy, &clk_req); msm_dsi_phy_get_shared_timings(msm_dsi->phy, shared_timings); @@ -138,12 +137,12 @@ dsi_mgr_phy_enable(int id, struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); int ret; - /* In case of dual DSI, some registers in PHY1 have been programmed + /* In case of bonded DSI, some registers in PHY1 have been programmed * during PLL0 clock's set_rate. The PHY1 reset called by host1 here * will silently reset those PHY1 registers. Therefore we need to reset * and enable both PHYs before any PLL clock operation. */ - if (IS_DUAL_DSI() && mdsi && sdsi) { + if (IS_BONDED_DSI() && mdsi && sdsi) { if (!mdsi->phy_enabled && !sdsi->phy_enabled) { msm_dsi_host_reset_phy(mdsi->host); msm_dsi_host_reset_phy(sdsi->host); @@ -178,11 +177,11 @@ static void dsi_mgr_phy_disable(int id) struct msm_dsi *sdsi = dsi_mgr_get_dsi(DSI_CLOCK_SLAVE); /* disable DSI phy - * In dual-dsi configuration, the phy should be disabled for the + * In bonded dsi configuration, the phy should be disabled for the * first controller only when the second controller is disabled. */ msm_dsi->phy_enabled = false; - if (IS_DUAL_DSI() && mdsi && sdsi) { + if (IS_BONDED_DSI() && mdsi && sdsi) { if (!mdsi->phy_enabled && !sdsi->phy_enabled) { msm_dsi_phy_disable(sdsi->phy); msm_dsi_phy_disable(mdsi->phy); @@ -244,7 +243,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) struct msm_dsi *master_dsi, *slave_dsi; struct drm_panel *panel; - if (IS_DUAL_DSI() && !IS_MASTER_DSI_LINK(id)) { + if (IS_BONDED_DSI() && !IS_MASTER_DSI_LINK(id)) { master_dsi = other_dsi; slave_dsi = msm_dsi; } else { @@ -253,7 +252,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) } /* - * There is only 1 panel in the global panel list for dual DSI mode. + * There is only 1 panel in the global panel list for bonded DSI mode. * Therefore slave dsi should get the drm_panel instance from master * dsi. */ @@ -264,14 +263,14 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) return PTR_ERR(panel); } - if (!panel || !IS_DUAL_DSI()) + if (!panel || !IS_BONDED_DSI()) goto out; drm_object_attach_property(&conn->base, conn->dev->mode_config.tile_property, 0); /* - * Set split display info to kms once dual DSI panel is connected to + * Set split display info to kms once bonded DSI panel is connected to * both hosts. */ if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) { @@ -317,7 +316,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector) return 0; /* - * In dual DSI mode, we have one connector that can be + * In bonded DSI mode, we have one connector that can be * attached to the drm_panel. */ num = drm_panel_get_modes(panel, connector); @@ -366,30 +365,30 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge) struct mipi_dsi_host *host = msm_dsi->host; struct drm_panel *panel = msm_dsi->panel; struct msm_dsi_phy_shared_timings phy_shared_timings[DSI_MAX]; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); int ret; DBG("id=%d", id); if (!msm_dsi_device_connected(msm_dsi)) return; - /* Do nothing with the host if it is slave-DSI in case of dual DSI */ - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) + /* Do nothing with the host if it is slave-DSI in case of bonded DSI */ + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) return; ret = dsi_mgr_phy_enable(id, phy_shared_timings); if (ret) goto phy_en_fail; - ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_dual_dsi); + ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi); if (ret) { pr_err("%s: power on host %d failed, %d\n", __func__, id, ret); goto host_on_fail; } - if (is_dual_dsi && msm_dsi1) { + if (is_bonded_dsi && msm_dsi1) { ret = msm_dsi_host_power_on(msm_dsi1->host, - &phy_shared_timings[DSI_1], is_dual_dsi); + &phy_shared_timings[DSI_1], is_bonded_dsi); if (ret) { pr_err("%s: power on host1 failed, %d\n", __func__, ret); @@ -415,7 +414,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge) goto host_en_fail; } - if (is_dual_dsi && msm_dsi1) { + if (is_bonded_dsi && msm_dsi1) { ret = msm_dsi_host_enable(msm_dsi1->host); if (ret) { pr_err("%s: enable host1 failed, %d\n", __func__, ret); @@ -431,7 +430,7 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge) if (panel) drm_panel_unprepare(panel); panel_prep_fail: - if (is_dual_dsi && msm_dsi1) + if (is_bonded_dsi && msm_dsi1) msm_dsi_host_power_off(msm_dsi1->host); host1_on_fail: msm_dsi_host_power_off(host); @@ -446,15 +445,15 @@ static void dsi_mgr_bridge_enable(struct drm_bridge *bridge) int id = dsi_mgr_bridge_get_id(bridge); struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); struct drm_panel *panel = msm_dsi->panel; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); int ret; DBG("id=%d", id); if (!msm_dsi_device_connected(msm_dsi)) return; - /* Do nothing with the host if it is slave-DSI in case of dual DSI */ - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) + /* Do nothing with the host if it is slave-DSI in case of bonded DSI */ + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) return; if (panel) { @@ -471,15 +470,15 @@ static void dsi_mgr_bridge_disable(struct drm_bridge *bridge) int id = dsi_mgr_bridge_get_id(bridge); struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); struct drm_panel *panel = msm_dsi->panel; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); int ret; DBG("id=%d", id); if (!msm_dsi_device_connected(msm_dsi)) return; - /* Do nothing with the host if it is slave-DSI in case of dual DSI */ - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) + /* Do nothing with the host if it is slave-DSI in case of bonded DSI */ + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) return; if (panel) { @@ -497,7 +496,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1); struct mipi_dsi_host *host = msm_dsi->host; struct drm_panel *panel = msm_dsi->panel; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); int ret; DBG("id=%d", id); @@ -506,18 +505,18 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) return; /* - * Do nothing with the host if it is slave-DSI in case of dual DSI. + * Do nothing with the host if it is slave-DSI in case of bonded DSI. * It is safe to call dsi_mgr_phy_disable() here because a single PHY * won't be diabled until both PHYs request disable. */ - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) goto disable_phy; ret = msm_dsi_host_disable(host); if (ret) pr_err("%s: host %d disable failed, %d\n", __func__, id, ret); - if (is_dual_dsi && msm_dsi1) { + if (is_bonded_dsi && msm_dsi1) { ret = msm_dsi_host_disable(msm_dsi1->host); if (ret) pr_err("%s: host1 disable failed, %d\n", __func__, ret); @@ -537,7 +536,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) if (ret) pr_err("%s: host %d power off failed,%d\n", __func__, id, ret); - if (is_dual_dsi && msm_dsi1) { + if (is_bonded_dsi && msm_dsi1) { ret = msm_dsi_host_power_off(msm_dsi1->host); if (ret) pr_err("%s: host1 power off failed, %d\n", @@ -556,15 +555,15 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id); struct mipi_dsi_host *host = msm_dsi->host; - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); DBG("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) return; msm_dsi_host_set_display_mode(host, adjusted_mode); - if (is_dual_dsi && other_dsi) + if (is_bonded_dsi && other_dsi) msm_dsi_host_set_display_mode(other_dsi->host, adjusted_mode); } @@ -640,15 +639,15 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id) bool msm_dsi_manager_validate_current_config(u8 id) { - bool is_dual_dsi = IS_DUAL_DSI(); + bool is_bonded_dsi = IS_BONDED_DSI(); /* - * For dual DSI, we only have one drm panel. For this + * For bonded DSI, we only have one drm panel. For this * use case, we register only one bridge/connector. * Skip bridge/connector initialisation if it is - * slave-DSI for dual DSI configuration. + * slave-DSI for bonded DSI configuration. */ - if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) { + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) { DBG("Skip bridge registration for slave DSI->id: %d\n", id); return false; } @@ -740,7 +739,7 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg) if (!msg->tx_buf || !msg->tx_len) return 0; - /* In dual master case, panel requires the same commands sent to + /* In bonded master case, panel requires the same commands sent to * both DSI links. Host issues the command trigger to both links * when DSI_1 calls the cmd transfer function, no matter it happens * before or after DSI_0 cmd transfer. @@ -809,9 +808,9 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi) msm_dsim->dsi[id] = msm_dsi; - ret = dsi_mgr_parse_dual_dsi(msm_dsi->pdev->dev.of_node, id); + ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id); if (ret) { - pr_err("%s: failed to parse dual DSI info\n", __func__); + pr_err("%s: failed to parse OF DSI info\n", __func__); goto fail; } 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 e46b10fc793a..d8128f50b0dd 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_10nm.c @@ -84,7 +84,7 @@ struct dsi_pll_10nm { #define to_pll_10nm(x) container_of(x, struct dsi_pll_10nm, clk_hw) /* - * Global list of private DSI PLL struct pointers. We need this for Dual DSI + * Global list of private DSI PLL struct pointers. We need this for bonded DSI * mode, where the master PLL's clk_ops needs access the slave's private data */ static struct dsi_pll_10nm *pll_10nm_list[DSI_MAX]; 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 a34cf151c517..e7f857ad02a3 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c @@ -86,7 +86,7 @@ struct dsi_pll_14nm { /* * Private struct for N1/N2 post-divider clocks. These clocks are similar to * the generic clk_divider class of clocks. The only difference is that it - * also sets the slave DSI PLL's post-dividers if in Dual DSI mode + * also sets the slave DSI PLL's post-dividers if in bonded DSI mode */ struct dsi_pll_14nm_postdiv { struct clk_hw hw; @@ -102,7 +102,7 @@ struct dsi_pll_14nm_postdiv { #define to_pll_14nm_postdiv(_hw) container_of(_hw, struct dsi_pll_14nm_postdiv, hw) /* - * Global list of private DSI PLL struct pointers. We need this for Dual DSI + * Global list of private DSI PLL struct pointers. We need this for bonded DSI * mode, where the master PLL's clk_ops needs access the slave's private data */ static struct dsi_pll_14nm *pll_14nm_list[DSI_MAX]; @@ -658,7 +658,7 @@ static int dsi_pll_14nm_postdiv_set_rate(struct clk_hw *hw, unsigned long rate, val |= value << shift; dsi_phy_write(base + REG_DSI_14nm_PHY_CMN_CLK_CFG0, val); - /* If we're master in dual DSI mode, then the slave PLL's post-dividers + /* If we're master in bonded DSI mode, then the slave PLL's post-dividers * follow the master's post dividers */ if (pll_14nm->phy->usecase == MSM_DSI_PHY_MASTER) { 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 7c23d4c47338..ab26b530fbcf 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c @@ -83,7 +83,7 @@ struct dsi_pll_7nm { #define to_pll_7nm(x) container_of(x, struct dsi_pll_7nm, clk_hw) /* - * Global list of private DSI PLL struct pointers. We need this for Dual DSI + * Global list of private DSI PLL struct pointers. We need this for bonded DSI * mode, where the master PLL's clk_ops needs access the slave's private data */ static struct dsi_pll_7nm *pll_7nm_list[DSI_MAX]; From patchwork Sat Jul 17 12:40:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479231 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346502jao; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydqFQpLofYUtwWOaFEaulECe4IDmBei324pUPQpE35LYuPMJffjzVSS6ShMFnpA0AFQ2b9 X-Received: by 2002:a92:b506:: with SMTP id f6mr4829066ile.151.1626525626506; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525626; cv=none; d=google.com; s=arc-20160816; b=y01HLTBiJIYfJ/696fTgsTKhEbkTQLnjtvxrhbX0PMNWB23VnH+6zVfwPcuq4+Cvmr iNTttXkX+jY9zxmq+jqJhoQNZt4FKY369m09HjhUCaMXGE9o0dfcUj2s/qsQT4G7/TM4 U7LJvSpcmbdDD2hdijm6wJgl0P86b8rppLtjwd+OFyCekKxXz6YIBvh6wd/ivF4XhQlx P8IHz0sNZ6J1G7MBp0rE40Qg79z0k78sVUWyerWs8HBFX/fOH77WjayLCD5dXe8uQ3eg dx2BRItuFnbYl1i919pNwH5OV+zytppGHgiUPfRGYsf2Ii8wlVudxZTeMLsg/ygk8tFd OLqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ysvvGQmoa08plNkduw7rJX6WTAzRTvZ9iBIAoQ2LibM=; b=Sl1sVIwchubIZ3q0SyJoJqufwb499JWu2AgrwouIDPMyrHX25IKwm/akfTICJB/idp pcUUbkgkm6QAiHrOHrPtnT5XpWG14/lHkbHGAS/0bjAfiSrqyfQbEW/zr6PkpdxzcTO8 5C3TLbNwrzzRf+IIvG/S4ioXT/eP8ccowWnnw3f3kwniAiIrLGUbt1PK96h10jjzpkmf Gw2QX6eOCCtY78GKqrLT/hpZIS1W2mPvqF438qD3jgwPpCbc/zbzvg08T+HMh7z8sKTT xHpkhD5MIII2L2hZrhqUWJ2a6as8Dl2Dm1Hum6QRsUpNZQ5ClEbjssGDmemYgHyIzDB7 uHcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMU8nBl6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.26; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMU8nBl6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbhGQMnV (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhGQMnV (ORCPT ); Sat, 17 Jul 2021 08:43:21 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77001C06175F for ; Sat, 17 Jul 2021 05:40:24 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id b26so20710446lfo.4 for ; Sat, 17 Jul 2021 05:40:24 -0700 (PDT) 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=ysvvGQmoa08plNkduw7rJX6WTAzRTvZ9iBIAoQ2LibM=; b=rMU8nBl61ss+BYlbRpQthguaXjHdPilFUk3+l70a1HcWHEBMvc8rf9zD2A/+qB3GAG ZG6yajM3VEbet1JPqIefXR4c8DVTXiuQmqwrIl4LOcwjzlniJRQpIw+0IXWg10qaqehz Dz1KNjR3XlTAyA8BjvxU5LQW5KYI6BNlmiC3AHVFuCt/tQqFW8YaCOnGrcdTmrTFbSxh WZlWvmkPvdcyAKvodKi0U+9WjVBw3aSpWUFvH1+RBAeDouCEotBvu0Ekz2DiaZTJr1f2 hC688OtCPouhOW1SZ37Pw2kw+u1AN7dRvj4CJv7hPg+JvYBLeVsu2ytKls8v4ZdkXfA5 PKDw== 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=ysvvGQmoa08plNkduw7rJX6WTAzRTvZ9iBIAoQ2LibM=; b=VHyI0IL3oNB1Nj72QUsQrNi3Y+XMn/oUDQT1/AToAxWPzLlN3pllxqGK4mtC+nyHhw mw9oVec/1XM6yxTqIO7RwbYOX8BLvOXygaoylRI39ytEZqNT6P+KEl6LBdxRoY89yEod XdCZtOdShOp0WSkUf2KPqY2YhP7hSC3l1gS/goJ1c9Los2+ApBbEj9BaFz8+XMK8pd4a h0q3lq/V0PB4hyYD8bb4f7g6a5h1aYoUNlepbuWv5vO2hP7SrFuQpxhOUTPQG8jbl+pL TuMADifSKZ5sVOeox0/FJFrid93R0FEE/LuY9XKLXJ6dCox8en6qXdX1uCquRO+TP/ak NIWg== X-Gm-Message-State: AOAM533RSWTJm88S9F4pQso0stfU46+vwhHmcHwCBvwink1BJUBJiEKf BvIrqhlazBoSMbuDG0/NwbyZ3w== X-Received: by 2002:a19:8642:: with SMTP id i63mr11819172lfd.156.1626525622812; Sat, 17 Jul 2021 05:40:22 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:22 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 2/7] drm/msm/dsi: add three helper functions Date: Sat, 17 Jul 2021 15:40:11 +0300 Message-Id: <20210717124016.316020-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add three helper functions to be used by display drivers for setting up encoders. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.c | 7 +++++++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 19 +++++++++++-------- drivers/gpu/drm/msm/msm_drv.h | 17 +++++++++++++++-- 3 files changed, 33 insertions(+), 10 deletions(-) -- 2.30.2 Reported-by: kernel test robot Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 75afc12a7b25..5201d7eb0490 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -13,6 +13,13 @@ struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi) return msm_dsi->encoder; } +bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi) +{ + unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host); + + return !(host_flags & MIPI_DSI_MODE_VIDEO); +} + static int dsi_get_phy(struct msm_dsi *msm_dsi) { struct platform_device *pdev = msm_dsi->pdev; diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index b20645ab279b..27d3b9ebf831 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -216,12 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge) return dsi_bridge->id; } -static bool dsi_mgr_is_cmd_mode(struct msm_dsi *msm_dsi) -{ - unsigned long host_flags = msm_dsi_host_get_mode_flags(msm_dsi->host); - return !(host_flags & MIPI_DSI_MODE_VIDEO); -} - void msm_dsi_manager_setup_encoder(int id) { struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); @@ -231,7 +225,7 @@ void msm_dsi_manager_setup_encoder(int id) if (encoder && kms->funcs->set_encoder_mode) kms->funcs->set_encoder_mode(kms, encoder, - dsi_mgr_is_cmd_mode(msm_dsi)); + msm_dsi_is_cmd_mode(msm_dsi)); } static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) @@ -276,7 +270,7 @@ static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) if (other_dsi && other_dsi->panel && kms->funcs->set_split_display) { kms->funcs->set_split_display(kms, master_dsi->encoder, slave_dsi->encoder, - dsi_mgr_is_cmd_mode(msm_dsi)); + msm_dsi_is_cmd_mode(msm_dsi)); } out: @@ -839,3 +833,12 @@ void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi) msm_dsim->dsi[msm_dsi->id] = NULL; } +bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi) +{ + return IS_BONDED_DSI(); +} + +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi) +{ + return IS_MASTER_DSI_LINK(msm_dsi->id); +} diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 1a48a709ffb3..9bfd37855969 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -350,7 +350,9 @@ void __exit msm_dsi_unregister(void); int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, struct drm_encoder *encoder); void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi); - +bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi); +bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi); +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi); #else static inline void __init msm_dsi_register(void) { @@ -367,7 +369,18 @@ static inline int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, static inline void msm_dsi_snapshot(struct msm_disp_state *disp_state, struct msm_dsi *msm_dsi) { } - +static inline bool msm_dsi_is_cmd_mode(struct msm_dsi *msm_dsi) +{ + return false; +} +static bool msm_dsi_is_bonded_dsi(struct msm_dsi *msm_dsi) +{ + return false; +} +bool msm_dsi_is_master_dsi(struct msm_dsi *msm_dsi) +{ + return false; +} #endif #ifdef CONFIG_DRM_MSM_DP From patchwork Sat Jul 17 12:40:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479233 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346509jao; Sat, 17 Jul 2021 05:40:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmVo537mk00Edxucfqtx3fQulvkFRl1p3tTtkuzpFi9W0+uTI2CuYL+9LbOItTYdvScpQm X-Received: by 2002:a6b:f707:: with SMTP id k7mr11292028iog.125.1626525626913; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525626; cv=none; d=google.com; s=arc-20160816; b=RwhQJKPmzlzApgl34xgAklmSK05Prld5Mk4MHJWP0DDe4eNl/56vhtmcgzFhyT45bq mEAF9ztPB7JCi7f8prWhZmg3iXSR2OECYxXD0+SeUGKPNbC8fBBZx2E9SwdU0QTEnElF 43k9dcdBGog+koCT5mpuSpHPVo4jv2/9o4U3Ay3bbwfVgNyHlAW6M3HT1k5GXHgR6axD 2lcUgmyoCSeVQk5UnLGROZMXbQTxfzaJsa9JbtjwG6ULbtEwPAAw+yaJ4h8JEb5zsy+T rk/jzaSZfHM07MpWVSDTfPZbgCnGjTGepL6EtIkMF+L20jBfU5R24hUW94NJZ6HXxJlz XAzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pY5tuMhqcs2nX4bIZTKuCC5v/MwQ9tPhYnoCq8ESggM=; b=r/mbJ/9KQfJsxUf5O5VWJcZhaIrqy+m+jijg/iz07GYPiOfVA0O+3sKMD5aLwaYt2+ +Y7m3YlCeX77eNEQOqhA3vNSuV0ntFTTjc+xSd/0YtK0XYJEBJdqapYgU3aW3sZcyiSW ir+yH0boTrxxuY8EnOgS427Q0nRxYkOCC8SiDF39PbcLIKAnwksVFokRdaMEw8RCJ/Kj H0eBf5qTM5meJtrL/oKLbYxWnaeihtJQjDp9eIJthOKQRmtcvmyjeWKh5bnCsue7z3td HyQyhsRFCNvcs/RemvjtiwqIHfzk6AuKqoNumDkzC4AAWvgtqo5Jd8d6mwjnP5yAc+xE kBqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RScO7UiS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.26; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RScO7UiS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230112AbhGQMnW (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233568AbhGQMnV (ORCPT ); Sat, 17 Jul 2021 08:43:21 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4266FC06175F for ; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id s17so7282081ljo.12 for ; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) 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=pY5tuMhqcs2nX4bIZTKuCC5v/MwQ9tPhYnoCq8ESggM=; b=RScO7UiSlmgt/wMghC9y9mRllC39zhSLpDPvwt34rVjRLBoDOEFQPlvvqmQpIQ/xdd s9ozE7UEGiTpZs61mfE/Slcs8qSb/ZQ8SKyOk/GYUYp5B481Y9hqxU9akZdCshcn7nb5 89bwZMnbkVQJaLK/cInH1dsvL1GloR7m7j+XS/iNFgPzbGJtosqPbNqGUAMIjpqPpCk2 46bWoPzyisvE5DdxavRLb4UcYnB86X37C8HGMpQiMrbez8TKTG/bWrqWXd+JalBgqKmu BFKpKYdl5FmaD7neWyrxi/zmFAXqdKGIhAZa1s7AcONS2LZDV4rq4aR3eLnVTV9ieGR4 ctXg== 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=pY5tuMhqcs2nX4bIZTKuCC5v/MwQ9tPhYnoCq8ESggM=; b=Wj4jrRtyCHZZOMWA8fVKEeRIWXl6pKFF2FI0gf9Tbsx8AMcVTnq2UnjptRpAditV95 ybpxJHAS9RQQvn4vlG4CJzZfvPpbIysCZNqNdbcSn7XpHwHxC8LepPNGt7HMQ3SYa11/ /K3MkL/HRuh6qefYGsAU3lH+uJYu+z9RzZfKOz0ajH+pB6NSX2d3YG6Fh0cG/JM2dmz6 NxRSEGy26yrq8lf/VlPDf49A+uwz6KfxGjS7btLNeteGk9NSujnyu3vIxT9LceLOWqLS PGNmx0HigWEwkCKfVtDWxbxIN9ISzye631StUHpTKI0oZ5kN9w3V/lxXLlxCmBWYYhvb HKFQ== X-Gm-Message-State: AOAM533SmAHoxrs+LWX89iuvluksiNVm7jockRd98+IWqx6R/+Rv5zAS 3OIU/twnIycfmGMlXKQMS3iSlA== X-Received: by 2002:a2e:7a18:: with SMTP id v24mr619548ljc.420.1626525623657; Sat, 17 Jul 2021 05:40:23 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:23 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 3/7] drm/msm/dpu: support setting up two independent DSI connectors Date: Sat, 17 Jul 2021 15:40:12 +0300 Message-Id: <20210717124016.316020-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Move setting up encoders from set_encoder_mode to _dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This allows us to support not only "single DSI" and "bonded DSI" but also "two independent DSI" configurations. In future this would also help adding support for multiple DP connectors. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 102 +++++++++++++----------- 1 file changed, 57 insertions(+), 45 deletions(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 1d3a4f395e74..3cd2011e18d4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -471,30 +471,68 @@ static int _dpu_kms_initialize_dsi(struct drm_device *dev, struct dpu_kms *dpu_kms) { struct drm_encoder *encoder = NULL; + struct msm_display_info info; int i, rc = 0; if (!(priv->dsi[0] || priv->dsi[1])) return rc; - /*TODO: Support two independent DSI connectors */ - encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI); - if (IS_ERR(encoder)) { - DPU_ERROR("encoder init failed for dsi display\n"); - return PTR_ERR(encoder); - } - - priv->encoders[priv->num_encoders++] = encoder; - + /* + * We support following confiurations: + * - Single DSI host (dsi0 or dsi1) + * - Two independent DSI hosts + * - Bonded DSI0 and DSI1 hosts + * + * TODO: Support swapping DSI0 and DSI1 in the bonded setup. + */ for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) { + int other = (i + 1) % 2; + if (!priv->dsi[i]) continue; + if (msm_dsi_is_bonded_dsi(priv->dsi[i]) && + !msm_dsi_is_master_dsi(priv->dsi[i])) + continue; + + encoder = dpu_encoder_init(dev, DRM_MODE_ENCODER_DSI); + if (IS_ERR(encoder)) { + DPU_ERROR("encoder init failed for dsi display\n"); + return PTR_ERR(encoder); + } + + priv->encoders[priv->num_encoders++] = encoder; + + memset(&info, 0, sizeof(info)); + info.intf_type = encoder->encoder_type; + rc = msm_dsi_modeset_init(priv->dsi[i], dev, encoder); if (rc) { DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n", i, rc); break; } + + info.h_tile_instance[info.num_of_h_tiles++] = i; + info.capabilities = msm_dsi_is_cmd_mode(priv->dsi[i]) ? + MSM_DISPLAY_CAP_CMD_MODE : + MSM_DISPLAY_CAP_VID_MODE; + + if (msm_dsi_is_bonded_dsi(priv->dsi[i]) && priv->dsi[other]) { + rc = msm_dsi_modeset_init(priv->dsi[other], dev, encoder); + if (rc) { + DPU_ERROR("modeset_init failed for dsi[%d], rc = %d\n", + other, rc); + break; + } + + info.h_tile_instance[info.num_of_h_tiles++] = other; + } + + rc = dpu_encoder_setup(dev, encoder, &info); + if (rc) + DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n", + encoder->base.id, rc); } return rc; @@ -505,6 +543,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, struct dpu_kms *dpu_kms) { struct drm_encoder *encoder = NULL; + struct msm_display_info info; int rc = 0; if (!priv->dp) @@ -516,6 +555,7 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, return PTR_ERR(encoder); } + memset(&info, 0, sizeof(info)); rc = msm_dp_modeset_init(priv->dp, dev, encoder); if (rc) { DPU_ERROR("modeset_init failed for DP, rc = %d\n", rc); @@ -524,6 +564,14 @@ static int _dpu_kms_initialize_displayport(struct drm_device *dev, } priv->encoders[priv->num_encoders++] = encoder; + + info.num_of_h_tiles = 1; + info.capabilities = MSM_DISPLAY_CAP_VID_MODE; + info.intf_type = encoder->encoder_type; + rc = dpu_encoder_setup(dev, encoder, &info); + if (rc) + DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n", + encoder->base.id, rc); return rc; } @@ -726,41 +774,6 @@ static void dpu_kms_destroy(struct msm_kms *kms) msm_kms_destroy(&dpu_kms->base); } -static void _dpu_kms_set_encoder_mode(struct msm_kms *kms, - struct drm_encoder *encoder, - bool cmd_mode) -{ - struct msm_display_info info; - struct msm_drm_private *priv = encoder->dev->dev_private; - int i, rc = 0; - - memset(&info, 0, sizeof(info)); - - info.intf_type = encoder->encoder_type; - info.capabilities = cmd_mode ? MSM_DISPLAY_CAP_CMD_MODE : - MSM_DISPLAY_CAP_VID_MODE; - - switch (info.intf_type) { - case DRM_MODE_ENCODER_DSI: - /* TODO: No support for DSI swap */ - for (i = 0; i < ARRAY_SIZE(priv->dsi); i++) { - if (priv->dsi[i]) { - info.h_tile_instance[info.num_of_h_tiles] = i; - info.num_of_h_tiles++; - } - } - break; - case DRM_MODE_ENCODER_TMDS: - info.num_of_h_tiles = 1; - break; - } - - rc = dpu_encoder_setup(encoder->dev, encoder, &info); - if (rc) - DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n", - encoder->base.id, rc); -} - static irqreturn_t dpu_irq(struct msm_kms *kms) { struct dpu_kms *dpu_kms = to_dpu_kms(kms); @@ -863,7 +876,6 @@ static const struct msm_kms_funcs kms_funcs = { .get_format = dpu_get_msm_format, .round_pixclk = dpu_kms_round_pixclk, .destroy = dpu_kms_destroy, - .set_encoder_mode = _dpu_kms_set_encoder_mode, .snapshot = dpu_kms_mdp_snapshot, #ifdef CONFIG_DEBUG_FS .debugfs_init = dpu_kms_debugfs_init, From patchwork Sat Jul 17 12:40:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479234 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346537jao; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZhnoXlZDX92yCfBTih+H4860pV40A57W66rbf+v0BxuWQt/GMdONQVXFs3C36TKmCEuU5 X-Received: by 2002:a05:6602:2f09:: with SMTP id q9mr4627385iow.196.1626525628356; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525628; cv=none; d=google.com; s=arc-20160816; b=x2g1IHtWOTeZzi9sknyeWO5F8p6IOEGj1pkny084OJv0YCT78WhKi0FmsUWU4KnhBt uoMvVhe45qGDaXRNRczem2XrXLyyDthf0jl7MkB4a2XCoODJVrvydsNu23Cj4KLibbxg zMFP+zKTO+IYGcdrH5t0Z2Ln/DsvpWuINxPFbIAoEQMtD9VIYyBuXVjtucWMpGBdqQF6 0z3aQ1Oq9BEaUSUA8IwkNRKexlCFxM/GfW0g/JAPccEGhx5leJtcNQvTLZm/G8BcDfnO qVUAfwVSb9LM4hu6zHY4Seun9lwi/pbE7ZS67Tmoo+uDgaWXbk4uoYKiqJFgPXxAMjhH 5wTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hoN8ubV+NL8AcGXwOuvZXUIKfTF5XnABfb0Z79GoR78=; b=ELbtmJR1/NRs6pfAL7FfYgRdu/ZMfx3KixBGYmXoqySZsgqfF1nJmcDpMqznLFXrVH nl072eluUTRh16FaDIHpxi+f+KzzTE/AyVGe0HJCwdukWuYBGwMiiCEEP5GwtWT2OA1E QQYn20MQVyQdBYEupyfyDTXc2XZhUMTIpqYxxY1a8ZYj/wRZBDSk8bakPQidXfA4C3xe k/f7azWrZqotxkTvoKRyAlFBVddRMSN2Ysmw49198rIJjvnE1jGlMq4ZNsDKawy1aJ5S oCK/TBfeQlv80wDEj6YIcBSd/n++B+62ro3b8lfXdDXyUbfiuwgcw6Oxzw6URp5dCeIQ BAeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PvBXsDKy; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.28; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PvBXsDKy; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233715AbhGQMnX (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233568AbhGQMnX (ORCPT ); Sat, 17 Jul 2021 08:43:23 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F141EC06175F for ; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id q4so17924954ljp.13 for ; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) 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=hoN8ubV+NL8AcGXwOuvZXUIKfTF5XnABfb0Z79GoR78=; b=PvBXsDKynPr7GGJktT7Bkhm5GSrb1FnEVgMo5OV1Y3sYC2xMN7OVRigr3nCHK+OWgQ B1LmRcEFbxPtouXGbR5DazBg1btY1ocTIgOspuuf08tSZe0oG/j9Qq/OrjUF2D7bRX8Q nPtwe3cFZtPq1VwlfsNwVDhukblJAhXK6bDfDZgqe7YKini3zh3x1eit/CfvprJ3a0Ks M2VjiaUmVaCt01K2YTgj3jHACPZH++xxGgLnJTotgVgf6IS2UBrX7rmEDRjOMArpXLaQ HJWFBs5xZ6ho/OveseZK6oBNW3Cis4+5dXN5BWdE3+Twa2SUJfuRmRRbBIcsFihUuKxh 9ZGA== 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=hoN8ubV+NL8AcGXwOuvZXUIKfTF5XnABfb0Z79GoR78=; b=QhA9D2eA2LWS5/nEYog3N+Hi4UeYZejBmiZm2taWj1U5IFY78KUJqJQdBWy7wOvgj8 WkaL7l2U/U6lcX3E3WhGV+uJcc0KOi/m+DpPXc8SkIXVFN/aoJLN1MrWnJB50nFHverx EggDdD89AJrGbcVAIwoWQezP3TrZHv2OmSIvLkchgYnqOsDk2U6gNsNu+1U53IwhqGNk z7uabgG5pZdTrHtA/ywQ9iej2GER0qIcMZtA8iXLoRUe71IqWpehQFjAlTIYtwjEk8Ki SSKsmS6xgDBIcKGNm7+DAPCBzxEGRFCtx2pEjz1nRj0NO2opiGfTidLvX4iOqpIm+SKh AYxA== X-Gm-Message-State: AOAM5333xN/KeK7F2mzmvS1pLz+i+gX6MnoCL7nnO/jYDxt3KHql++9h 3xaFSfQ9NgSKRRxwz0ijZHhDqg== X-Received: by 2002:a05:651c:512:: with SMTP id o18mr13289143ljp.484.1626525624349; Sat, 17 Jul 2021 05:40:24 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:23 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Date: Sat, 17 Jul 2021 15:40:13 +0300 Message-Id: <20210717124016.316020-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Move a call to mdp5_encoder_set_intf_mode() after msm_dsi_modeset_init(), removing set_encoder_mode callback. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 15aed45022bc..b3b42672b2d4 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -209,13 +209,6 @@ static int mdp5_set_split_display(struct msm_kms *kms, slave_encoder); } -static void mdp5_set_encoder_mode(struct msm_kms *kms, - struct drm_encoder *encoder, - bool cmd_mode) -{ - mdp5_encoder_set_intf_mode(encoder, cmd_mode); -} - static void mdp5_kms_destroy(struct msm_kms *kms) { struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms)); @@ -287,7 +280,6 @@ static const struct mdp_kms_funcs kms_funcs = { .get_format = mdp_get_format, .round_pixclk = mdp5_round_pixclk, .set_split_display = mdp5_set_split_display, - .set_encoder_mode = mdp5_set_encoder_mode, .destroy = mdp5_kms_destroy, #ifdef CONFIG_DEBUG_FS .debugfs_init = mdp5_kms_debugfs_init, @@ -448,6 +440,9 @@ static int modeset_init_intf(struct mdp5_kms *mdp5_kms, } ret = msm_dsi_modeset_init(priv->dsi[dsi_id], dev, encoder); + if (!ret) + mdp5_encoder_set_intf_mode(encoder, msm_dsi_is_cmd_mode(priv->dsi[dsi_id])); + break; } default: From patchwork Sat Jul 17 12:40:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479235 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346543jao; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZkwpjbgknRnVMETNsbR1XGao+rCNKC30c5ILOzl/5c3yF7UAYnvtitksNCQXUudqS9Bny X-Received: by 2002:a6b:f707:: with SMTP id k7mr11292102iog.125.1626525628676; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525628; cv=none; d=google.com; s=arc-20160816; b=Rhsd7N4Ac+4YY8VqO0eyrwVHIvaJNYmjNbWb77VW27qSOq49Ziwj0qqxm0Bnt4g+3s qsbXKDIW+X/YYOmd94i1cEs5ZmB/gECKkRM4a8+i0QY7hFTZTiOVQlPl5V+Z7k+wRLKZ tOeAlqnMYnegt63BGUrZc3ME2QhJmxLoq6m7kfK8uH23wPbv1i9As/jsSiEoK9ZaSY2E UXsaIYZIxT1q9Z5a/KvJABaLMoN1d/b3ZR4P4XTY93dU4r/2IQbDbL+S8ubvVoacs7A0 yo0AMmGYfl933L0oEH0kX0P/qNIEiJHpk6l0AYkY9Smrwhdf/fEiX5ZGEwdtNpNzcZZx 1LYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TR8ndGweFJ1zlT+mXoJoL5P2xKgyplXAag8kXZdug0c=; b=cNm9qKAimKqxbwzVdScRVK2J7eCPJyNEYcFDFMVeu1QXTkWnNEtpzLjSiuE3g7J4kQ 73xs34qz41WpCwjd0EWC8/9i4d33F7XATVKWhLsq+l2nqYryrZAPMRc7cMHqrzfmq8tr 6E3u1j/AJVZnyqpl+lE/NhfutJ8AorMvKaOLN1Z5dYBcws8TqcQUuVh5ZqS5VR7DJ2u0 WIE4+37SXYUyK4SvG4jaoz31jEAQb+SIUKopNR8a4HOnuQT/V8uMtqbHszjvguawmlx0 DFpxd3sxuNa0MkBwIIIOipTaWNZ9IGi7aVe6Uy9vj/ujRNxiz6OMi3rtKbyN65G1qMTU jG1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Th4ffsnH; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.28; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Th4ffsnH; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233568AbhGQMnY (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233613AbhGQMnX (ORCPT ); Sat, 17 Jul 2021 08:43:23 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2D87C061762 for ; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id bn5so17584648ljb.10 for ; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) 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=TR8ndGweFJ1zlT+mXoJoL5P2xKgyplXAag8kXZdug0c=; b=Th4ffsnHt9IjURUA+uuC3RwdJGkgKZaPLdGejWNpQAj+cfH3gJa1OMugKmcM2LctC+ Km66oxxeq11JiRTjurNc6Zr0M+fEmixbNqXCGcvflQD4ZTmYXXRfNXsrdSLuOQkMl0/b GaS7cB9xlHJaukbHNuXM0N69E4rj9kDczZ7ygEGYXMJ1HtVsswFJBTB5MOX/0n51e5zN q0Ylr66lP7xwSyVPsk+talf24dz6bQegDlnhkb2BwB/XzbtJOt6tUXIg6smzzWp4fa9O N7hKjLxXMP/yOWojDCIg5xSoMX6c3Wl1uMb72WbpoCQKGrJt58I8u+O60BI34gKxBTcT r0/g== 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=TR8ndGweFJ1zlT+mXoJoL5P2xKgyplXAag8kXZdug0c=; b=d1N3D7w5W+ar8OE5q5HcCvxZsvL9f/RM/eRONd7+Ir3FKKSKl4Jbw29X4tIV27GPcg QTfDbGXNxI4iBROBfZ9neN9oihkRBAGbjZwjqxWPr28qtSx/3BnHB7AnL63ExZHXt7MH 0Sh408dcdiqq5hL/uR7qwFGn64vG+5n+Q/O7u8pWV9ZzOnj5jzpDQetwmmkBhaenN9VL K0CpDJIDQsxW9dnGb0ZhWc0tYyB2r5ZOrKfbuyr9/O0pEYrTmGcDRP4sAHTk3LfhRTrp 6l73e53ZeJwk+woMZIQqqAM3a+VMECT68bCfHj1Ok+liEDpPDfED4aHtXkBJFGy58Z0F GmuQ== X-Gm-Message-State: AOAM530bID6cbU0pHDjbP7SssUvm103jzYyz5XsUzmKnJRAhBP1a2eaN eSNTAMrip5cgUDeN61dlJXemAA== X-Received: by 2002:a05:651c:160e:: with SMTP id f14mr4677849ljq.273.1626525625205; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:24 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 5/7] drm/msm/dp: stop calling set_encoder_mode callback Date: Sat, 17 Jul 2021 15:40:14 +0300 Message-Id: <20210717124016.316020-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dp/dp_display.c | 18 ------------------ 1 file changed, 18 deletions(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 051c1be1de7e..70b319a8fe83 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -102,8 +102,6 @@ struct dp_display_private { struct dp_display_mode dp_mode; struct msm_dp dp_display; - bool encoder_mode_set; - /* wait for audio signaling */ struct completion audio_comp; @@ -283,20 +281,6 @@ static void dp_display_send_hpd_event(struct msm_dp *dp_display) } -static void dp_display_set_encoder_mode(struct dp_display_private *dp) -{ - struct msm_drm_private *priv = dp->dp_display.drm_dev->dev_private; - struct msm_kms *kms = priv->kms; - - if (!dp->encoder_mode_set && dp->dp_display.encoder && - kms->funcs->set_encoder_mode) { - kms->funcs->set_encoder_mode(kms, - dp->dp_display.encoder, false); - - dp->encoder_mode_set = true; - } -} - static int dp_display_send_hpd_notification(struct dp_display_private *dp, bool hpd) { @@ -369,8 +353,6 @@ static void dp_display_host_init(struct dp_display_private *dp, int reset) if (dp->usbpd->orientation == ORIENTATION_CC2) flip = true; - dp_display_set_encoder_mode(dp); - dp_power_init(dp->power, flip); dp_ctrl_host_init(dp->ctrl, flip, reset); dp_aux_init(dp->aux); From patchwork Sat Jul 17 12:40:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479236 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346546jao; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywXm6Xwg9lKQMslSfkzLp4P2Vw0EvUEgcCzuJ27hyO6HnWWHrInoboP2aRVDC8QokIqIqe X-Received: by 2002:a5d:97c6:: with SMTP id k6mr8571643ios.69.1626525629023; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525629; cv=none; d=google.com; s=arc-20160816; b=xQ9oI0u7RbUuoy4o2wgH/d04JAI/j4UlfVNCU9lseUzT0heCff/lCgJfDs7FUGfo0U OCXSn3dAEnir3TMVGcsU2N3ZK59LT+V5MWi1Cp2Z2dbdKv2HAFxcIKaPG6+W0gxMMpkv C5m8CogreE9xn3fzz+HwmGQD1u6NQ2F72MVyUHriaTaa6VLtv7m67S1Y6Hu2TrtY+itg iIGV2/u8baPgIW65Y9P2zqcBcdQjvjFTDSZ/e0tsqt6iB0h2L3RJeI5iWcq8J0hbZ2+l vf6ijZbh5WUyOxcyybg23Xvr4o8zGsR9WzBLANiqJFVG9w/g7eTNgvBMTXm+Qw7EuRGI OV0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nRZhkjy0dQDJbOhaefbmkPeax0IavLpLmH4VRR7TqLc=; b=EiouFdB3AWlRJpUkzKkWVlCfxFe705+/HJj5CrTGPRs7T4tuUTK4nN1H4VpSxdOx1a A/pVNZ4xJVN7HMQabet6kdrlAyz9WLdKM9LGWvwnLF0HQcf3+TEJinK7NRyBy7SIHVk8 3pdn7aZjCkKvJgu0p6HtFdwYEUBJWEEWhqeYcZv0n4yt66T22ZGdppOLWbO3KgDz18D1 ihxgM0rtUdGLuvz9c6jTwFABjUuNjGSMuIYeZzMn0do67oeorWJqVvPC4G8f0qqqD3fh cljeR5DWR/5tI4fI+TfsNXoxBMjt1Xb18GheuLcKNgRgyE6fIbU+2rsbcMLBCxjNbTp3 qZog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mBR3bAd/"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.28; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mBR3bAd/"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233613AbhGQMnY (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233740AbhGQMnY (ORCPT ); Sat, 17 Jul 2021 08:43:24 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89213C06175F for ; Sat, 17 Jul 2021 05:40:27 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 22so20590050lfy.12 for ; Sat, 17 Jul 2021 05:40:27 -0700 (PDT) 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=nRZhkjy0dQDJbOhaefbmkPeax0IavLpLmH4VRR7TqLc=; b=mBR3bAd/NkqW7Qy4EPUiP97XuEsZAc85GRa5H15YD9v//Nt7vtN+eHJg091MlQhxmp 57JyiFGydtgjXMgVMJdMjmN6Ws0ELNPrb0XC/orAZPUcJT3uye7UUsAgw3hZJIzyxQsU jJp1fd+DiGXnMNZdZv9vy+1De9dU+EaJqliPce1VurIX7T3TROfFarPvqWcWLpcGQb9T zfiY0mnaUys8kDk3v/gN0EGyY7kchC1nK9Ll5JcJOYh1zrTmteu9ilz6b2nvMn5tZNb+ TopcMUH0AEVdnV22dgLOXJXiXWjwzkIwhtY0zSMiWub31ECh4XQ3mwDgWvO4UQ0RSLMD oIwg== 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=nRZhkjy0dQDJbOhaefbmkPeax0IavLpLmH4VRR7TqLc=; b=K/7g48dd4Q5nNuLrpS0rAdYhyZPMPXKTJDQgdzq2iU8d1lcQrbYOcExht1NpVzkWNf 5TMjlxuUWKB39ppQXG8sJMKLJ053Wa0QATO9OnyoCtNMVJnqEgFSJo2Jqe2/6TuTyvbE eBRQpzMSJhX3tsXq37L13liiuhjpUGDWzoKrfUsHBoV2nDekYM5nOu6hS4lRIXwHPRpF tb1HLcD+jAawNS8+ah4RR65x8GHmCof1VHJSU+90HSambhmNcOerwEmIIU36T0CotW07 8Sbya6/6Lb8Piv3qX+0TJg+dIZmHiKCR1MU0Jr657AA9wBS2jzatg1sHcGuphVHawgiu FxbQ== X-Gm-Message-State: AOAM530XfmQzwAg6KF3Ni3vd/D5uD8yu+PJN1LYqo1Q2rMQXViib10oj 2DLN2hXP+QMYjcpieP3nfSgzVA== X-Received: by 2002:ac2:4f89:: with SMTP id z9mr11868477lfs.46.1626525625957; Sat, 17 Jul 2021 05:40:25 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:25 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 6/7] drm/msm/dsi: stop calling set_encoder_mode callback Date: Sat, 17 Jul 2021 15:40:15 +0300 Message-Id: <20210717124016.316020-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.c | 2 -- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 12 ------------ 3 files changed, 15 deletions(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 5201d7eb0490..77c8dba297d8 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -251,8 +251,6 @@ int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, goto fail; } - msm_dsi_manager_setup_encoder(msm_dsi->id); - priv->bridges[priv->num_bridges++] = msm_dsi->bridge; priv->connectors[priv->num_connectors++] = msm_dsi->connector; diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h index 856a532850c0..e0c3c4409377 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.h +++ b/drivers/gpu/drm/msm/dsi/dsi.h @@ -80,7 +80,6 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id); struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id); int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg); bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len); -void msm_dsi_manager_setup_encoder(int id); int msm_dsi_manager_register(struct msm_dsi *msm_dsi); void msm_dsi_manager_unregister(struct msm_dsi *msm_dsi); bool msm_dsi_manager_validate_current_config(u8 id); diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 27d3b9ebf831..693078e68fd4 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -216,18 +216,6 @@ static int dsi_mgr_bridge_get_id(struct drm_bridge *bridge) return dsi_bridge->id; } -void msm_dsi_manager_setup_encoder(int id) -{ - struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); - struct msm_drm_private *priv = msm_dsi->dev->dev_private; - struct msm_kms *kms = priv->kms; - struct drm_encoder *encoder = msm_dsi_get_encoder(msm_dsi); - - if (encoder && kms->funcs->set_encoder_mode) - kms->funcs->set_encoder_mode(kms, encoder, - msm_dsi_is_cmd_mode(msm_dsi)); -} - static int msm_dsi_manager_panel_init(struct drm_connector *conn, u8 id) { struct msm_drm_private *priv = conn->dev->dev_private; From patchwork Sat Jul 17 12:40:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 479237 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2346553jao; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV54TwH4+lYDrV1DWAazovRWYOuOUxv5ewg1n+RD5I7k4P3+bXxf3qxoQO7xykTz0nDpsq X-Received: by 2002:a92:360e:: with SMTP id d14mr9785408ila.106.1626525629655; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626525629; cv=none; d=google.com; s=arc-20160816; b=PlJbYHCQqN3W848+xv3w1hjak3qTQIrRi/QH4tA5Ei2MdhZva4FfNiD85xPHJUIIiJ Htfs3CQUDgmHcJePzZUubJe8RY6rBUNNAqUb6DBsTXOwDYHWML0r6f/o8N/rsXH2efMd yIV0Q3q9gprg68uyel8zXVqyIFh59Sq20W38tlW/yOemD48vVYDap+tQ+pY5imLcGTvA nOGSK2NJcMsXLj/aoV9QEOdHUjcwAS5LLntP0/DVILOqyEDtT7n/tcCprW2/qB0+CneZ GTxMPUoybCvxg95CvE/6U6n8T8ZuRheOYsg1/0PP2EJ/4HXOAhowl+8HZucqfwxvehvT i9UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XvCGkdShjzVXwoehYqCYEiIRtFRTu+7v5aX+Z4YnzDM=; b=xNpnF5bX+90vMDmOjk0HBVXbS0WMOaRS8wZL3pHIF5yiv9xxjeRgOwLdei7wC11GgW l1EKjbtVmAZL7r+Dy+0iEFFW3RqKOA1ajZ25Hkp0/6qXTCTwMzidpkAy/1Wg+mpSofWB XjarBD4K6zkl8+oKxQTU9vYi0gwVlL9SVPUFtF0c5q+fcpTSH120ONh1LplSXU6ya0xA QrPAlrqWu5dB8XJmNRnKIjGCM2lkFvB6sUUQSs5Uh8eV/ybHVkxYqYQfVa+35Hzcl64/ B9sZbYK1zWWum26pr5+i/BwXfLKgFEU5qdlpkPzqKirqEeh89n+geV4H7GnHue0dxRXx hoGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AdDsrFsB; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si3403533jat.76.2021.07.17.05.40.29; Sat, 17 Jul 2021 05:40:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AdDsrFsB; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233764AbhGQMnZ (ORCPT + 17 others); Sat, 17 Jul 2021 08:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233740AbhGQMnY (ORCPT ); Sat, 17 Jul 2021 08:43:24 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FEAEC06175F for ; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id h9so17984993ljm.5 for ; Sat, 17 Jul 2021 05:40:28 -0700 (PDT) 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=XvCGkdShjzVXwoehYqCYEiIRtFRTu+7v5aX+Z4YnzDM=; b=AdDsrFsBavFcY/O0/flrJgv9JEoRa5UhZxx49BPFfbSpIQF4V/s8Kddd7AShWVPdht RVYSsxlLl0K5e35LuBhlC6zeqMbUZqd3R5QiQfJ5AbYI+g4kMCvnZ/qhHeqDcV8r2Ffh 5bDOW4L+3CxOZGuW/ls7H5684+sZ7FV8fo/YcLrs+I70md8BeOa7zFZE52l3+0rVvK53 AL0RBz6o0VgiM1eUMfIH2iHXG2RzPnwLEOdRrBC1VY6E5MpkmZuYvAzrXJw3E6cw6PHP fBwSIrlBzLuUbrYxX7AyKbYrsnr215QMIUhTzr4vVL3BJrDf/NxMG3ImsqObbrpJgaJG xgug== 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=XvCGkdShjzVXwoehYqCYEiIRtFRTu+7v5aX+Z4YnzDM=; b=VOa/bX7WUwIYZmL4v7+ipQ4rpNNH+RoOkEqpYJZ9ryuZXFqzdWfbSORvrazYEqMzEH fIm9uSUQ8IBj1OMa8+VPig066mGlB0z+c1tpin0dy4jsm9qw2EWaO5hvgqkKvg+7DzHD nFfoIdySOnrmgch3IR+GeYRy/9wpk10ElFO8v/RA4SKZtfrb+hlk3cS2+/4P9QfKv2eN DMO6XpZ1X5M1Du1GFRGSRx/iRtLhzD7/Bs47+7kNRtRBWO6m5fS0UI0CtkzlLekSqz/o xz/Mckp/jx6kS1n81OwXxSqBWX4zxM+NNLXhhKnacz7XFtL2pIBU2+vFcTBKRxzvXZX4 XBCA== X-Gm-Message-State: AOAM531i7grT4FKd1QbNmnTeQ/OEY7qlsxi8hh5DYRCDykYxUwaMy1Su xLEstLi2eSEHR1JaLY3Atbis8w== X-Received: by 2002:a2e:911a:: with SMTP id m26mr13832763ljg.109.1626525626738; Sat, 17 Jul 2021 05:40:26 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f25sm794264ljo.126.2021.07.17.05.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 05:40:26 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Cc: Jonathan Marek , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v4 7/7] drm/msm/kms: drop set_encoder_mode callback Date: Sat, 17 Jul 2021 15:40:16 +0300 Message-Id: <20210717124016.316020-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> References: <20210717124016.316020-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org set_encoder_mode callback is completely unused now. Drop it from msm_kms_func(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/msm_kms.h | 3 --- 1 file changed, 3 deletions(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index 086a2d59b8c8..9484e8b62630 100644 --- a/drivers/gpu/drm/msm/msm_kms.h +++ b/drivers/gpu/drm/msm/msm_kms.h @@ -117,9 +117,6 @@ struct msm_kms_funcs { struct drm_encoder *encoder, struct drm_encoder *slave_encoder, bool is_cmd_mode); - void (*set_encoder_mode)(struct msm_kms *kms, - struct drm_encoder *encoder, - bool cmd_mode); /* cleanup: */ void (*destroy)(struct msm_kms *kms);