From patchwork Thu Jul 8 12:28:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471228 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233593jao; Thu, 8 Jul 2021 05:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTSDelsqZoxmfsco+UNXpBFxc3Q6Sl1IqGSZ+JX4n899DJxJd+eBlAFDLw6uV5kYjPin4t X-Received: by 2002:a92:dc87:: with SMTP id c7mr4578964iln.306.1625747330726; Thu, 08 Jul 2021 05:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747330; cv=none; d=google.com; s=arc-20160816; b=Ji5EufP8/M5vGDchOeiXoYLB+gUunPcnYo15r/GhtVylogquI++NiWH0wMci01rU4b fyvLYLJ8iejC4/AMq3xsYIsV7UEiXGRu9FIaXFbd4toMPp3Wl0XEBLYKEmp7Etp4ww/5 mwg36K0WyzAi1lnGU4VGE23dKpORDL/pMIdD+JOgCUFZM5AzJKw9FgNf99goCwmyjy3m 8NmDJw+a4BsHJbEhTWxmJMF4MHXtRbNIVNN+49Zd3IGn0zT96zBS384HEH0XQfJg8AnL /WcnSgG/aTPL+0wJ0wrfkZgJCODNZercV8VmXA05TIOegXOZaMMLZafYabTJFkTC0Br0 y8gw== 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=UCJnS1rL4Te0Hge9kx9H1CbRrPMlxrguIkxv/dVH7oY=; b=k1ZBa8GU/PcwMJvx+Oka3rdCu3bU66KUsJDjfYKjbwGQlbX5Gncz00zgrDDMPuR9r0 KtleE4TamTVOsWS20gCdaV/7cSCV0ZqoeZEJW75fHiSR0X98MaBCGfpO1AuFnEejIXCS XbXIZs+UwXgAudVX4weuF4ebJVhaQiiDMqZsCw0GRnSvfoAWaPbLroCH4HOeEiTmdMAQ TGTP05JX0jh+6JvftA5ZxH6of73ilE9z5r8TXc4oBmVNXPUkXkb6Z28Z2MuJ0elNik9R Do7D+1N0/M9Yy37/PKaCP7bHTtFpoUzIfUzd5wIGagA007x/7ehSVcG98QLPiahAYHk3 VU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kSkDxDzT; 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 d6si2222619ilm.75.2021.07.08.05.28.50; Thu, 08 Jul 2021 05:28:50 -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=kSkDxDzT; 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 S231490AbhGHMbb (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbhGHMbb (ORCPT ); Thu, 8 Jul 2021 08:31:31 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4701CC06175F for ; Thu, 8 Jul 2021 05:28:48 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id f30so15023330lfj.1 for ; Thu, 08 Jul 2021 05:28:48 -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=UCJnS1rL4Te0Hge9kx9H1CbRrPMlxrguIkxv/dVH7oY=; b=kSkDxDzTb7LcV6XQx41n9Sv2K7L1QLothcocJ760HBjP8eXD2FZ0QzI044lIqMETBe yreRl+qXmStTXJTWJsJJXw/kA9Yso6J2R/Og0x0PYIFIS0/hpEIBxR0KsoJtwUxSw0d7 Z0ECnRjOi1kySscEikz3CFKxcFFKKtJQT0lEQ1DBpID+2+abMcqlTPKCFIZr057AuNqH 3tC90uw0Voo5fzUE9nRBbxcDzvSSswh5vgEVMYUWUYlDghqtVGuuBYnYaiRUhywgkft4 9HTaaZAI67GJtBl5w9w1pDpl2FK3/iu7S5Lnm84SRJ5O3HKfEF07A86hTZ/AKBxLXf8u ajbQ== 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=UCJnS1rL4Te0Hge9kx9H1CbRrPMlxrguIkxv/dVH7oY=; b=UzewQso0iMTpDxzgeUsapBQgLjtTf7idBV0mPuv85+hucn/UBVlMvRniM4UMQNZG++ PvtMpr3PuO8R+lH34jkdb/PiwgAwryRmneCBSxMyRh92NjgrGDOJ53vHmwdA1Q9Odpld lc58k7TMEKpZPq8AlLMHbzUMgsA9tFzcntD0N9Cu7wcOVCfXnL6UN1KAsYOpTbO331I4 ZXqrjh0ZavfdJ5dVRqFEetwTarmGF0enChbr0Zn6EcUUCfiBLKtbiMXoDAiyUteBw6+L gxGcWL76F7RLLNmX5RlzFmyJnK22WyHx4VrWJ2LQwiv31rxVTqaeDOesOP1a11QefQUv rvfg== X-Gm-Message-State: AOAM530bBbe1bJmR+52ApTlBMrLT1kfur7jE19IYLMqqaODR7+BxOREm f4jEfjcPIuaT3+ehMBYEIW1vmw== X-Received: by 2002:a05:6512:3e0f:: with SMTP id i15mr23335751lfv.653.1625747326337; Thu, 08 Jul 2021 05:28:46 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:46 -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 v1 1/7] drm/msm/dsi: rename dual DSI to bonded DSI Date: Thu, 8 Jul 2021 15:28:27 +0300 Message-Id: <20210708122833.363451-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- 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 | 30 ++++++------ drivers/gpu/drm/msm/dsi/dsi_manager.c | 69 +++++++++++++-------------- 4 files changed, 54 insertions(+), 55 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar 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..eb988faddbbf 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; @@ -692,17 +692,17 @@ static u32 dsi_get_pclk_rate(struct msm_dsi_host *msm_host, bool is_dual_dsi) * 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 */ @@ -962,7 +962,7 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_dual_dsi) * 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..1173663c6d5d 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. */ - 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; @@ -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); @@ -143,7 +142,7 @@ dsi_mgr_phy_enable(int id, * 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); @@ -182,7 +181,7 @@ static void dsi_mgr_phy_disable(int id) * 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 { @@ -264,7 +263,7 @@ 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, @@ -366,7 +365,7 @@ 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); @@ -374,22 +373,22 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge) 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)) + 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,7 +445,7 @@ 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); @@ -454,7 +453,7 @@ static void dsi_mgr_bridge_enable(struct drm_bridge *bridge) 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)) + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) return; if (panel) { @@ -471,7 +470,7 @@ 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); @@ -479,7 +478,7 @@ static void dsi_mgr_bridge_disable(struct drm_bridge *bridge) 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)) + 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); @@ -510,14 +509,14 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) * 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,7 +639,7 @@ 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 @@ -648,7 +647,7 @@ bool msm_dsi_manager_validate_current_config(u8 id) * Skip bridge/connector initialisation if it is * slave-DSI for dual 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; } @@ -809,7 +808,7 @@ 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__); goto fail; From patchwork Thu Jul 8 12:28:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471226 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233587jao; Thu, 8 Jul 2021 05:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXoz/7/iFJkAsLCkIcztTSPwYzwiPypP0tofTo8/9obQAh7QG23DsnsldjcIEcd/0zWllw X-Received: by 2002:a92:1906:: with SMTP id 6mr16860571ilz.273.1625747330294; Thu, 08 Jul 2021 05:28:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747330; cv=none; d=google.com; s=arc-20160816; b=POlnhZsMPz2MN8/5/lPHNBycLU99K3YML6wsQe5HuZ72wSnnA8xX59CDMWOtmqwWO/ etKWlrdhCJPMClWv90kcKRs8+QdhSkT8+4Oy4KMwlT61F+6+Ry4uarFcIpptpNoaTTHg fpZsCIi4CZOKjdrCwSrOIYol6t4cU1sZmlZQF6L/WZ9Oh2x4TUD8uqx14DR+l/cDI5eV UfcQVOhMDUwtf7WfQZPn6wmI9T1ktl4nwc+eIvZBxmsFQx6vpSzIxgxiYTqKm7fafdt7 ++uVlf6Rd+1BZEvUJulvB75XGMJOzpJ+jYaplnYo4TF5ZV+xEJiqGo0bOVpv2t16vlfF WLfg== 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=l6Tvwf3xoH7/sKW24x0WPLkLwsCoiC0JQXnDLfOYpx0=; b=uFALtaiZv+dkZlNqyfdfsU1Dwi0d31K5BY175KqW0dCrmCjLobYrBP2EOOQT8NZo4A j/AAS1riZTnV/8fiO977TICe0vppjC9YxFIoEeov0/VQFBoaUxx5kcZ27ZJwhCyE1SV/ 7uBJKvx1itddoqCGFBDI0FNNGqdRNv0Eg1p/G2f2/OCGQ+F9yz6pYKPcBKwScG2caAUH QjdjMI0OlwRbXdtwpqoNkyG7nDRib63SfXKgd+xaGCK9RYBuQfIwfeuTSxg5tDkLAtX8 +sn+Xs6d5uyzGcuqEeQ81jTBqVLsNFU6+jLy9afu95NlmmYrdVuL/TuFJ4Q/yipEs+L+ Gdtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ym8xdd0z; 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 d6si2222619ilm.75.2021.07.08.05.28.50; Thu, 08 Jul 2021 05:28:50 -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=Ym8xdd0z; 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 S229862AbhGHMba (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbhGHMba (ORCPT ); Thu, 8 Jul 2021 08:31:30 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4C23C061760 for ; Thu, 8 Jul 2021 05:28:48 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id t17so15062496lfq.0 for ; Thu, 08 Jul 2021 05:28:48 -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=l6Tvwf3xoH7/sKW24x0WPLkLwsCoiC0JQXnDLfOYpx0=; b=Ym8xdd0zpaLdtDLGsapS7LnNKFLzjlmG6IYY99Z8LohDO3ARlw6HeJzepsMdNsgKhJ QkVjytKfbklVhQr6/sBDWQcZvuBllIBbDgWc+QTfu5zBb8ZdF1G+mX8/65AEF7+fyyBs zUoC1heVYRXt3PpAswnbryyXtTomO2s1dt7xNs6q3SEFuIqQiQf8P76R06SzXCwaeUjY M9s2K3CtGNxoDlVCBf76mNZfvlxtLqAoLq/hQ3MalxdSKwjX/JNO3h78VdUgvDV0Svmr Bj5Spm9Pk4PtEEuqtxHe9EBTdRiex4X3yLbLQj3EqECxX++veudA7OZRO8LFooMTImf7 xLPQ== 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=l6Tvwf3xoH7/sKW24x0WPLkLwsCoiC0JQXnDLfOYpx0=; b=UIWA9CgqwJnKUHyAJZTho73oEHabUoQUaqPahZzbBBCIBbFBik4U7G42RuuO9aVfYt 2pu9x55pAfv16dSDSQA87padilygae++/8PM3ces5+1CVzaOdf6bYqQk4Wwa8if8sNlf pMJfJcQ35N8sZY1NK3X/zfTfzY73ZvZQ/XrUdYfhTgum8GK2P+ngoqipZ0DNka6fXNt2 s8Mlx0zvHQcVU03C+2EqHA/HxTjSB2tqUUzSB+PCeyxb+QBKm+4c/Au9kgFJPlcdmwIg EVvcy5QTG8R552Kch/0jAZi8nLO+Pg0l4a7k5xudyfkgy0MOzjC0iiUuI/WhUXUFI2Ge z2Tg== X-Gm-Message-State: AOAM531Bf/deqhtc5rM98AqjBaiQ2yV8qun0k8pBi9cgyWLPovT7j658 RQsQdT6AI7ueS2sBuvsOx6Nolg== X-Received: by 2002:a05:6512:34c3:: with SMTP id w3mr6804851lfr.615.1625747327054; Thu, 08 Jul 2021 05:28:47 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:46 -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 v1 2/7] drm/msm/dsi: add two helper functions Date: Thu, 8 Jul 2021 15:28:28 +0300 Message-Id: <20210708122833.363451-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add two helper functions to be used by display drivers for setting up encoders. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 7 +++++++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 14 ++++++-------- drivers/gpu/drm/msm/msm_drv.h | 12 ++++++++++-- 3 files changed, 23 insertions(+), 10 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar 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 1173663c6d5d..a81105633d3c 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,7 @@ 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(); +} diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 1a48a709ffb3..e0528dfd965e 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -350,7 +350,8 @@ 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); #else static inline void __init msm_dsi_register(void) { @@ -367,7 +368,14 @@ 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; +} #endif #ifdef CONFIG_DRM_MSM_DP From patchwork Thu Jul 8 12:28:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471227 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233601jao; Thu, 8 Jul 2021 05:28:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzfPvM3UIg8GHH5pmNvsNHZT2hBEutfPmWXYtVH9HBpOn75VCyIsaG7omPFK2nzT2iiBMm X-Received: by 2002:a92:a304:: with SMTP id a4mr22816154ili.197.1625747331116; Thu, 08 Jul 2021 05:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747331; cv=none; d=google.com; s=arc-20160816; b=YVMllEt7NqmZQ+ME+mp1JHLPwEwNuX3Pa3TgbvvIGAeSQrxOqB3xMjGUk+ulbaJREP ITgDjY50SqPvXaJdPBZhZwtie3lsk2GFdsxG3YUx8lMOW3UprieE8MVq7kYRsYaTGURp W+2K0EH7mNSgK9IBM2UgwIlhzkTkLlOaOZNMvzozvo23lTAmFlGOGc06PUTlu6JYeQxU 7ZTKf0ittKLuY0yhbOOjv33hIbsj0NoUY0SEMoJnpQy9BOhoAyP4XkNJ123+pJ6S0+Al xWhkdfQ7pjlbvvrIuFomSsI2qGRQvyuycR/qNrMWafwukpBk94+LKo1BxkP4rD/eZcB0 2jZQ== 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=DI9Ts9dnxWaDfjxioQ9DRLR5i4GIHC8m37WULWm3o7s=; b=eN8dCSp3/0ndpjPf+OhwkKb9lU59nWKUpx8qH/9rr8YYyLbctTuvRiw/qPmu6CK1Cr 7q0dSXIHAETiKpQvcXt2/mmnV/imtC03xYK/74I1CPyxf9zRxuE/HBkp1sEDQ+f501nb 5cpUA1WYJrUKp/DaPWqQQ/Hx3MBK7c3vZJeyCR6aSlXnfnFkru03RpNZKB37ZGnTF4VZ gEeGR+klQU5FDouozPp8m+IvaRObpSxPoQRrPQ5a7ekNQil9XXIuLvDIyFwuKOT3XTOT DaS9vXi044b/+x2COfk9cwoTExVukrImko9Byd9gXK1o8nMaTL/sFbR7mJT15lb9+XSf UvDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kdkdVBUJ; 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 d6si2222619ilm.75.2021.07.08.05.28.50; Thu, 08 Jul 2021 05:28:51 -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=kdkdVBUJ; 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 S231133AbhGHMbb (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhGHMbb (ORCPT ); Thu, 8 Jul 2021 08:31:31 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A2C2C061574 for ; Thu, 8 Jul 2021 05:28:49 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id f13so14849882lfh.6 for ; Thu, 08 Jul 2021 05:28:49 -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=DI9Ts9dnxWaDfjxioQ9DRLR5i4GIHC8m37WULWm3o7s=; b=kdkdVBUJhLeNVm29nmbQt7loys4OXtPPNVmWKhYsDMIa4jiGf2nnaZcGdu73I6wG+P nHcIaYoRVVb5jcLKb323eig6XEhQTVf6wU9Q5IDI3xuAgzV9VvXOFBny8Hbk8CRoKp/n 4Da6WsGRyVHx2sZ37C6rZWOyBJs1I7t0dlWOHyF7J/3YZC3u2orlACTokxwE4W8wvG46 2HSMhRNDQo+UVQegAgEQAHtVud9QmJ+BgBhB4Ku9cGGydDOU+up1D9T5FWT/cC6+UCxC 46tVJfZFWeDTHwqW1HADhOUSEXiE2q29JnXYZad7D7fer04Y6B4TkfFUAD3T/ETjiGan pKYA== 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=DI9Ts9dnxWaDfjxioQ9DRLR5i4GIHC8m37WULWm3o7s=; b=RP5xlOYnygtU4EgGv9a0fOGdOxnqqYOIvouAYJgKIDC2nVxZb+9uq3Gf11jcbEAVc3 Zp6TElFE3v8JTgwkWsJhJr5zRgXSv2JdwTxFEA4L2Q03O4mzPk69EdjsDF3ItLx/QaQ+ 2X+TApCCrtr0Ij87VUm3SCxaPHZf6uhmvQipbi5LdzrPi5MGdR5kWdz+Lz5CZpjlz0y7 PtbJkUuZzyFcEjfQ1gI2aTZfBKIk5Vly1P0jt9VcCyT3BUtpkTcKKIwJksFe2/r7YtX6 f8RIeUUFTvtFFK3/7qPTx3+obM1pB/gdUvRQ9io1jIL50rKzI3bapZr4EFPqbYTevKrc 8UBg== X-Gm-Message-State: AOAM530K1QJgdVZ+amAcILBX7uuF9b984SVxfU+/KNFwrtdWcNUxl4Do bBBHPn2dU5zGqaPt9PzWiQ4VhgvH+LaC2A== X-Received: by 2002:a05:6512:1315:: with SMTP id x21mr23652460lfu.87.1625747327892; Thu, 08 Jul 2021 05:28:47 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:47 -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 v1 3/7] drm/msm/dpu: support setting up two independent DSI connectors Date: Thu, 8 Jul 2021 15:28:29 +0300 Message-Id: <20210708122833.363451-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 102 +++++++++++++----------- 1 file changed, 57 insertions(+), 45 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 1d3a4f395e74..8459da36174e 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++) { if (!priv->dsi[i]) continue; + if (!encoder) { + 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; + info.capabilities = msm_dsi_is_cmd_mode(priv->dsi[i]) ? + MSM_DISPLAY_CAP_CMD_MODE : + MSM_DISPLAY_CAP_VID_MODE; + } + 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; + + /* Register non-bonded encoder here. If the encoder is bonded, + * it will be registered later, when both DSI hosts are + * initialized. + */ + if (!msm_dsi_is_bonded_dsi(priv->dsi[i])) { + rc = dpu_encoder_setup(dev, encoder, &info); + if (rc) + DPU_ERROR("failed to setup DPU encoder %d: rc:%d\n", + encoder->base.id, rc); + encoder = NULL; + } + } + + /* Register bonded encoder here, when both DSI hosts are initialized */ + if (encoder) { + 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 Thu Jul 8 12:28:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471229 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233618jao; Thu, 8 Jul 2021 05:28:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxew/zqTukzN0gZSAFMJGI9iXyc3M8DxRSzlI4PWDwA6H/KgvppTNJqvglgZb2P6wz3aeG6 X-Received: by 2002:a02:908a:: with SMTP id x10mr25944797jaf.30.1625747332553; Thu, 08 Jul 2021 05:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747332; cv=none; d=google.com; s=arc-20160816; b=F6KclVuK/P5VmU0b37tRLey+z6e6YsDPvtvqlkJyEvhLMr4T5n1IS1imee0sMLr7Zf 1C8OW3P/GadQWGpnFp3i/9AHB+OdgQ1kMfUt5uj4KQr2RyV9054CzSbSY3h+F3ubaxEJ iLyJwzVuznczAxX0WT23wgF7RtQp3q8dGTQCfX8WCDejSozYfUtDN8Z+Vh9WUJTB1yC3 B2x5QU4jM9xMe6t5+zxapVMpM8TuITPg72SVx9QQSgYpp3QrLNR4SwjMrpqYDVB/2xgd KHnRgYW96IXfJxjUfWiam0whVZJdA9YUuf74redmXuTFjKJ0p8Jh9NYwf2epPnPKBW5f 0exg== 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=9dgs04cWZ3Msqx0W8W8q6j1oCvkBtnZBWkKinotEoUY=; b=DfJnEYyQr50R7N7lXEN3j5sMJ+s7LAfZKZ7xxy9Hs/RGerP7SufWzVnOrTnaiVMeWz S/wf1Bg4HQV+f0NRf9qOOXhzVf8cpAWgmG8IQ58h1xvlB2SzpEsY9G0m8EEhK1VZ+Qku lwVW4My5AJOr5fOdPj5iMyXjJaqhKXA73FYED7penmTftVFJoiSH1BBVuWLvmv2OdVuC JV1GNk0Qz/RBEe6drMtpHiZbrS/IJHb/xlpZvvn7K2aEJg182GISY2n0L89KDRupN9xw Qdoq22pe8FFOkAG4/iUZr2fUcpv7yWBqg9USOLx4fCE7yG1d3Ot58WmZ3OTtEX1X+kx0 Te9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4zG8Ky9; 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 d6si2222619ilm.75.2021.07.08.05.28.52; Thu, 08 Jul 2021 05:28:52 -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=B4zG8Ky9; 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 S231553AbhGHMbd (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhGHMbc (ORCPT ); Thu, 8 Jul 2021 08:31:32 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E23BC061574 for ; Thu, 8 Jul 2021 05:28:50 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id x25so2233876lfu.13 for ; Thu, 08 Jul 2021 05:28:50 -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=9dgs04cWZ3Msqx0W8W8q6j1oCvkBtnZBWkKinotEoUY=; b=B4zG8Ky92qLBbFlZhH+U2h2FVRIBjLTciaEZqKkabPvWU9yPHX5GrQ25COexC/rebA b0f2GFcF2nOlq/HUvn6PVoM7v+tRdBqzlU4zg5sVX1vmDS211dl3cnIJXKHtCNVpmRnt 7Hp9BmdZwatvPcfikCotZm0XkrtLO0LujPQ/WbyzD6JLoteh4QhJcBesHAyyCvTAgIdl bx/Wom/LhH7TnXVV/XkoSKJLU40LDMUz2mbDTNFBr8h+4/EgWOdil4pK/QQoejqqh1j7 a0BlOi3C5MwNrcfR0BsLqTIBEOwFU0RSyj/1f23gn1zglpAZUbW/H+MKS/j3+Y70I4rp IdoA== 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=9dgs04cWZ3Msqx0W8W8q6j1oCvkBtnZBWkKinotEoUY=; b=IEu4RkGgrdCgYNWvLndZ5ahjktMqLaZfU8IX0r4RlibbejJzkM7cdrfDY4HLm6LSHE LnZ5UZ4b+/KxUAvEnA6Vx7suNyaYUly9rw5VTeVh21zhZGFZQok8rQYXGY3YwX/jwvkY fb64pLme2BoXuMVhi+dQQTTwgCcMl99LNTzxu35X31fcTeBo3py1bBzYR+LTk1NrgO9l fYcZFSY4/mRYyGsFFDXyMNyh1ovhesLxEmcqfUO2SKnl8w1Y00iWRIwj90cm7UnrYrmJ qNfi93MG+vmbJxqIdlaPdy3WfsYhyJO0LTl6panhg6qE1/956rIKbHlKjfwrbMDbS4yg NE6A== X-Gm-Message-State: AOAM532YHUGg7vx57eFpytXCtceSM5Mn+g8fkvuAl/BcYog+2ErO1OFl MN7Qq3uTTdcP7wm9z9f9x+4MkQ== X-Received: by 2002:ac2:4896:: with SMTP id x22mr15612187lfc.600.1625747328534; Thu, 08 Jul 2021 05:28:48 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:48 -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 v1 4/7] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init Date: Thu, 8 Jul 2021 15:28:30 +0300 Message-Id: <20210708122833.363451-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar 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 Thu Jul 8 12:28:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471230 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233621jao; Thu, 8 Jul 2021 05:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN+2nAkHJ3cuW6zqmzdCQGgJGHYLspipx43UXNjIK8D/F/fcE5y6GYNmwjPPTwZn4qp8L/ X-Received: by 2002:a02:9a02:: with SMTP id b2mr21215442jal.107.1625747332932; Thu, 08 Jul 2021 05:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747332; cv=none; d=google.com; s=arc-20160816; b=Vtjj6IpPyYzuL5b9+xFbTKe3GmZjNgWOOf0VEO0N8YtWr5sqjZMbnUtfyI5NoJ6SwS YpA+nfi9FJ/tEODujC7FJeVfCGiLn36vZfW563adgf5MxcUwLvTfCqr+ZfXLbO4qHTv1 enaL2MOQhoQWmWpk0M6SpahwAMOyMJ2HSCApKTrXhw9vHGZD0qKrBCL9qljpU28Iuy0u 1xVgzsxdqzLP6c963wxd/B04FKPkkOvAq0Qsk25aiqrjXH+SuRO//4nZv+8/YWT34ZAT 6U8xpkuKxNWNoFFgVPlKjUJWv1Z7OKHhKOTneYjQUYbBJfZ+7i5gKD69QrnOLnfmMzAy S7Zg== 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=2NpJ7aO+Jt+ovnuoQ4df+eCNMUKTUxxJ0ApMITBvevY=; b=VRw8S5SEIVRkq31JqhmaIX7Sfl5px3V0qVpq2Aaun1gcmrSmLc9K6Bc3+XhwBS50ki CYhK5JKT/i+gddFhSpTbMonBpuR9FE/1IZ0mR2ePlTuq7P04+OB1uuEsrtYj+iOlmgAP Ensy0CMcPT/omsagO9iPI2RxVksKoaq+1yBOfUmozFWMjrkFzxmOYmvoCfHiiH/JMEKC i/iXKOqZEJ53ag4uctzMD+VLzJSutLPKk5qKLiuIo8kwdGjokJn6ZwEPwpMsGNqPjgcw eLIAqDF1xbwoRq/1LG38b/igkIHhmM3QnvlyPCmyYPMMo4NSJ31820fdzUdr2LpBTVnj 9hBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i1hA8qYn; 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 d6si2222619ilm.75.2021.07.08.05.28.52; Thu, 08 Jul 2021 05:28:52 -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=i1hA8qYn; 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 S231587AbhGHMbd (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231550AbhGHMbd (ORCPT ); Thu, 8 Jul 2021 08:31:33 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05ED7C06175F for ; Thu, 8 Jul 2021 05:28:51 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id n14so14929892lfu.8 for ; Thu, 08 Jul 2021 05:28:50 -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=2NpJ7aO+Jt+ovnuoQ4df+eCNMUKTUxxJ0ApMITBvevY=; b=i1hA8qYn02lHN59fXryMVrsz/glZorT+uR3PeKBbNchuQuiJop0XdDuvF22k6wZPHT wpqBh+sKQuX9qgZPW+Iw4zSPq6S3lmrILb8Cifb1eh8uqB5zR64pGv7LEVKUlUZehjAR WrsewfIg1+8fVQchHHVKN4uO+LwadYEiJj8s6ylrcdue6txFA0V8ylclA45Sas/P/z6K WFq7GEjGtROVTGuWHhRHGs4zwZq19SXJzBPqWT498t+ANRk9GqYJ/LAfjMvuTDWzvlFG KR4ktG8WdWe76y2wuxkV6+A4W1DuUIbAv2L1/h4ExAmCX1A6oS7qC0Kdk/Wozpb9IZNA pwLQ== 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=2NpJ7aO+Jt+ovnuoQ4df+eCNMUKTUxxJ0ApMITBvevY=; b=J1MeltXx5Nq+YIeT3NV45/rcqLFq9FjfPsk/xWNi3oiEeR5Vaajkrhd20zL5JBxcoO cwTpNNYgKUN19NrR9dg7EB60vo8IAmv6CpWINUzft9+ZnxSS7OM4u2ppMjNYLN7GRw25 loBImzYh+fc+NlaE9nSiBUoQEcuu/7R5pgo0Bb6B+eBghU79MEqNWQLcEZjZSYtDLCOu zJm6JO9pD7Bp8MkV44tk/O82yWIVEm4ebuwVfslA2EExE1g9ePwmG/IbGprdpdNiS6Ga fV+OMBiok8w+6OQtgawBYKdzUdT2k/dDTbLpPXSivmuxCtazCx1qHjkxs8+tFqvnud8x heIA== X-Gm-Message-State: AOAM530u+lYbs0uIwN0Qorx5ZI4loWscSzAE0XQ39sy54tWALa4lcZ2n /y69BLU7GrouDo7zNI5uxo1STA== X-Received: by 2002:ac2:4d90:: with SMTP id g16mr12625569lfe.431.1625747329399; Thu, 08 Jul 2021 05:28:49 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:48 -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 v1 5/7] drm/msm/dp: stop calling set_encoder_mode callback Date: Thu, 8 Jul 2021 15:28:31 +0300 Message-Id: <20210708122833.363451-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- drivers/gpu/drm/msm/dp/dp_display.c | 18 ------------------ 1 file changed, 18 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar 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 Thu Jul 8 12:28:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471231 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233627jao; Thu, 8 Jul 2021 05:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGA3Mis3zku7bvdD3DCz3OiAyAdnGMO3410FR1EWcIwJx81mWP/UHI+iKN9kiWkvncy1Mx X-Received: by 2002:a05:6e02:66e:: with SMTP id l14mr21916792ilt.211.1625747333244; Thu, 08 Jul 2021 05:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747333; cv=none; d=google.com; s=arc-20160816; b=eqRfv8cSi5Es56Pm31LPag0rwf/WuNVUKRAGjVGDMnggX558452h7MTxHC3hCaAMMF IwApjmcRfnngH9kh21IMaQiJvqWAx/Y0Ee2v/vfVVuc1KyUHEpw5XX+sGgNxkC2yRa/+ 9SesZERJPiXqpCpXoqIb0w/wn/kgPZZt0TJDhwdtlMPD7tViZQL3fvdTTp7xGlSWUKzp m+2sDXrIOB7YL53ZC8WUPiorM3qQMVCWOuMBPBR9DFkVj/1bpnc65Ojc3jxwMyk6OxTz tLsNKRvrosq2EllDWDwGSSvwdGHH6bwqSzWv1jmhHwS6IZnINgZlkI/UOKtbOXAABdni 8C/Q== 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=xmIwt1LqFtceFX0+1IHR8SZWAq0rLMjLino86+vTL9k=; b=Qh4FfRn/LHOQ0QqpQ36KtHDoyg/crRTICCnw8N1I0fxhRfWYItKky9GD5SxCSzUKsp lwZgRrVAbEUE/6N/sa/cKrHYM3ORQla0Qsej3vkjEehXNssUevOO3mGuWMlNTAPYV6gM LyLKQSymQvfqIidx8OfWZ1rYNOslyoRGo7EgrmiboRagp6YWD6xrhtGMpsiCXemg2ksS jIfq5y95qArbikuI4xSsy6Gc+Ro3/J+XjOa3zR21amIUEGvgRG0daeJLwU4mhYm/39g8 NoQ5bl2i9q+E1tJKNL9BxmyxIcUF6w3wtsjmoCurRvCn6jzgQYBdznayabwEGAISh6G+ i3ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YI7n/PtY"; 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 d6si2222619ilm.75.2021.07.08.05.28.53; Thu, 08 Jul 2021 05:28:53 -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="YI7n/PtY"; 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 S231550AbhGHMbe (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhGHMbd (ORCPT ); Thu, 8 Jul 2021 08:31:33 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4880C061760 for ; Thu, 8 Jul 2021 05:28:51 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id f13so14850249lfh.6 for ; Thu, 08 Jul 2021 05:28:51 -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=xmIwt1LqFtceFX0+1IHR8SZWAq0rLMjLino86+vTL9k=; b=YI7n/PtYqgthT4U18+oZ22kSh0qPLqlnRdZzVTdZ0Q/crYnf1mZXBQk9drhK7ycbr/ 4azjSLDLAJ+NZ23s5vtIDDqukktgBuKtec4H39w/yjXula5zJkEGddMTsr+QcNNRKE/i bpvPxSrUoXqKeD/fr+Z31ylQTNb+2x1f1hRyqoNIwm+1xBIm6o2szts7+iWfCs57Ap0f UvbyAXbbRD/tGMcUEP67k0jD58MyqBbFpuLp/68/dEKZO+XHfcRIx/oehaCU6foSlkhv dxBrJ6uQr1Dv3hkKy8Ics2arleg9ClfaLF0H2UVLo6CPi6V/875I0ziHDmetLVSIZG1r ZZBg== 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=xmIwt1LqFtceFX0+1IHR8SZWAq0rLMjLino86+vTL9k=; b=NPbAsE6aX2u22EoNIAbLrwv4l7HDV/DNLejat18uTHltG8pD7jTwQUf7YhheiC4J8Z VTSoLCgvaiSRb5am9bwBjl01uFpbpLsWyADayNtvUjV02phMC0Dg0KSXBn18W8ge1yov GxfZx1mBKcZGbK4vDfWRwscmhZFCjjlnpP84gBIi+7vm0zqxyaxXJUadObZK62AbqSLb SDhD+mkQewej+FTqB/HJwuePp1kCaDgO+qTVe0VEXaUZM7DJjGAIV0ZhGgrpBt0kEPB5 oREBN7/xmvAp0ezmO14tQ1RubUVJ2y/fOLf7tGO/ToWOLE95l16a7O4WKfMjm9anyTm3 G76Q== X-Gm-Message-State: AOAM533R3+inJ/E6UnZc6hGRQvYAJSryuocA881y/9Ambct4DBeuR4Bo bszJAsgefwJui3VQRrmkk/oYxg== X-Received: by 2002:a2e:752:: with SMTP id i18mr24342680ljd.497.1625747330160; Thu, 08 Jul 2021 05:28:50 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:49 -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 v1 6/7] drm/msm/dsi: stop calling set_encoder_mode callback Date: Thu, 8 Jul 2021 15:28:32 +0300 Message-Id: <20210708122833.363451-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- 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: Abhinav Kumar 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 a81105633d3c..e7f4e1d8978a 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 Thu Jul 8 12:28:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 471232 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp233663jao; Thu, 8 Jul 2021 05:28:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkeJC3jSN93Odd2AAjzX22GBIoVN/hC5BeNXi4wLROFKPS5DwqS0rBVdw7eqqM3CyCXaq9 X-Received: by 2002:a92:200b:: with SMTP id j11mr22276862ile.183.1625747334995; Thu, 08 Jul 2021 05:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625747334; cv=none; d=google.com; s=arc-20160816; b=t0f55KBZ+sW9rtcULTfXnSOnDSpNo8XXS561dZv5TORKsN9Vi2cZI2klI1Tch1GfQx QCmlXF3w8eCbaDeRC8+Hc8PfoclALZJvqHNJ+b6TXPhrrA6TVHvTn/sxglo2Ty0DE9BR ejJasXohQ0p9bD04S+7BvY96cu3eR35KFspFs0KFTDw+rMFumYbaYq96TRPV0Lm7sz73 jN21TfsIsCo13yUzW+F3CEaH7Fjpsx26W7/TP2b6YONeysj2cUR+C4k2CwhYVMfb4MLg S8lcgW9H+Xm4p7lMRVSP9Q++PAvtNUq84sTat/Bh1hTvNZMqjjGgCrshKK1NIEf7BdPk ig2A== 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=7I80h9aVhqiz7KKnY4LfQ8riY+ihQMK3yCgtkJKzH/0=; b=XjSTvqvyZYxzwKqbs59mW9162qeIF1XsfB4JYwDVhnyxQ1g1IhbFWKcx/rHYeVecmw Mxg0hVlvn1wwPkYYs8mCT+yQRRZdHgGe1TlyRkXYj+ustRqinNBkGgrVNkjSR542irWr gYti40X7edZ5dWLp3HBuSAz8eC6icS5fwj2xz6og+7rssRihHC3l7EJ8EiIWpFRbY7qZ EDppB4HuwC6GbOU1FIAlFAaisadZJdq9nZdLV5OmwyrQsyUIwOTo+6jelyLKsULTr+4D EkIedXgkdgYBerPhe/QKWJGKbEKZsg3pSSSDFagY6nDgAp1qPTczCiy5iILgmN9hXAqV AeIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dZAt1g6w; 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 d6si2222619ilm.75.2021.07.08.05.28.54; Thu, 08 Jul 2021 05:28:54 -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=dZAt1g6w; 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 S231593AbhGHMbf (ORCPT + 17 others); Thu, 8 Jul 2021 08:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhGHMbf (ORCPT ); Thu, 8 Jul 2021 08:31:35 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE374C061574 for ; Thu, 8 Jul 2021 05:28:52 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id v14so15007348lfb.4 for ; Thu, 08 Jul 2021 05:28:52 -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=7I80h9aVhqiz7KKnY4LfQ8riY+ihQMK3yCgtkJKzH/0=; b=dZAt1g6wH7fjpFQDlowAYZN8LtG7zjesMmpA6jmrhqhJAE1HfXHW7YzFzwRvWx1byI Dt012MPl6hYgduqdcjBogdsG+Fvg/tvP5s3Hj1WX86YPrM2GkPc7RjLF3Iii8SroKNkM 3ug7axUM0HJ8atvA5l08Qn/Zsf62TUILw9Thg7Ti0tAefyhiVF0TZfl8RgaJ8n8Yym14 gYCdCim+evV7ZlnE+Ia1nU/qUgExdopbWe4jkbAtNM2XJOhoCnZjbyPRvQuBOaOBYUsD ZcmYp7kCvy5GjvBBAhN/qElPHe0llzlsIdCEbNDzsRK8FMo98+xUtB+q1HCz2q7LRfpt O58Q== 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=7I80h9aVhqiz7KKnY4LfQ8riY+ihQMK3yCgtkJKzH/0=; b=WmkdNGg22P2FEx39bX6EM4L+S0u1uyMI87NAmDeVkoyVKxBOg7lKu7QO9ZxUU7YcWI NGqGqGw+pyaalj/bZlnmHeyEBuNMFcEnppY5VlIUwhMVe96ckTsBYY17KHbOv05U6lF1 lFjkVWee9mhn9MXU9pxp20Y0tdjk3o7XOdF1Y+dNNnI5DwS+QYwv0vyN5RNu+Xp8TEq+ gcATqrJ27mFtsgKtFo+BdS9g12pab/1vlbcYYMub4OWeYyL+CpWrJ1f1UgYL7cXVDQcP lH4cyo7uMKPt5l80zeNmR8eIWxIfVSyXWxswTgj+S1FyWPXlCvzyFodEcr/PM5dlcHRo LhRQ== X-Gm-Message-State: AOAM533BDXYuexVeactHgzdlzm/zeOWbtkHl+r3FtGbAr1I8x5c49jRI 3lecRYrdcokvswqB4MlwAI78eg== X-Received: by 2002:a05:6512:1385:: with SMTP id p5mr24551389lfa.447.1625747330880; Thu, 08 Jul 2021 05:28:50 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id f1sm184368lfs.211.2021.07.08.05.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 05:28:50 -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 v1 7/7] drm/msm/kms: drop set_encoder_mode callback Date: Thu, 8 Jul 2021 15:28:33 +0300 Message-Id: <20210708122833.363451-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210708122833.363451-1-dmitry.baryshkov@linaro.org> References: <20210708122833.363451-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 --- drivers/gpu/drm/msm/msm_kms.h | 3 --- 1 file changed, 3 deletions(-) -- 2.30.2 Reviewed-by: Abhinav Kumar 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);