From patchwork Fri Dec 13 22:14:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 850335 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EADA1F867B for ; Fri, 13 Dec 2024 22:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734128159; cv=none; b=sBSFrZa+TL2GE5G8drJ0Pa+6dDh5yBq7BUJH+C4D8nG1I81K+O8J8hLjAUcr9cPxvxl321SitvUa+nSM8fYrHH1WyiAyCyEOBAZc7XnKfj2KCqmnx3mNb4FWUiof0KZl5X5khDIwkehajSwhzhAYk1T0XJeu6Gf6GQSZTMKw8Yc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734128159; c=relaxed/simple; bh=Af4lNqDRBtEwDGhR4x2FMHimHIIOZBX43DGFT65Ne1M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ifxC6rDFkRZHq7QtJqU7YWMcBckCLx8IeDStmzoSyg2TaWZZYw7l0N8by23B8o88Ya5JeoRHb/rYgyzcfLlx5nn3utv0FVXaHa7xnAEEdNnQ1LzwYAL6aLgTs9M1ASPe6BqqM/+/uvrjf3dz7fghPTvP1xc3SFqva3cQFaeirNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RFP1FteA; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RFP1FteA" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-540215984f0so2475434e87.1 for ; Fri, 13 Dec 2024 14:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734128155; x=1734732955; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CABUdGAPZQuHjkRiiuh+SCZo2fnFwA0U/zBsUBBa8Sc=; b=RFP1FteAOdElz3UhVwH3b/ZAbfqOSbyAlY53plBzMTQsccETh75g5ZF12j8xCZe5P9 6odcILZxVeYv7XNBBUCcbbmgtom/EcypfgwAJhDKK0gORUO4Oz3UkAnvxaeF/VazB5RM Ptx6hYyH7Hq1t/YRdw+qpt6rtYW0pdfDLNyoh3kBDbqjmUKzFTWx6DaaPboeg8EdHj6T duamjh+rE7wQiCosws/es9dCQRVyWxIHY+o4riaiEiudCzfSqD/3K2O6TkveZWINEK9S MGHKJt+DPm/+u1xSEwsEQE/YMfpYpcXsrMPkjPeTmr44CQCuQEIfkrMMeNpQP7Ptm0dE iVRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734128155; x=1734732955; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CABUdGAPZQuHjkRiiuh+SCZo2fnFwA0U/zBsUBBa8Sc=; b=FQzViz2WlvFIYRxtWP8yzsmdVOjqeGrZ224P8BafTEsLnB/JboJMjdXSlzFubIQ/V+ TO6MmlgiCx8hJ+n1Hj9lxpSRk+oEgCQx/FBTTNiWnQ/WdvA66UfwAQQr4vYpZ20M7DlS RX4Q+I6Nu9fUZ71ZjUQVpElgSUj4dkvQyNea1VN0ZSh2RBlDvMpghyhEGBMEoK+PJxFz yQVye/Z4p2HiLwsImaEVpRrFI9p6BFJajgDUUlN9/CbIPmPOrWiwOTrjmFYh0uiTO5cx JbrnBfKmLQRdDFJn8jLrf9i4gPZC9QiQx6eDdapClarfI8pv1DZdhTl/GWGLKuxarv5e f5Hw== X-Gm-Message-State: AOJu0Yy7TjjL/sfgW19DhLQB16Yme2RlZa+HcBCJDgBp08QvEUu/X+Td uSPBmzmK1oDEyHQhKW1wIH4OCY9fTjBfWMPpqHuzQXBYAGisTrYheNksVREk3Wc= X-Gm-Gg: ASbGnctWSXLvK6HeWDG99IYqdEHjgxTO7ZG/zbssxuD2s54rrWj1LRP+TmjFnpGsB54 MWrMlPhv0j4yHuDEr3+LBtiUSB4OQdLOri0tQAE4le0ctm4bZrUKhmBMelhM5Uxc1MEPBeg6nuf XkALBtD61gVi5A1dL4+97muX6HBMYTCGRUEDw1jt65yPTWXPlWmgBsNIUwjHfNsXSJndrKmOHwX Pfl9XmEB5+oshqlaDHtR3wyP7xj8JGvmhQmELwdKPkLvnmLbIcKgQzjy2g8KVwC X-Google-Smtp-Source: AGHT+IGyOYTojXpmRt2LX96dwxv8o6yjOnMD4KsG40pFmNcv8t+wdyibwjBTgc6u5Ro1JXU5F8u7gg== X-Received: by 2002:a05:6512:2208:b0:53e:2900:89b4 with SMTP id 2adb3069b0e04-54099b69b49mr1207055e87.49.1734128155553; Fri, 13 Dec 2024 14:15:55 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-303441e0f43sm413451fa.125.2024.12.13.14.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 14:15:54 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 14 Dec 2024 00:14:51 +0200 Subject: [PATCH 35/35] drm/msm/dpu: move features out of the DPU_HW_BLK_INFO Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241214-dpu-drop-features-v1-35-988f0662cb7e@linaro.org> References: <20241214-dpu-drop-features-v1-0-988f0662cb7e@linaro.org> In-Reply-To: <20241214-dpu-drop-features-v1-0-988f0662cb7e@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Vinod Koul , Konrad Dybcio Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=9218; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Af4lNqDRBtEwDGhR4x2FMHimHIIOZBX43DGFT65Ne1M=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnXLHJL2FJWQFF839dS/KnzAEEZTFboJVTZNlkk CRuyAntJ1GJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ1yxyQAKCRCLPIo+Aiko 1SJnB/46kmnZg7DpHoj7NY7kZO3C62UNtSiuh2qCK7cqyS7nxJnc9CaSaeheETLtZGnHUY48QA+ dVY2Ubq8ZMigd17F2/4WSGI6SleeN6XEqGsec3H2U87KBwKVtuodD05EIw3TeFz/1+l1bsOw8rx HCb/kp2j1jkwWTNfb1kdsw5xnjUHFfpqxHM4etsrvrMXtLuDSL+UpdN2ArSZuSzTqhNBYU+2JOE +B/gilUpb0Trep+oXwUGTa8nxYLnl+4Hut30igaszAAiR1jopbSVbsDOVeTDBeDpS8UTtjJOIhZ tVQRLa6oZ9T4hRdXO6SfQvPzZOUibNdIPKc4w5MlR4+m+T6d X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Only SSPP, WB and VBIF still have feature bits remaining, all other hardware blocks don't have feature bits anymore. Remove the 'features' from the DPU_HW_BLK_INFO so that it doesn't get included into hw info structures by default and only include it when necessary. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 17 ++++------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 5 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 4 ++-- 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h index e5057bc445ff74e2b02be64cfba90a7fdd1c6ad4..32f083f729ef17cbfc3bc67c7a31a43b98665875 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h +++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h @@ -22,7 +22,6 @@ static const struct dpu_caps sm6125_dpu_caps = { static const struct dpu_mdp_cfg sm6125_mdp = { .name = "top_0", .base = 0x0, .len = 0x45c, - .features = 0, .clk_ctrls = { [DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 }, [DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 }, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h index 93d15af04657dcd961fd9bdce68bedab3fb02335..c260b0ae5ed96d5b700a1e04aa9b83f75e1157f2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h @@ -124,14 +124,12 @@ enum { * @id: enum identifying this block * @base: register base offset to mdss * @len: length of hardware block - * @features bit mask identifying sub-blocks/features */ #define DPU_HW_BLK_INFO \ char name[DPU_HW_BLK_NAME_LEN]; \ u32 id; \ u32 base; \ - u32 len; \ - unsigned long features + u32 len /** * struct dpu_scaler_blk: Scaler information @@ -348,7 +346,6 @@ struct dpu_clk_ctrl_reg { /* struct dpu_mdp_cfg : MDP TOP-BLK instance info * @id: index identifying this block * @base: register base offset to mdss - * @features bit mask identifying sub-blocks/features * @clk_ctrls clock control register definition */ struct dpu_mdp_cfg { @@ -359,7 +356,6 @@ struct dpu_mdp_cfg { /* struct dpu_ctl_cfg : MDP CTL instance info * @id: index identifying this block * @base: register base offset to mdss - * @features bit mask identifying sub-blocks/features * @intr_start: interrupt index for CTL_START * @has_split_display: CTL supports video mode split display */ @@ -381,6 +377,7 @@ struct dpu_ctl_cfg { */ struct dpu_sspp_cfg { DPU_HW_BLK_INFO; + unsigned long features; const struct dpu_sspp_sub_blks *sblk; u32 xin_id; enum dpu_clk_ctrl_type clk_ctrl; @@ -391,7 +388,6 @@ struct dpu_sspp_cfg { * struct dpu_lm_cfg - information of layer mixer blocks * @id: index identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features * @sblk: LM Sub-blocks information * @pingpong: ID of connected PingPong, PINGPONG_NONE if unsupported * @lm_pair: ID of LM that can be controlled by same CTL @@ -410,7 +406,6 @@ struct dpu_lm_cfg { * struct dpu_dspp_cfg - information of DSPP blocks * @id enum identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features * supported by this block * @sblk sub-blocks information */ @@ -423,7 +418,6 @@ struct dpu_dspp_cfg { * struct dpu_pingpong_cfg - information of PING-PONG blocks * @id enum identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features * @intr_done: index for PINGPONG done interrupt * @intr_rdptr: index for PINGPONG readpointer done interrupt * @sblk sub-blocks information @@ -440,8 +434,6 @@ struct dpu_pingpong_cfg { * struct dpu_merge_3d_cfg - information of DSPP blocks * @id enum identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features - * supported by this block * @sblk sub-blocks information */ struct dpu_merge_3d_cfg { @@ -454,7 +446,6 @@ struct dpu_merge_3d_cfg { * @id enum identifying this block * @base register offset of this block * @len: length of hardware block - * @features bit mask identifying sub-blocks/features * @sblk: sub-blocks information * @have_native_42x: Supports NATIVE_422 and NATIVE_420 encoding */ @@ -468,7 +459,6 @@ struct dpu_dsc_cfg { * struct dpu_intf_cfg - information of timing engine blocks * @id enum identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features * @type: Interface type(DSI, DP, HDMI) * @controller_id: Controller Instance ID in case of multiple of intf type * @prog_fetch_lines_worst_case Worst case latency num lines needed to prefetch @@ -499,6 +489,7 @@ struct dpu_intf_cfg { */ struct dpu_wb_cfg { DPU_HW_BLK_INFO; + unsigned long features; u8 vbif_idx; u32 maxlinewidth; u32 xin_id; @@ -557,6 +548,7 @@ struct dpu_vbif_qos_tbl { */ struct dpu_vbif_cfg { DPU_HW_BLK_INFO; + unsigned long features; u32 default_ot_rd_limit; u32 default_ot_wr_limit; u32 xin_halt_timeout; @@ -574,7 +566,6 @@ struct dpu_vbif_cfg { * @name string name for debug purposes * @id enum identifying this block * @base register offset of this block - * @features bit mask identifying sub-blocks/features */ struct dpu_cdm_cfg { DPU_HW_BLK_INFO; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c index 42b4a5dbc2442ae0f2adab80a5a3df96b35e62b0..df6e43672422f1d796e38c32256582900f58523e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c @@ -360,8 +360,7 @@ static void dpu_hw_dsc_bind_pingpong_blk_1_2(struct dpu_hw_dsc *hw_dsc, DPU_REG_WRITE(hw, sblk->ctl.base + DSC_CTL, mux_cfg); } -static void _setup_dcs_ops_1_2(struct dpu_hw_dsc_ops *ops, - const unsigned long features) +static void _setup_dcs_ops_1_2(struct dpu_hw_dsc_ops *ops) { ops->dsc_disable = dpu_hw_dsc_disable_1_2; ops->dsc_config = dpu_hw_dsc_config_1_2; @@ -391,7 +390,7 @@ struct dpu_hw_dsc *dpu_hw_dsc_init_1_2(struct drm_device *dev, c->idx = cfg->id; c->caps = cfg; - _setup_dcs_ops_1_2(&c->ops, c->caps->features); + _setup_dcs_ops_1_2(&c->ops); return c; } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c index 0b3325f9c8705999e1003e5c88872562e880229b..83b1dbecddd2b30402f47155fa2f9a148ead02c1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c @@ -33,8 +33,7 @@ static void dpu_hw_merge_3d_setup_3d_mode(struct dpu_hw_merge_3d *merge_3d, } } -static void _setup_merge_3d_ops(struct dpu_hw_merge_3d *c, - unsigned long features) +static void _setup_merge_3d_ops(struct dpu_hw_merge_3d *c) { c->ops.setup_3d_mode = dpu_hw_merge_3d_setup_3d_mode; }; @@ -62,7 +61,7 @@ struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(struct drm_device *dev, c->idx = cfg->id; c->caps = cfg; - _setup_merge_3d_ops(c, c->caps->features); + _setup_merge_3d_ops(c); return c; } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c index 5c811f0142d5e2a012d7e9b3a918818f22ec11cf..96dc10589bee6cf144eabaecf9f8ec5777431ac3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c @@ -264,7 +264,7 @@ static void dpu_hw_dp_phy_intf_sel(struct dpu_hw_mdp *mdp, } static void _setup_mdp_ops(struct dpu_hw_mdp_ops *ops, - unsigned long cap, const struct dpu_mdss_version *mdss_rev) + const struct dpu_mdss_version *mdss_rev) { ops->setup_split_pipe = dpu_hw_setup_split_pipe; ops->setup_clk_force_ctrl = dpu_hw_setup_clk_force_ctrl; @@ -313,7 +313,7 @@ struct dpu_hw_mdp *dpu_hw_mdptop_init(struct drm_device *dev, * Assign ops */ mdp->caps = cfg; - _setup_mdp_ops(&mdp->ops, mdp->caps->features, mdss_rev); + _setup_mdp_ops(&mdp->ops, mdss_rev); return mdp; }